org.globus.mds.webmds.xmlSources.file
Class FileXmlSource

java.lang.Object
  extended byorg.globus.mds.webmds.xmlSources.file.FileXmlSource
All Implemented Interfaces:
WebmdsXmlSource

public class FileXmlSource
extends java.lang.Object
implements WebmdsXmlSource

FileXmlSource -- reads an xml document from a file. This uses one configuration parameter from the servlet config file:

file (specified as xmlSource.sourceName.param.file in the servlet configuration)
The name of the file to read


Field Summary
private  java.lang.String FILE_PARAM_NAME
           
private  ParameterMap initParameters
           
private  java.lang.String requestInfoString
           
private  WebmdsUtil webmdsUtil
           
 
Constructor Summary
FileXmlSource()
           
 
Method Summary
private  java.lang.String getFileParamName()
           
 java.lang.String getRequestInfo()
          Returns the name of the requested file.
 javax.xml.transform.Source getXmlSource(java.lang.String name, ParameterMap initParams, ParameterMap requestParams)
          Get an xml Source object corresponding to the contents of an XML file.
 void init(WebmdsUtil webmdsUtil)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

initParameters

private ParameterMap initParameters

FILE_PARAM_NAME

private final java.lang.String FILE_PARAM_NAME
See Also:
Constant Field Values

requestInfoString

private java.lang.String requestInfoString

webmdsUtil

private WebmdsUtil webmdsUtil
Constructor Detail

FileXmlSource

public FileXmlSource()
Method Detail

getXmlSource

public javax.xml.transform.Source getXmlSource(java.lang.String name,
                                               ParameterMap initParams,
                                               ParameterMap requestParams)
                                        throws WebmdsXmlSourceException,
                                               java.io.IOException
Get an xml Source object corresponding to the contents of an XML file.

Specified by:
getXmlSource in interface WebmdsXmlSource
Parameters:
name - nickname of the xml source.
initParams - initialization parameters. This must include a "file" parameter with the path name to the file.
requestParams - parameters from the http request. Ignored.
Throws:
WebmdsXmlSourceException
java.io.IOException

init

public void init(WebmdsUtil webmdsUtil)
Specified by:
init in interface WebmdsXmlSource

getFileParamName

private java.lang.String getFileParamName()

getRequestInfo

public java.lang.String getRequestInfo()
Returns the name of the requested file.

Specified by:
getRequestInfo in interface WebmdsXmlSource