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
Modifier and TypeFieldDescriptionprotected static final XMLParser.ParsingOptions
Map from XML element names to Class objects.protected boolean
Whether schema validation is enabled.Fields inherited from interface org.apache.uima.util.XMLParser
RESOURCE_SPECIFIER_NAMESPACE, RESOURCE_SPECIFIER_SCHEMA_NAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addMapping
(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.void
enableSchemaValidation
(boolean aEnable) Enables or disables XML schema validation.Creates a newSaxDeserializer
object, which implements the SAXContentHandler
interface and can be used to deserialize anXMLizable
object 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:XMLParser
Enables or disables XML schema validation.- Specified by:
enableSchemaValidation
in 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:
parse
in 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
XMLizable
object 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:
parse
in 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
XMLizable
object 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:
parse
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML document- Returns:
- an
XMLizable
object 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:XMLParser
Parses an XML input stream and produces an object. No schema validation will be done.- Specified by:
parse
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML documentaOptions
- option settings- Returns:
- an
XMLizable
object 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:
buildObject
in interfaceXMLParser
- Parameters:
aElement
- a DOM Element- Returns:
- an
XMLizable
object 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:
buildObject
in interfaceXMLParser
- Parameters:
aElement
- a DOM ElementaOptions
- option settings- Returns:
- an
XMLizable
object 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:XMLParser
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.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:
buildObjectOrPrimitive
in 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_NAME
if it can be found in the classpath.- Specified by:
parseResourceSpecifier
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML document- Returns:
- a
ResourceSpecifier
object 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_NAME
if it can be found in the classpath.- Specified by:
parseResourceSpecifier
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML documentaOptions
- option settings- Returns:
- a
ResourceSpecifier
object 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_NAME
if it can be found in the classpath.- Specified by:
parseResourceMetaData
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML document- Returns:
- a
ResourceMetaData
object 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_NAME
if it can be found in the classpath.- Specified by:
parseResourceMetaData
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML documentaOptions
- option settings- Returns:
- a
ResourceMetaData
object 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_NAME
if it can be found in the classpath.- Specified by:
parseURISpecifier
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML document- Returns:
- a
URISpecifier
object 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_NAME
if it can be found in the classpath.- Specified by:
parseURISpecifier
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML documentaOptions
- option settings- Returns:
- a
URISpecifier
object 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_NAME
if it can be found in the classpath.- Specified by:
parseAnalysisEngineDescription
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML document- Returns:
- a
AnalysisEngineDescription
object 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_NAME
if it can be found in the classpath.- Specified by:
parseAnalysisEngineDescription
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML documentaOptions
- option settings- Returns:
- a
AnalysisEngineDescription
object 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_NAME
if it can be found in the classpath.- Specified by:
parseTaeDescription
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML document- Returns:
- a
TaeDescription
object 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_NAME
if it can be found in the classpath.- Specified by:
parseTaeDescription
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML documentaOptions
- option settings- Returns:
- a
TaeDescription
object 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:XMLParser
Parses a ResultSpecification from an XML input stream.- Specified by:
parseResultSpecification
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML document- Returns:
- a
ResultSpecification
object 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:XMLParser
Parses a ResultSpecification from an XML input stream.- Specified by:
parseResultSpecification
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML documentaOptions
- option settings- Returns:
- a
ResultSpecification
object 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:XMLParser
Parses a CasConsumerDescription from an XML input stream.- Specified by:
parseCasConsumerDescription
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML document- Returns:
- a
CasConsumerDescription
object 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:XMLParser
Parses a CasConsumerDescription from an XML input stream.- Specified by:
parseCasConsumerDescription
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML documentaOptions
- option settings- Returns:
- a
CasConsumerDescription
object 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:XMLParser
Parses a CasInitializerDescription from an XML input stream.- Specified by:
parseCasInitializerDescription
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML document- Returns:
- a
CasInitializerDescription
object 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:XMLParser
Parses a CasInitializerDescription from an XML input stream.- Specified by:
parseCasInitializerDescription
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML documentaOptions
- option settings- Returns:
- a
CasInitializerDescription
object 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:XMLParser
Parses a CollectionReaderDescription from an XML input stream.- Specified by:
parseCollectionReaderDescription
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML document- Returns:
- a
CollectionReaderDescription
object 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:XMLParser
Parses a CollectionReaderDescription from an XML input stream.- Specified by:
parseCollectionReaderDescription
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML documentaOptions
- option settings- Returns:
- a
CollectionReaderDescription
object 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:XMLParser
Parses a CpeDescription from an XML input stream.NOTE: the option settings
XMLParser.ParsingOptions
are not currently available for parsing CpeDescriptions, because they use a different parsing mechanism than the other specifier types.- Specified by:
parseCpeDescription
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML document- Returns:
- a
cpeDescription
object 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:XMLParser
Parses a TypePriorities declaration from an XML input stream.- Specified by:
parseTypePriorities
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML document- Returns:
- a
TypePriorities
object 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:XMLParser
Parses a TypePriorities declaration from an XML input stream.- Specified by:
parseTypePriorities
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML documentaOptions
- option settings- Returns:
- a
TypePriorities
object 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:XMLParser
Parses a TypeSystemDescription from an XML input stream.- Specified by:
parseTypeSystemDescription
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML document- Returns:
- a
TypeSystemDescription
object 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:XMLParser
Parses a TypeSystemDescription from an XML input stream.- Specified by:
parseTypeSystemDescription
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML documentaOptions
- option settings- Returns:
- a
TypeSystemDescription
object 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:XMLParser
Parses a FsIndexCollection from an XML input stream.- Specified by:
parseFsIndexCollection
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML document- Returns:
- a
FsIndexCollection
object 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:XMLParser
Parses a FsIndexCollection from an XML input stream.- Specified by:
parseFsIndexCollection
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML documentaOptions
- option settings- Returns:
- a
FsIndexCollection
object 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:XMLParser
Parses a ResourceManagerConfiguration from an XML input stream.- Specified by:
parseResourceManagerConfiguration
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML document- Returns:
- a
ResourceManagerConfiguration
object 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:XMLParser
Parses a ResourceManagerConfiguration from an XML input stream.- Specified by:
parseResourceManagerConfiguration
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML documentaOptions
- option settings- Returns:
- a
ResourceManagerConfiguration
object 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:XMLParser
Parses a FlowControllerDescription from an XML input stream.- Specified by:
parseFlowControllerDescription
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML document- Returns:
- a
FlowControllerDescription
object 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:XMLParser
Parses a FlowControllerDescription from an XML input stream.- Specified by:
parseFlowControllerDescription
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML documentaOptions
- option settings- Returns:
- a
FlowControllerDescription
object 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:XMLParser
Parses a CustomResourceSpecifier from an XML input stream.- Specified by:
parseCustomResourceSpecifier
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML document- Returns:
- a
CustomResourceSpecifier
object 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:XMLParser
Parses a CustomResourceSpecifier from an XML input stream.- Specified by:
parseCustomResourceSpecifier
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML documentaOptions
- option settings- Returns:
- a
CustomResourceSpecifier
object 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:XMLParser
Parses a PearSpecifier from an XML input stream.- Specified by:
parsePearSpecifier
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML document- Returns:
- a
PearSpecifier
object 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:XMLParser
Parses a PearSpecifier from an XML input stream.- Specified by:
parsePearSpecifier
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML documentaOptions
- option settings- Returns:
- a
PearSpecifier
object 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:XMLParser
Parses an IndexBuildSpecification from an XML input stream.- Specified by:
parseIndexBuildSpecification
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML document- Returns:
- an
IndexBuildSpecification
object 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:XMLParser
Parses an IndexBuildSpecification from an XML input stream.- Specified by:
parseIndexBuildSpecification
in interfaceXMLParser
- Parameters:
aInput
- the input source from which to read the XML documentaOptions
- option settings- Returns:
- an
IndexBuildSpecification
object 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:
addMapping
in interfaceXMLParser
- Parameters:
aElementName
- the name of an XML elementaClassName
- the name of a Class of object to be built. This class must implementXMLizable
and have a zero-argument constructor.- Throws:
ClassNotFoundException
- if the class named byaClassName
could not be foundUIMA_IllegalArgumentException
- if the class named byaClassName
does not implementXMLIzable
. @
-
newSaxDeserializer
Description copied from interface:XMLParser
Creates a newSaxDeserializer
object, which implements the SAXContentHandler
interface and can be used to deserialize anXMLizable
object 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 theparse
methods on this interface.The SAX deserializer returned my this method will expand XIncludes but will not do schema validation.
- Specified by:
newSaxDeserializer
in interfaceXMLParser
- Returns:
- an object that implements
ContentHandler
and can be used to deserialize anXMLizable
object from SAX events. - See Also:
-
newSaxDeserializer
Description copied from interface:XMLParser
Creates a newSaxDeserializer
.- Specified by:
newSaxDeserializer
in interfaceXMLParser
- Parameters:
aOptions
- option settings- Returns:
- an object that implements
ContentHandler
and can be used to deserialize anXMLizable
object from SAX events. - See Also:
-