Interface XMLParser
-
- All Known Implementing Classes:
XMLParser_impl
public interface XMLParserA UIMAXMLParserparses XML documents and generates UIMA components represented by the XML.An application obtains a reference to the
XMLParserby calling theUIMAFramework.getXMLParser()method. The application then uses theXMLParserby passing anInputStreamto one of itsparsemethods - for exampleparseAnalysisEngineDescription(XMLInputSource)for parsing anAnalysisEngineDescriptionfrom its XML representation.XML schema validation is off by default; it can be turned on by calling the method
enableSchemaValidation(boolean).UIMA developers who provide new types of XMLizable components must configure the XML parser by using the
addMapping(String,String)method to specify mappings between XML Element names and the class names of the objects to be built from elements with those names. All objects to be built by the XML parser must implementXMLizableand provide an implementation ofXMLizable.buildFromXMLElement(Element, XMLParser).Note that we are considering replacing this ad-hoc XML data binding interface with the java standard extension JAXB. See http://java.sun.com/xml/jaxb for details on JAXB.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classXMLParser.ParsingOptionsOption settings for the parser.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringRESOURCE_SPECIFIER_NAMESPACEXML namespace for ResourceSpecifiers.static java.lang.StringRESOURCE_SPECIFIER_SCHEMA_NAMEName of schema for ResourceSpecifiers.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidaddMapping(java.lang.String aElementName, java.lang.String aClassName)Configures this XMLParser by registering a mapping between the name of an XML element and the Class of object to be built from elements with that name.XMLizablebuildObject(org.w3c.dom.Element aElement)Builds an object from its XML DOM representation.XMLizablebuildObject(org.w3c.dom.Element aElement, XMLParser.ParsingOptions aOptions)Builds an object from its XML DOM representation.java.lang.ObjectbuildObjectOrPrimitive(org.w3c.dom.Element aElement, XMLParser.ParsingOptions aOptions)Builds an object from its XML DOM representation.voidenableSchemaValidation(boolean aEnable)Enables or disables XML schema validation.SaxDeserializernewSaxDeserializer()Creates a newSaxDeserializerobject, which implements the SAXContentHandlerinterface and can be used to deserialize anXMLizableobject from the events sent from a SAX parser.SaxDeserializernewSaxDeserializer(XMLParser.ParsingOptions aOptions)Creates a newSaxDeserializer.XMLizableparse(XMLInputSource aInput)Parses an XML input stream and produces an object.XMLizableparse(XMLInputSource aInput, java.lang.String aNamespaceForSchema, java.net.URL aSchemaUrl)Parses an XML input stream and produces an object.XMLizableparse(XMLInputSource aInput, java.lang.String aNamespaceForSchema, java.net.URL aSchemaUrl, XMLParser.ParsingOptions aOptions)Parses an XML input stream and produces an object.XMLizableparse(XMLInputSource aInput, XMLParser.ParsingOptions aOptions)Parses an XML input stream and produces an object.AnalysisEngineDescriptionparseAnalysisEngineDescription(XMLInputSource aInput)Parses an AnalysisEngineDescription from an XML input stream.AnalysisEngineDescriptionparseAnalysisEngineDescription(XMLInputSource aInput, XMLParser.ParsingOptions aOptions)Parses an AnalysisEngineDescription from an XML input stream.CasConsumerDescriptionparseCasConsumerDescription(XMLInputSource aInput)Parses a CasConsumerDescription from an XML input stream.CasConsumerDescriptionparseCasConsumerDescription(XMLInputSource aInput, XMLParser.ParsingOptions aOptions)Parses a CasConsumerDescription from an XML input stream.CasInitializerDescriptionparseCasInitializerDescription(XMLInputSource aInput)Parses a CasInitializerDescription from an XML input stream.CasInitializerDescriptionparseCasInitializerDescription(XMLInputSource aInput, XMLParser.ParsingOptions aOptions)Parses a CasInitializerDescription from an XML input stream.CollectionReaderDescriptionparseCollectionReaderDescription(XMLInputSource aInput)Parses a CollectionReaderDescription from an XML input stream.CollectionReaderDescriptionparseCollectionReaderDescription(XMLInputSource aInput, XMLParser.ParsingOptions aOptions)Parses a CollectionReaderDescription from an XML input stream.CpeDescriptionparseCpeDescription(XMLInputSource aInput)Parses a CpeDescription from an XML input stream.CustomResourceSpecifierparseCustomResourceSpecifier(XMLInputSource aInput)Parses a CustomResourceSpecifier from an XML input stream.CustomResourceSpecifierparseCustomResourceSpecifier(XMLInputSource aInput, XMLParser.ParsingOptions aOptions)Parses a CustomResourceSpecifier from an XML input stream.FlowControllerDescriptionparseFlowControllerDescription(XMLInputSource aInput)Parses a FlowControllerDescription from an XML input stream.FlowControllerDescriptionparseFlowControllerDescription(XMLInputSource aInput, XMLParser.ParsingOptions aOptions)Parses a FlowControllerDescription from an XML input stream.FsIndexCollectionparseFsIndexCollection(XMLInputSource aInput)Parses a FsIndexCollection from an XML input stream.FsIndexCollectionparseFsIndexCollection(XMLInputSource aInput, XMLParser.ParsingOptions aOptions)Parses a FsIndexCollection from an XML input stream.IndexBuildSpecificationparseIndexBuildSpecification(XMLInputSource aInput)Parses an IndexBuildSpecification from an XML input stream.IndexBuildSpecificationparseIndexBuildSpecification(XMLInputSource aInput, XMLParser.ParsingOptions aOptions)Parses an IndexBuildSpecification from an XML input stream.PearSpecifierparsePearSpecifier(XMLInputSource aInput)Parses a PearSpecifier from an XML input stream.PearSpecifierparsePearSpecifier(XMLInputSource aInput, XMLParser.ParsingOptions aOptions)Parses a PearSpecifier from an XML input stream.ResourceManagerConfigurationparseResourceManagerConfiguration(XMLInputSource aInput)Parses a ResourceManagerConfiguration from an XML input stream.ResourceManagerConfigurationparseResourceManagerConfiguration(XMLInputSource aInput, XMLParser.ParsingOptions aOptions)Parses a ResourceManagerConfiguration from an XML input stream.ResourceMetaDataparseResourceMetaData(XMLInputSource aInput)Parses a ResourceMetaData object from an XML input stream.ResourceMetaDataparseResourceMetaData(XMLInputSource aInput, XMLParser.ParsingOptions aOptions)Parses a ResourceMetaData object from an XML input stream.ResourceSpecifierparseResourceSpecifier(XMLInputSource aInput)Parses a ResourceSpecifier from an XML input stream.ResourceSpecifierparseResourceSpecifier(XMLInputSource aInput, XMLParser.ParsingOptions aOptions)Parses a ResourceSpecifier from an XML input stream.ResultSpecificationparseResultSpecification(XMLInputSource aInput)Parses a ResultSpecification from an XML input stream.ResultSpecificationparseResultSpecification(XMLInputSource aInput, XMLParser.ParsingOptions aOptions)Parses a ResultSpecification from an XML input stream.TaeDescriptionparseTaeDescription(XMLInputSource aInput)Deprecated.As of v2.0,parseAnalysisEngineDescription(XMLInputSource)should be used instead.TaeDescriptionparseTaeDescription(XMLInputSource aInput, XMLParser.ParsingOptions aOptions)Deprecated.As of v2.0,parseAnalysisEngineDescription(XMLInputSource,ParsingOptions)should be used instead.TypePrioritiesparseTypePriorities(XMLInputSource aInput)Parses a TypePriorities declaration from an XML input stream.TypePrioritiesparseTypePriorities(XMLInputSource aInput, XMLParser.ParsingOptions aOptions)Parses a TypePriorities declaration from an XML input stream.TypeSystemDescriptionparseTypeSystemDescription(XMLInputSource aInput)Parses a TypeSystemDescription from an XML input stream.TypeSystemDescriptionparseTypeSystemDescription(XMLInputSource aInput, XMLParser.ParsingOptions aOptions)Parses a TypeSystemDescription from an XML input stream.URISpecifierparseURISpecifier(XMLInputSource aInput)Parses a URISpecifier from an XML input stream.URISpecifierparseURISpecifier(XMLInputSource aInput, XMLParser.ParsingOptions aOptions)Parses a URISpecifier from an XML input stream.
-
-
-
Field Detail
-
RESOURCE_SPECIFIER_NAMESPACE
static final java.lang.String RESOURCE_SPECIFIER_NAMESPACE
XML namespace for ResourceSpecifiers. XML ResourceSpecifier documents must use this namespace or they will be considered invalid by the schema validator.- See Also:
- Constant Field Values
-
RESOURCE_SPECIFIER_SCHEMA_NAME
static final java.lang.String RESOURCE_SPECIFIER_SCHEMA_NAME
Name of schema for ResourceSpecifiers. This file will be looked up in the classpath.- See Also:
- Constant Field Values
-
-
Method Detail
-
enableSchemaValidation
void enableSchemaValidation(boolean aEnable)
Enables or disables XML schema validation.- Parameters:
aEnable- true to enable validation, false to disable validation
-
parse
XMLizable parse(XMLInputSource aInput, java.lang.String aNamespaceForSchema, java.net.URL aSchemaUrl) throws InvalidXMLException
Parses an XML input stream and produces an object. elements.- Parameters:
aInput- the input source from which to read the XML documentaNamespaceForSchema- XML namespace for elements to be validated against XML schema. If null, no schema will be used (unless one is declared in the document itself). This parameter is ignored if schema validation has not been enabled viaenableSchemaValidation(boolean).aSchemaUrl- URL to XML schema that will be used to validate the XML document. If null, no schema will be used (unless one is declared in the document itself). This parameter is ignored if schema validation has not been enabled viaenableSchemaValidation(boolean).- Returns:
- an
XMLizableobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid object
-
parse
XMLizable parse(XMLInputSource aInput, java.lang.String aNamespaceForSchema, java.net.URL aSchemaUrl, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
Parses an XML input stream and produces an object.- Parameters:
aInput- the input source from which to read the XML documentaNamespaceForSchema- XML namespace for elements to be validated against XML schema. If null, no schema will be used (unless one is declared in the document itself). This parameter is ignored if schema validation has not been enabled viaenableSchemaValidation(boolean).aSchemaUrl- URL to XML schema that will be used to validate the XML document. If null, no schema will be used (unless one is declared in the document itself). This parameter is ignored if schema validation has not been enabled viaenableSchemaValidation(boolean).aOptions- option settings- Returns:
- an
XMLizableobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid object
-
parse
XMLizable parse(XMLInputSource aInput) throws InvalidXMLException
Parses an XML input stream and produces an object. XIncludes will be expanded but no schema validation will be done.- Parameters:
aInput- the input source from which to read the XML document- Returns:
- an
XMLizableobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid object
-
parse
XMLizable parse(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
Parses an XML input stream and produces an object. No schema validation will be done.- Parameters:
aInput- the input source from which to read the XML documentaOptions- option settings- Returns:
- an
XMLizableobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid object
-
parseResourceSpecifier
ResourceSpecifier parseResourceSpecifier(XMLInputSource aInput) throws InvalidXMLException
Parses a ResourceSpecifier from an XML input stream.- Parameters:
aInput- the input source from which to read the XML document- Returns:
- a
ResourceSpecifierobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid ResourceSpecifier
-
parseResourceSpecifier
ResourceSpecifier parseResourceSpecifier(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
Parses a ResourceSpecifier from an XML input stream.- Parameters:
aInput- the input source from which to read the XML documentaOptions- option settings- Returns:
- a
ResourceSpecifierobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid ResourceSpecifier
-
parseResourceMetaData
ResourceMetaData parseResourceMetaData(XMLInputSource aInput) throws InvalidXMLException
Parses a ResourceMetaData object from an XML input stream. XML schema validation will be done against theRESOURCE_SPECIFIER_SCHEMA_NAMEif it can be found in the classpath.- Parameters:
aInput- the input source from which to read the XML document- Returns:
- a
ResourceMetaDataobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid ResourceSpecifier
-
parseResourceMetaData
ResourceMetaData parseResourceMetaData(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
Parses a ResourceMetaData object from an XML input stream. XML schema validation will be done against theRESOURCE_SPECIFIER_SCHEMA_NAMEif it can be found in the classpath.- Parameters:
aInput- the input source from which to read the XML documentaOptions- option settings- Returns:
- a
ResourceMetaDataobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid ResourceSpecifier
-
parseURISpecifier
URISpecifier parseURISpecifier(XMLInputSource aInput) throws InvalidXMLException
Parses a URISpecifier from an XML input stream.- Parameters:
aInput- the input source from which to read the XML document- Returns:
- a
URISpecifierobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid URISpecifier
-
parseURISpecifier
URISpecifier parseURISpecifier(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
Parses a URISpecifier from an XML input stream.- Parameters:
aInput- the input source from which to read the XML documentaOptions- option settings- Returns:
- a
URISpecifierobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid URISpecifier
-
parseAnalysisEngineDescription
AnalysisEngineDescription parseAnalysisEngineDescription(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
Parses an AnalysisEngineDescription from an XML input stream.- Parameters:
aInput- the input source from which to read the XML documentaOptions- option settings- Returns:
- an
AnalysisEngineDescriptionobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid AnalysisEngineDescription
-
parseAnalysisEngineDescription
AnalysisEngineDescription parseAnalysisEngineDescription(XMLInputSource aInput) throws InvalidXMLException
Parses an AnalysisEngineDescription from an XML input stream.- Parameters:
aInput- the input source from which to read the XML document- Returns:
- an
AnalysisEngineDescriptionobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid AnalysisEngineDescription
-
parseTaeDescription
@Deprecated TaeDescription parseTaeDescription(XMLInputSource aInput) throws InvalidXMLException
Deprecated.As of v2.0,parseAnalysisEngineDescription(XMLInputSource)should be used instead.Parses a TaeDescription from an XML input stream.- Parameters:
aInput- the input source from which to read the XML document- Returns:
- a
TaeDescriptionobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid TaeDescription
-
parseTaeDescription
@Deprecated TaeDescription parseTaeDescription(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
Deprecated.As of v2.0,parseAnalysisEngineDescription(XMLInputSource,ParsingOptions)should be used instead.Parses a TaeDescription from an XML input stream.- Parameters:
aInput- the input source from which to read the XML documentaOptions- option settings- Returns:
- a
TaeDescriptionobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid TaeDescription
-
parseCasConsumerDescription
CasConsumerDescription parseCasConsumerDescription(XMLInputSource aInput) throws InvalidXMLException
Parses a CasConsumerDescription from an XML input stream.- Parameters:
aInput- the input source from which to read the XML document- Returns:
- a
CasConsumerDescriptionobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid CasConsumerDescription
-
parseCasConsumerDescription
CasConsumerDescription parseCasConsumerDescription(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
Parses a CasConsumerDescription from an XML input stream.- Parameters:
aInput- the input source from which to read the XML documentaOptions- option settings- Returns:
- a
CasConsumerDescriptionobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid CasConsumerDescription
-
parseCasInitializerDescription
CasInitializerDescription parseCasInitializerDescription(XMLInputSource aInput) throws InvalidXMLException
Parses a CasInitializerDescription from an XML input stream.- Parameters:
aInput- the input source from which to read the XML document- Returns:
- a
CasInitializerDescriptionobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid CasInitializerDescription
-
parseCasInitializerDescription
CasInitializerDescription parseCasInitializerDescription(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
Parses a CasInitializerDescription from an XML input stream.- Parameters:
aInput- the input source from which to read the XML documentaOptions- option settings- Returns:
- a
CasInitializerDescriptionobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid CasInitializerDescription
-
parseCollectionReaderDescription
CollectionReaderDescription parseCollectionReaderDescription(XMLInputSource aInput) throws InvalidXMLException
Parses a CollectionReaderDescription from an XML input stream.- Parameters:
aInput- the input source from which to read the XML document- Returns:
- a
CollectionReaderDescriptionobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid CollectionReaderDescription
-
parseCollectionReaderDescription
CollectionReaderDescription parseCollectionReaderDescription(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
Parses a CollectionReaderDescription from an XML input stream.- Parameters:
aInput- the input source from which to read the XML documentaOptions- option settings- Returns:
- a
CollectionReaderDescriptionobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid CollectionReaderDescription
-
parseCpeDescription
CpeDescription parseCpeDescription(XMLInputSource aInput) throws InvalidXMLException
Parses a CpeDescription from an XML input stream.NOTE: the option settings
XMLParser.ParsingOptionsare not currently available for parsing CpeDescriptions, because they use a different parsing mechanism than the other specifier types.- Parameters:
aInput- the input source from which to read the XML document- Returns:
- a
cpeDescriptionobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid IndexingSpecification
-
parseResultSpecification
ResultSpecification parseResultSpecification(XMLInputSource aInput) throws InvalidXMLException
Parses a ResultSpecification from an XML input stream.- Parameters:
aInput- the input source from which to read the XML document- Returns:
- a
ResultSpecificationobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid ResultSpecification
-
parseResultSpecification
ResultSpecification parseResultSpecification(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
Parses a ResultSpecification from an XML input stream.- Parameters:
aInput- the input source from which to read the XML documentaOptions- option settings- Returns:
- a
ResultSpecificationobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid ResultSpecification
-
parseTypeSystemDescription
TypeSystemDescription parseTypeSystemDescription(XMLInputSource aInput) throws InvalidXMLException
Parses a TypeSystemDescription from an XML input stream.- Parameters:
aInput- the input source from which to read the XML document- Returns:
- a
TypeSystemDescriptionobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid TypeSystemDescription
-
parseTypeSystemDescription
TypeSystemDescription parseTypeSystemDescription(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
Parses a TypeSystemDescription from an XML input stream.- Parameters:
aInput- the input source from which to read the XML documentaOptions- option settings- Returns:
- a
TypeSystemDescriptionobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid TypeSystemDescription
-
parseTypePriorities
TypePriorities parseTypePriorities(XMLInputSource aInput) throws InvalidXMLException
Parses a TypePriorities declaration from an XML input stream.- Parameters:
aInput- the input source from which to read the XML document- Returns:
- a
TypePrioritiesobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid TypePriorities
-
parseTypePriorities
TypePriorities parseTypePriorities(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
Parses a TypePriorities declaration from an XML input stream.- Parameters:
aInput- the input source from which to read the XML documentaOptions- option settings- Returns:
- a
TypePrioritiesobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid TypePriorities
-
parseFsIndexCollection
FsIndexCollection parseFsIndexCollection(XMLInputSource aInput) throws InvalidXMLException
Parses a FsIndexCollection from an XML input stream.- Parameters:
aInput- the input source from which to read the XML document- Returns:
- a
FsIndexCollectionobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid FsIndexCollection
-
parseFsIndexCollection
FsIndexCollection parseFsIndexCollection(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
Parses a FsIndexCollection from an XML input stream.- Parameters:
aInput- the input source from which to read the XML documentaOptions- option settings- Returns:
- a
FsIndexCollectionobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid FsIndexCollection
-
parseResourceManagerConfiguration
ResourceManagerConfiguration parseResourceManagerConfiguration(XMLInputSource aInput) throws InvalidXMLException
Parses a ResourceManagerConfiguration from an XML input stream.- Parameters:
aInput- the input source from which to read the XML document- Returns:
- a
ResourceManagerConfigurationobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid ResourceManagerConfiguration
-
parseResourceManagerConfiguration
ResourceManagerConfiguration parseResourceManagerConfiguration(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
Parses a ResourceManagerConfiguration from an XML input stream.- Parameters:
aInput- the input source from which to read the XML documentaOptions- option settings- Returns:
- a
ResourceManagerConfigurationobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid ResourceManagerConfiguration
-
parseFlowControllerDescription
FlowControllerDescription parseFlowControllerDescription(XMLInputSource aInput) throws InvalidXMLException
Parses a FlowControllerDescription from an XML input stream.- Parameters:
aInput- the input source from which to read the XML document- Returns:
- a
FlowControllerDescriptionobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid FlowControllerDescription
-
parseFlowControllerDescription
FlowControllerDescription parseFlowControllerDescription(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
Parses a FlowControllerDescription from an XML input stream.- Parameters:
aInput- the input source from which to read the XML documentaOptions- option settings- Returns:
- a
FlowControllerDescriptionobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid FlowControllerDescription
-
parseCustomResourceSpecifier
CustomResourceSpecifier parseCustomResourceSpecifier(XMLInputSource aInput) throws InvalidXMLException
Parses a CustomResourceSpecifier from an XML input stream.- Parameters:
aInput- the input source from which to read the XML document- Returns:
- a
CustomResourceSpecifierobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid CustomResourceSpecifier
-
parseCustomResourceSpecifier
CustomResourceSpecifier parseCustomResourceSpecifier(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
Parses a CustomResourceSpecifier from an XML input stream.- Parameters:
aInput- the input source from which to read the XML documentaOptions- option settings- Returns:
- a
CustomResourceSpecifierobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid CustomResourceSpecifier
-
parsePearSpecifier
PearSpecifier parsePearSpecifier(XMLInputSource aInput) throws InvalidXMLException
Parses a PearSpecifier from an XML input stream.- Parameters:
aInput- the input source from which to read the XML document- Returns:
- a
PearSpecifierobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid PearSpecifier
-
parsePearSpecifier
PearSpecifier parsePearSpecifier(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
Parses a PearSpecifier from an XML input stream.- Parameters:
aInput- the input source from which to read the XML documentaOptions- option settings- Returns:
- a
PearSpecifierobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid PearSpecifier
-
parseIndexBuildSpecification
IndexBuildSpecification parseIndexBuildSpecification(XMLInputSource aInput) throws InvalidXMLException
Parses an IndexBuildSpecification from an XML input stream.- Parameters:
aInput- the input source from which to read the XML document- Returns:
- an
IndexBuildSpecificationobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid IndexBuildSpecification
-
parseIndexBuildSpecification
IndexBuildSpecification parseIndexBuildSpecification(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
Parses an IndexBuildSpecification from an XML input stream.- Parameters:
aInput- the input source from which to read the XML documentaOptions- option settings- Returns:
- an
IndexBuildSpecificationobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid IndexBuildSpecification
-
buildObject
XMLizable buildObject(org.w3c.dom.Element aElement) throws InvalidXMLException
Builds an object from its XML DOM representation. This method is not typically called by applications. It may be called from within aXMLizable.buildFromXMLElement(Element, XMLParser)method to construct sub-objects.- Parameters:
aElement- a DOM Element- Returns:
- an
XMLizableobject constructed from the DOM element - Throws:
InvalidXMLException- if the XML element does not specify a valid object
-
buildObject
XMLizable buildObject(org.w3c.dom.Element aElement, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
Builds an object from its XML DOM representation. This method is not typically called by applications. It may be called from within aXMLizable.buildFromXMLElement(Element, XMLParser)method to construct sub-objects.- Parameters:
aElement- a DOM ElementaOptions- option settings- Returns:
- an
XMLizableobject constructed from the DOM element - Throws:
InvalidXMLException- if the XML element does not specify a valid object
-
buildObjectOrPrimitive
java.lang.Object buildObjectOrPrimitive(org.w3c.dom.Element aElement, XMLParser.ParsingOptions aOptions) throws InvalidXMLExceptionBuilds an object from its XML DOM representation. This method is not typically called by applications. It may be called from within aXMLizable.buildFromXMLElement(Element, XMLParser)method to construct sub-objects.This method is similar to
buildObject(Element, XMLParser.ParsingOptions)but can also parse primitive-typed objects wrapped as XML elements, such as<integer>42</integer.- Parameters:
aElement- a DOM ElementaOptions- option settings- Returns:
- an object constructed from the DOM element. This can be either an instance of
XMLizable,String, or one of the primitive type wrapper objects (e.g.Integer,Float,Boolean). - Throws:
InvalidXMLException- if the XML element does not specify a valid object
-
newSaxDeserializer
SaxDeserializer newSaxDeserializer()
Creates a newSaxDeserializerobject, which implements the SAXContentHandlerinterface and can be used to deserialize anXMLizableobject from the events sent from a SAX parser. This can be used if the application already has a SAX parser that generates these events. In most cases, it is easier to use one of theparsemethods on this interface.The SAX deserializer returned my this method will expand XIncludes but will not do schema validation.
- Returns:
- an object that implements
ContentHandlerand can be used to deserialize anXMLizableobject from SAX events.
-
newSaxDeserializer
SaxDeserializer newSaxDeserializer(XMLParser.ParsingOptions aOptions)
Creates a newSaxDeserializer.- Parameters:
aOptions- option settings- Returns:
- an object that implements
ContentHandlerand can be used to deserialize anXMLizableobject from SAX events. - See Also:
newSaxDeserializer()
-
addMapping
void addMapping(java.lang.String aElementName, java.lang.String aClassName) throws java.lang.ClassNotFoundExceptionConfigures this XMLParser by registering a mapping between the name of an XML element and the Class of object to be built from elements with that name.- Parameters:
aElementName- the name of an XML elementaClassName- the name of a Class of object to be built. This class must implementXMLizableand have a zero-argument constructor.- Throws:
java.lang.ClassNotFoundException- if the class named byaClassNamecould not be found
-
-