Package org.apache.uima.util.impl
Class XMLParser_impl
java.lang.Object
org.apache.uima.util.impl.XMLParser_impl
- All Implemented Interfaces:
XMLParser
Reference implementation of
XMLParser.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.uima.util.XMLParser
XMLParser.ParsingOptions -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final XMLParser.ParsingOptionsMap from XML element names to Class objects.protected booleanWhether schema validation is enabled.Fields inherited from interface org.apache.uima.util.XMLParser
RESOURCE_SPECIFIER_NAMESPACE, RESOURCE_SPECIFIER_SCHEMA_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMapping(String aElementName, 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.buildObject(Element aElement) Builds an object from its XML DOM representation.buildObject(Element aElement, XMLParser.ParsingOptions aOptions) Builds an object from its XML DOM representation.buildObjectOrPrimitive(Element aElement, XMLParser.ParsingOptions aOptions) Builds an object from its XML DOM representation.voidenableSchemaValidation(boolean aEnable) Enables or disables XML schema validation.Creates a newSaxDeserializerobject, which implements the SAXContentHandlerinterface and can be used to deserialize anXMLizableobject from the events sent from a SAX parser.newSaxDeserializer(XMLParser.ParsingOptions aOptions) Creates a newSaxDeserializer.parse(XMLInputSource aInput) Parses an XML input stream and produces an object.parse(XMLInputSource aInput, String aNamespaceForSchema, URL aSchemaUrl) Parses an XML input stream and produces an object.parse(XMLInputSource aInput, String aNamespaceForSchema, URL aSchemaUrl, XMLParser.ParsingOptions aOptions) Parses an XML input stream and produces an object.parse(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) Parses an XML input stream and produces an object.Parses a AnalysisEngineDescription from an XML input stream.parseAnalysisEngineDescription(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) Parses a AnalysisEngineDescription from an XML input stream.Parses a CasConsumerDescription from an XML input stream.parseCasConsumerDescription(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) Parses a CasConsumerDescription from an XML input stream.Deprecated.parseCasInitializerDescription(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) Deprecated.Parses a CollectionReaderDescription from an XML input stream.parseCollectionReaderDescription(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) Parses a CollectionReaderDescription from an XML input stream.parseCpeDescription(XMLInputSource aInput) Parses a CpeDescription from an XML input stream.Parses a CustomResourceSpecifier from an XML input stream.parseCustomResourceSpecifier(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) Parses a CustomResourceSpecifier from an XML input stream.Parses a FlowControllerDescription from an XML input stream.parseFlowControllerDescription(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) Parses a FlowControllerDescription from an XML input stream.parseFsIndexCollection(XMLInputSource aInput) Parses a FsIndexCollection from an XML input stream.parseFsIndexCollection(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) Parses a FsIndexCollection from an XML input stream.Parses an IndexBuildSpecification from an XML input stream.parseIndexBuildSpecification(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) Parses an IndexBuildSpecification from an XML input stream.parsePearSpecifier(XMLInputSource aInput) Parses a PearSpecifier from an XML input stream.parsePearSpecifier(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) Parses a PearSpecifier from an XML input stream.Parses a ResourceManagerConfiguration from an XML input stream.parseResourceManagerConfiguration(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) Parses a ResourceManagerConfiguration from an XML input stream.parseResourceMetaData(XMLInputSource aInput) Parses a ResourceMetaData object from an XML input stream.parseResourceMetaData(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) Parses a ResourceMetaData object from an XML input stream.parseResourceSpecifier(XMLInputSource aInput) Parses a ResourceSpecifier from an XML input stream.parseResourceSpecifier(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) Parses a ResourceSpecifier from an XML input stream.Parses a ResultSpecification from an XML input stream.parseResultSpecification(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) Parses a ResultSpecification from an XML input stream.parseTaeDescription(XMLInputSource aInput) Deprecated.since v2.0parseTaeDescription(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) Deprecated.since v2.0parseTypePriorities(XMLInputSource aInput) Parses a TypePriorities declaration from an XML input stream.parseTypePriorities(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) Parses a TypePriorities declaration from an XML input stream.Parses a TypeSystemDescription from an XML input stream.parseTypeSystemDescription(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) Parses a TypeSystemDescription from an XML input stream.parseURISpecifier(XMLInputSource aInput) Parses a URISpecifier from an XML input stream.parseURISpecifier(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) Parses a URISpecifier from an XML input stream.
-
Field Details
-
mElementToClassMap
Map from XML element names to Class objects. -
mSchemaValidationEnabled
protected boolean mSchemaValidationEnabledWhether schema validation is enabled. -
DEFAULT_PARSING_OPTIONS
-
-
Constructor Details
-
XMLParser_impl
Creates a new XMLParser_impl.- Throws:
ParserConfigurationException- if the underlying XML parser could not be constructed
-
-
Method Details
-
enableSchemaValidation
public void enableSchemaValidation(boolean aEnable) Description copied from interface:XMLParserEnables or disables XML schema validation.- Specified by:
enableSchemaValidationin interfaceXMLParser- Parameters:
aEnable- true to enable validation, false to disable validation- See Also:
-
parse
public XMLizable parse(XMLInputSource aInput, String aNamespaceForSchema, URL aSchemaUrl, XMLParser.ParsingOptions aOptions) throws InvalidXMLException Parses an XML input stream and produces an object.- Specified by:
parsein interfaceXMLParser- 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.aSchemaUrl- URL to XML schema that will be used to validate the XML document. If null, no schema will be used.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
public XMLizable parse(XMLInputSource aInput, String aNamespaceForSchema, URL aSchemaUrl) throws InvalidXMLException Parses an XML input stream and produces an object.- Specified by:
parsein interfaceXMLParser- 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.aSchemaUrl- URL to XML schema that will be used to validate the XML document. If null, no schema will be used.- 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
Parses an XML input stream and produces an object. No schema validation will be done.- Specified by:
parsein interfaceXMLParser- 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
public XMLizable parse(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException Description copied from interface:XMLParserParses an XML input stream and produces an object. No schema validation will be done.- Specified by:
parsein interfaceXMLParser- 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
-
buildObject
Builds an object from its XML DOM representation.- Specified by:
buildObjectin interfaceXMLParser- 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
public XMLizable buildObject(Element aElement, XMLParser.ParsingOptions aOptions) throws InvalidXMLException Builds an object from its XML DOM representation.- Specified by:
buildObjectin interfaceXMLParser- 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
public Object buildObjectOrPrimitive(Element aElement, XMLParser.ParsingOptions aOptions) throws InvalidXMLException Description copied from interface:XMLParserBuilds 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
XMLParser.buildObject(Element, XMLParser.ParsingOptions)but can also parse primitive-typed objects wrapped as XML elements, such as<integer>42</integer.- Specified by:
buildObjectOrPrimitivein interfaceXMLParser- 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
-
parseResourceSpecifier
Parses a ResourceSpecifier from an XML input stream. XML schema validation will be done against theXMLParser.RESOURCE_SPECIFIER_SCHEMA_NAMEif it can be found in the classpath.- Specified by:
parseResourceSpecifierin interfaceXMLParser- 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
public ResourceSpecifier parseResourceSpecifier(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException Parses a ResourceSpecifier from an XML input stream. XML schema validation will be done against theXMLParser.RESOURCE_SPECIFIER_SCHEMA_NAMEif it can be found in the classpath.- Specified by:
parseResourceSpecifierin interfaceXMLParser- 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
Parses a ResourceMetaData object from an XML input stream. XML schema validation will be done against theXMLParser.RESOURCE_SPECIFIER_SCHEMA_NAMEif it can be found in the classpath.- Specified by:
parseResourceMetaDatain interfaceXMLParser- 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
public 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 theXMLParser.RESOURCE_SPECIFIER_SCHEMA_NAMEif it can be found in the classpath.- Specified by:
parseResourceMetaDatain interfaceXMLParser- 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
Parses a URISpecifier from an XML input stream. XML schema validation will be done against theXMLParser.RESOURCE_SPECIFIER_SCHEMA_NAMEif it can be found in the classpath.- Specified by:
parseURISpecifierin interfaceXMLParser- 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
public URISpecifier parseURISpecifier(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException Parses a URISpecifier from an XML input stream. XML schema validation will be done against theXMLParser.RESOURCE_SPECIFIER_SCHEMA_NAMEif it can be found in the classpath.- Specified by:
parseURISpecifierin interfaceXMLParser- 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
public AnalysisEngineDescription parseAnalysisEngineDescription(XMLInputSource aInput) throws InvalidXMLException Parses a AnalysisEngineDescription from an XML input stream. XML schema validation will be done against theXMLParser.RESOURCE_SPECIFIER_SCHEMA_NAMEif it can be found in the classpath.- Specified by:
parseAnalysisEngineDescriptionin interfaceXMLParser- Parameters:
aInput- the input source from which to read the XML document- Returns:
- a
AnalysisEngineDescriptionobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid AnalysisEngineDescription
-
parseAnalysisEngineDescription
public AnalysisEngineDescription parseAnalysisEngineDescription(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException Parses a AnalysisEngineDescription from an XML input stream. XML schema validation will be done against theXMLParser.RESOURCE_SPECIFIER_SCHEMA_NAMEif it can be found in the classpath.- Specified by:
parseAnalysisEngineDescriptionin interfaceXMLParser- Parameters:
aInput- the input source from which to read the XML documentaOptions- option settings- Returns:
- a
AnalysisEngineDescriptionobject constructed from the XML document - Throws:
InvalidXMLException- if the input XML is not valid or does not specify a valid AnalysisEngineDescription
-
parseTaeDescription
@Deprecated public TaeDescription parseTaeDescription(XMLInputSource aInput) throws InvalidXMLException Deprecated.since v2.0Parses a TaeDescription from an XML input stream. XML schema validation will be done against theXMLParser.RESOURCE_SPECIFIER_SCHEMA_NAMEif it can be found in the classpath.- Specified by:
parseTaeDescriptionin interfaceXMLParser- 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 public TaeDescription parseTaeDescription(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException Deprecated.since v2.0Parses a TaeDescription from an XML input stream. XML schema validation will be done against theXMLParser.RESOURCE_SPECIFIER_SCHEMA_NAMEif it can be found in the classpath.- Specified by:
parseTaeDescriptionin interfaceXMLParser- 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
-
parseResultSpecification
public ResultSpecification parseResultSpecification(XMLInputSource aInput) throws InvalidXMLException Description copied from interface:XMLParserParses a ResultSpecification from an XML input stream.- Specified by:
parseResultSpecificationin interfaceXMLParser- 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- See Also:
-
parseResultSpecification
public ResultSpecification parseResultSpecification(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException Description copied from interface:XMLParserParses a ResultSpecification from an XML input stream.- Specified by:
parseResultSpecificationin interfaceXMLParser- 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- See Also:
-
parseCasConsumerDescription
public CasConsumerDescription parseCasConsumerDescription(XMLInputSource aInput) throws InvalidXMLException Description copied from interface:XMLParserParses a CasConsumerDescription from an XML input stream.- Specified by:
parseCasConsumerDescriptionin interfaceXMLParser- 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- See Also:
-
parseCasConsumerDescription
public CasConsumerDescription parseCasConsumerDescription(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException Description copied from interface:XMLParserParses a CasConsumerDescription from an XML input stream.- Specified by:
parseCasConsumerDescriptionin interfaceXMLParser- 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- See Also:
-
parseCasInitializerDescription
@Deprecated public CasInitializerDescription parseCasInitializerDescription(XMLInputSource aInput) throws InvalidXMLException Deprecated.Description copied from interface:XMLParserParses a CasInitializerDescription from an XML input stream.- Specified by:
parseCasInitializerDescriptionin interfaceXMLParser- 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
@Deprecated public CasInitializerDescription parseCasInitializerDescription(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException Deprecated.Description copied from interface:XMLParserParses a CasInitializerDescription from an XML input stream.- Specified by:
parseCasInitializerDescriptionin interfaceXMLParser- 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
public CollectionReaderDescription parseCollectionReaderDescription(XMLInputSource aInput) throws InvalidXMLException Description copied from interface:XMLParserParses a CollectionReaderDescription from an XML input stream.- Specified by:
parseCollectionReaderDescriptionin interfaceXMLParser- 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
public CollectionReaderDescription parseCollectionReaderDescription(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException Description copied from interface:XMLParserParses a CollectionReaderDescription from an XML input stream.- Specified by:
parseCollectionReaderDescriptionin interfaceXMLParser- 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
Description copied from interface:XMLParserParses 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.- Specified by:
parseCpeDescriptionin interfaceXMLParser- 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
-
parseTypePriorities
Description copied from interface:XMLParserParses a TypePriorities declaration from an XML input stream.- Specified by:
parseTypePrioritiesin interfaceXMLParser- 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
public TypePriorities parseTypePriorities(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException Description copied from interface:XMLParserParses a TypePriorities declaration from an XML input stream.- Specified by:
parseTypePrioritiesin interfaceXMLParser- 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
-
parseTypeSystemDescription
public TypeSystemDescription parseTypeSystemDescription(XMLInputSource aInput) throws InvalidXMLException Description copied from interface:XMLParserParses a TypeSystemDescription from an XML input stream.- Specified by:
parseTypeSystemDescriptionin interfaceXMLParser- 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
public TypeSystemDescription parseTypeSystemDescription(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException Description copied from interface:XMLParserParses a TypeSystemDescription from an XML input stream.- Specified by:
parseTypeSystemDescriptionin interfaceXMLParser- 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
-
parseFsIndexCollection
Description copied from interface:XMLParserParses a FsIndexCollection from an XML input stream.- Specified by:
parseFsIndexCollectionin interfaceXMLParser- 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
public FsIndexCollection parseFsIndexCollection(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException Description copied from interface:XMLParserParses a FsIndexCollection from an XML input stream.- Specified by:
parseFsIndexCollectionin interfaceXMLParser- 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
public ResourceManagerConfiguration parseResourceManagerConfiguration(XMLInputSource aInput) throws InvalidXMLException Description copied from interface:XMLParserParses a ResourceManagerConfiguration from an XML input stream.- Specified by:
parseResourceManagerConfigurationin interfaceXMLParser- 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
public ResourceManagerConfiguration parseResourceManagerConfiguration(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException Description copied from interface:XMLParserParses a ResourceManagerConfiguration from an XML input stream.- Specified by:
parseResourceManagerConfigurationin interfaceXMLParser- 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
public FlowControllerDescription parseFlowControllerDescription(XMLInputSource aInput) throws InvalidXMLException Description copied from interface:XMLParserParses a FlowControllerDescription from an XML input stream.- Specified by:
parseFlowControllerDescriptionin interfaceXMLParser- 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
public FlowControllerDescription parseFlowControllerDescription(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException Description copied from interface:XMLParserParses a FlowControllerDescription from an XML input stream.- Specified by:
parseFlowControllerDescriptionin interfaceXMLParser- 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
public CustomResourceSpecifier parseCustomResourceSpecifier(XMLInputSource aInput) throws InvalidXMLException Description copied from interface:XMLParserParses a CustomResourceSpecifier from an XML input stream.- Specified by:
parseCustomResourceSpecifierin interfaceXMLParser- 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
public CustomResourceSpecifier parseCustomResourceSpecifier(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException Description copied from interface:XMLParserParses a CustomResourceSpecifier from an XML input stream.- Specified by:
parseCustomResourceSpecifierin interfaceXMLParser- 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
Description copied from interface:XMLParserParses a PearSpecifier from an XML input stream.- Specified by:
parsePearSpecifierin interfaceXMLParser- 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
public PearSpecifier parsePearSpecifier(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException Description copied from interface:XMLParserParses a PearSpecifier from an XML input stream.- Specified by:
parsePearSpecifierin interfaceXMLParser- 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
public IndexBuildSpecification parseIndexBuildSpecification(XMLInputSource aInput) throws InvalidXMLException Description copied from interface:XMLParserParses an IndexBuildSpecification from an XML input stream.- Specified by:
parseIndexBuildSpecificationin interfaceXMLParser- 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
public IndexBuildSpecification parseIndexBuildSpecification(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException Description copied from interface:XMLParserParses an IndexBuildSpecification from an XML input stream.- Specified by:
parseIndexBuildSpecificationin interfaceXMLParser- 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
-
addMapping
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. Ignores entries with no name, i.e. are not configured via XML- Specified by:
addMappingin interfaceXMLParser- 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:
ClassNotFoundException- if the class named byaClassNamecould not be foundUIMA_IllegalArgumentException- if the class named byaClassNamedoes not implementXMLIzable. @
-
newSaxDeserializer
Description copied from interface:XMLParserCreates 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.
- Specified by:
newSaxDeserializerin interfaceXMLParser- Returns:
- an object that implements
ContentHandlerand can be used to deserialize anXMLizableobject from SAX events. - See Also:
-
newSaxDeserializer
Description copied from interface:XMLParserCreates a newSaxDeserializer.- Specified by:
newSaxDeserializerin interfaceXMLParser- Parameters:
aOptions- option settings- Returns:
- an object that implements
ContentHandlerand can be used to deserialize anXMLizableobject from SAX events. - See Also:
-