Package xal.model.xml
Class ProbeXmlParser
java.lang.Object
xal.model.xml.ProbeXmlParser
Parses the description of a
Probe from an XML file. Returns an
instance of the appropriate Probe species. This class simply
provides methods for opening an xml document and creating a
DataAdaptor for it. It delegates the task of reading the
Probe definition and instantiating the Probe to that
class.- Version:
- $id:
- Author:
- Craig McChesney
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Probe<?>Parse the XML file specified by the supplied URI.Probe<?>parseAdaptor(DataAdaptor adaptor) Parse the given data source and build a probe object according to that described.static Probe<?>parseDataAdaptor(DataAdaptor adaptor) Parse the given data source and build a probe object according to that described.Probe<?>parseProbeFile(String fileUri) Parse the XML file specified by the supplied URI.
-
Constructor Details
-
ProbeXmlParser
public ProbeXmlParser()
-
-
Method Details
-
parse
Parse the XML file specified by the supplied URI. Return aProbeof the appropriate species.- Parameters:
fileUri- the URI specifying the XML file to parse- Returns:
- the Probe object described by the XML file
- Throws:
ParsingException
-
parseDataAdaptor
Parse the given data source and build a probe object according to that described. Convenience method calling.parseAdaptor(DataAdaptor)- Parameters:
adaptor- data source containing probe description- Returns:
- new probe object with properties specified by the data source
- Throws:
ParsingException- general formatting error in the data source- Since:
- Apr 14, 2011
-
parseProbeFile
Parse the XML file specified by the supplied URI. Return aProbeof the appropriate species.- Parameters:
fileUri- the URI specifying the XML file to parse- Returns:
- the Probe object described by the XML file
- Throws:
ParsingException
-
parseAdaptor
Parse the given data source and build a probe object according to that described. Calls methodto do the actual parsing.Probe.readFrom(DataAdaptor)- Parameters:
adaptor- data source containing probe description- Returns:
- new probe object with properties specified by the data source
- Throws:
ParsingException- general formatting error in the data source- Since:
- Apr 14, 2011
-