XMLParser.ParsingOptions
Modifier and Type | Field and Description |
---|---|
protected static XMLParser.ParsingOptions |
DEFAULT_PARSING_OPTIONS |
protected Map<String,Class<? extends XMLizable>> |
mElementToClassMap
Map from XML element names to Class objects.
|
protected boolean |
mSchemaValidationEnabled
Whether schema validation is enabled.
|
RESOURCE_SPECIFIER_NAMESPACE, RESOURCE_SPECIFIER_SCHEMA_NAME
Constructor and Description |
---|
XMLParser_impl()
Creates a new XMLParser_impl.
|
Modifier and Type | Method and Description |
---|---|
void |
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.
|
XMLizable |
buildObject(Element aElement)
Builds an object from its XML DOM representation.
|
XMLizable |
buildObject(Element aElement,
XMLParser.ParsingOptions aOptions)
Builds an object from its XML DOM representation.
|
Object |
buildObjectOrPrimitive(Element aElement,
XMLParser.ParsingOptions aOptions)
Builds an object from its XML DOM representation.
|
void |
enableSchemaValidation(boolean aEnable)
Enables or disables XML schema validation.
|
SaxDeserializer |
newSaxDeserializer()
Creates a new
SaxDeserializer object, which implements the SAX
ContentHandler interface and can be used to deserialize an
XMLizable object from the events sent from a SAX parser. |
SaxDeserializer |
newSaxDeserializer(XMLParser.ParsingOptions aOptions)
Creates a new
SaxDeserializer . |
XMLizable |
parse(XMLInputSource aInput)
Parses an XML input stream and produces an object.
|
XMLizable |
parse(XMLInputSource aInput,
String aNamespaceForSchema,
URL aSchemaUrl)
Parses an XML input stream and produces an object.
|
XMLizable |
parse(XMLInputSource aInput,
String aNamespaceForSchema,
URL aSchemaUrl,
XMLParser.ParsingOptions aOptions)
Parses an XML input stream and produces an object.
|
XMLizable |
parse(XMLInputSource aInput,
XMLParser.ParsingOptions aOptions)
Parses an XML input stream and produces an object.
|
AnalysisEngineDescription |
parseAnalysisEngineDescription(XMLInputSource aInput)
Parses a AnalysisEngineDescription from an XML input stream.
|
AnalysisEngineDescription |
parseAnalysisEngineDescription(XMLInputSource aInput,
XMLParser.ParsingOptions aOptions)
Parses a AnalysisEngineDescription from an XML input stream.
|
CasConsumerDescription |
parseCasConsumerDescription(XMLInputSource aInput)
Parses a CasConsumerDescription from an XML input stream.
|
CasConsumerDescription |
parseCasConsumerDescription(XMLInputSource aInput,
XMLParser.ParsingOptions aOptions)
Parses a CasConsumerDescription from an XML input stream.
|
CasInitializerDescription |
parseCasInitializerDescription(XMLInputSource aInput)
Deprecated.
|
CasInitializerDescription |
parseCasInitializerDescription(XMLInputSource aInput,
XMLParser.ParsingOptions aOptions)
Deprecated.
|
CollectionReaderDescription |
parseCollectionReaderDescription(XMLInputSource aInput)
Parses a CollectionReaderDescription from an XML input stream.
|
CollectionReaderDescription |
parseCollectionReaderDescription(XMLInputSource aInput,
XMLParser.ParsingOptions aOptions)
Parses a CollectionReaderDescription from an XML input stream.
|
CpeDescription |
parseCpeDescription(XMLInputSource aInput)
Parses a CpeDescription from an XML input stream.
|
CustomResourceSpecifier |
parseCustomResourceSpecifier(XMLInputSource aInput)
Parses a CustomResourceSpecifier from an XML input stream.
|
CustomResourceSpecifier |
parseCustomResourceSpecifier(XMLInputSource aInput,
XMLParser.ParsingOptions aOptions)
Parses a CustomResourceSpecifier from an XML input stream.
|
FlowControllerDescription |
parseFlowControllerDescription(XMLInputSource aInput)
Parses a FlowControllerDescription from an XML input stream.
|
FlowControllerDescription |
parseFlowControllerDescription(XMLInputSource aInput,
XMLParser.ParsingOptions aOptions)
Parses a FlowControllerDescription from an XML input stream.
|
FsIndexCollection |
parseFsIndexCollection(XMLInputSource aInput)
Parses a FsIndexCollection from an XML input stream.
|
FsIndexCollection |
parseFsIndexCollection(XMLInputSource aInput,
XMLParser.ParsingOptions aOptions)
Parses a FsIndexCollection from an XML input stream.
|
IndexBuildSpecification |
parseIndexBuildSpecification(XMLInputSource aInput)
Parses an IndexBuildSpecification from an XML input stream.
|
IndexBuildSpecification |
parseIndexBuildSpecification(XMLInputSource aInput,
XMLParser.ParsingOptions aOptions)
Parses an IndexBuildSpecification from an XML input stream.
|
PearSpecifier |
parsePearSpecifier(XMLInputSource aInput)
Parses a PearSpecifier from an XML input stream.
|
PearSpecifier |
parsePearSpecifier(XMLInputSource aInput,
XMLParser.ParsingOptions aOptions)
Parses a PearSpecifier from an XML input stream.
|
ResourceManagerConfiguration |
parseResourceManagerConfiguration(XMLInputSource aInput)
Parses a ResourceManagerConfiguration from an XML input stream.
|
ResourceManagerConfiguration |
parseResourceManagerConfiguration(XMLInputSource aInput,
XMLParser.ParsingOptions aOptions)
Parses a ResourceManagerConfiguration from an XML input stream.
|
ResourceMetaData |
parseResourceMetaData(XMLInputSource aInput)
Parses a ResourceMetaData object from an XML input stream.
|
ResourceMetaData |
parseResourceMetaData(XMLInputSource aInput,
XMLParser.ParsingOptions aOptions)
Parses a ResourceMetaData object from an XML input stream.
|
ResourceSpecifier |
parseResourceSpecifier(XMLInputSource aInput)
Parses a ResourceSpecifier from an XML input stream.
|
ResourceSpecifier |
parseResourceSpecifier(XMLInputSource aInput,
XMLParser.ParsingOptions aOptions)
Parses a ResourceSpecifier from an XML input stream.
|
ResultSpecification |
parseResultSpecification(XMLInputSource aInput)
Parses a ResultSpecification from an XML input stream.
|
ResultSpecification |
parseResultSpecification(XMLInputSource aInput,
XMLParser.ParsingOptions aOptions)
Parses a ResultSpecification from an XML input stream.
|
TaeDescription |
parseTaeDescription(XMLInputSource aInput)
Deprecated.
since v2.0
|
TaeDescription |
parseTaeDescription(XMLInputSource aInput,
XMLParser.ParsingOptions aOptions)
Deprecated.
since v2.0
|
TypePriorities |
parseTypePriorities(XMLInputSource aInput)
Parses a TypePriorities declaration from an XML input stream.
|
TypePriorities |
parseTypePriorities(XMLInputSource aInput,
XMLParser.ParsingOptions aOptions)
Parses a TypePriorities declaration from an XML input stream.
|
TypeSystemDescription |
parseTypeSystemDescription(XMLInputSource aInput)
Parses a TypeSystemDescription from an XML input stream.
|
TypeSystemDescription |
parseTypeSystemDescription(XMLInputSource aInput,
XMLParser.ParsingOptions aOptions)
Parses a TypeSystemDescription from an XML input stream.
|
URISpecifier |
parseURISpecifier(XMLInputSource aInput)
Parses a URISpecifier from an XML input stream.
|
URISpecifier |
parseURISpecifier(XMLInputSource aInput,
XMLParser.ParsingOptions aOptions)
Parses a URISpecifier from an XML input stream.
|
protected Map<String,Class<? extends XMLizable>> mElementToClassMap
protected boolean mSchemaValidationEnabled
protected static final XMLParser.ParsingOptions DEFAULT_PARSING_OPTIONS
public XMLParser_impl() throws ParserConfigurationException
ParserConfigurationException
- if the underlying XML parser could not be constructedpublic void enableSchemaValidation(boolean aEnable)
XMLParser
enableSchemaValidation
in interface XMLParser
aEnable
- true to enable validation, false to disable validationXMLParser.enableSchemaValidation(boolean)
public XMLizable parse(XMLInputSource aInput, String aNamespaceForSchema, URL aSchemaUrl, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
parse
in interface XMLParser
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 settingsXMLizable
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid objectpublic XMLizable parse(XMLInputSource aInput, String aNamespaceForSchema, URL aSchemaUrl) throws InvalidXMLException
parse
in interface XMLParser
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.XMLizable
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid objectpublic XMLizable parse(XMLInputSource aInput) throws InvalidXMLException
parse
in interface XMLParser
aInput
- the input source from which to read the XML documentXMLizable
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid objectpublic XMLizable parse(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
XMLParser
parse
in interface XMLParser
aInput
- the input source from which to read the XML documentaOptions
- option settingsXMLizable
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid objectpublic XMLizable buildObject(Element aElement) throws InvalidXMLException
buildObject
in interface XMLParser
aElement
- a DOM ElementXMLizable
object constructed from the DOM elementInvalidXMLException
- if the XML element does not specify a valid objectpublic XMLizable buildObject(Element aElement, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
buildObject
in interface XMLParser
aElement
- a DOM ElementaOptions
- option settingsXMLizable
object constructed from the DOM elementInvalidXMLException
- if the XML element does not specify a valid objectpublic Object buildObjectOrPrimitive(Element aElement, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
XMLParser
XMLizable.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
.
buildObjectOrPrimitive
in interface XMLParser
aElement
- a DOM ElementaOptions
- option settingsXMLizable
, String
, or one of the primitive type wrapper objects (e.g.
Integer
, Float
, Boolean
).InvalidXMLException
- if the XML element does not specify a valid objectpublic ResourceSpecifier parseResourceSpecifier(XMLInputSource aInput) throws InvalidXMLException
XMLParser.RESOURCE_SPECIFIER_SCHEMA_NAME
if it can be found in the classpath.parseResourceSpecifier
in interface XMLParser
aInput
- the input source from which to read the XML documentResourceSpecifier
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid ResourceSpecifierpublic ResourceSpecifier parseResourceSpecifier(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
XMLParser.RESOURCE_SPECIFIER_SCHEMA_NAME
if it can be found in the classpath.parseResourceSpecifier
in interface XMLParser
aInput
- the input source from which to read the XML documentaOptions
- option settingsResourceSpecifier
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid ResourceSpecifierpublic ResourceMetaData parseResourceMetaData(XMLInputSource aInput) throws InvalidXMLException
XMLParser.RESOURCE_SPECIFIER_SCHEMA_NAME
if it can be found in the classpath.parseResourceMetaData
in interface XMLParser
aInput
- the input source from which to read the XML documentResourceMetaData
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid ResourceSpecifierpublic ResourceMetaData parseResourceMetaData(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
XMLParser.RESOURCE_SPECIFIER_SCHEMA_NAME
if it can be found in the classpath.parseResourceMetaData
in interface XMLParser
aInput
- the input source from which to read the XML documentaOptions
- option settingsResourceMetaData
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid ResourceSpecifierpublic URISpecifier parseURISpecifier(XMLInputSource aInput) throws InvalidXMLException
XMLParser.RESOURCE_SPECIFIER_SCHEMA_NAME
if it can be found in the classpath.parseURISpecifier
in interface XMLParser
aInput
- the input source from which to read the XML documentURISpecifier
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid URISpecifierpublic URISpecifier parseURISpecifier(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
XMLParser.RESOURCE_SPECIFIER_SCHEMA_NAME
if it can be found in the classpath.parseURISpecifier
in interface XMLParser
aInput
- the input source from which to read the XML documentaOptions
- option settingsURISpecifier
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid URISpecifierpublic AnalysisEngineDescription parseAnalysisEngineDescription(XMLInputSource aInput) throws InvalidXMLException
XMLParser.RESOURCE_SPECIFIER_SCHEMA_NAME
if it can be found in the classpath.parseAnalysisEngineDescription
in interface XMLParser
aInput
- the input source from which to read the XML documentAnalysisEngineDescription
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid AnalysisEngineDescriptionpublic AnalysisEngineDescription parseAnalysisEngineDescription(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
XMLParser.RESOURCE_SPECIFIER_SCHEMA_NAME
if it can be found in the classpath.parseAnalysisEngineDescription
in interface XMLParser
aInput
- the input source from which to read the XML documentaOptions
- option settingsAnalysisEngineDescription
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid AnalysisEngineDescription@Deprecated public TaeDescription parseTaeDescription(XMLInputSource aInput) throws InvalidXMLException
XMLParser.RESOURCE_SPECIFIER_SCHEMA_NAME
if it can be found in the classpath.parseTaeDescription
in interface XMLParser
aInput
- the input source from which to read the XML documentTaeDescription
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid TaeDescription@Deprecated public TaeDescription parseTaeDescription(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
XMLParser.RESOURCE_SPECIFIER_SCHEMA_NAME
if it can be found in the classpath.parseTaeDescription
in interface XMLParser
aInput
- the input source from which to read the XML documentaOptions
- option settingsTaeDescription
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid TaeDescriptionpublic ResultSpecification parseResultSpecification(XMLInputSource aInput) throws InvalidXMLException
XMLParser
parseResultSpecification
in interface XMLParser
aInput
- the input source from which to read the XML documentResultSpecification
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid ResultSpecificationXMLParser.parseResultSpecification(org.apache.uima.util.XMLInputSource)
public ResultSpecification parseResultSpecification(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
XMLParser
parseResultSpecification
in interface XMLParser
aInput
- the input source from which to read the XML documentaOptions
- option settingsResultSpecification
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid ResultSpecificationXMLParser.parseResultSpecification(org.apache.uima.util.XMLInputSource)
public CasConsumerDescription parseCasConsumerDescription(XMLInputSource aInput) throws InvalidXMLException
XMLParser
parseCasConsumerDescription
in interface XMLParser
aInput
- the input source from which to read the XML documentCasConsumerDescription
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid CasConsumerDescriptionXMLParser.parseCasConsumerDescription(org.apache.uima.util.XMLInputSource)
public CasConsumerDescription parseCasConsumerDescription(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
XMLParser
parseCasConsumerDescription
in interface XMLParser
aInput
- the input source from which to read the XML documentaOptions
- option settingsCasConsumerDescription
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid CasConsumerDescriptionXMLParser.parseCasConsumerDescription(org.apache.uima.util.XMLInputSource)
@Deprecated public CasInitializerDescription parseCasInitializerDescription(XMLInputSource aInput) throws InvalidXMLException
XMLParser
parseCasInitializerDescription
in interface XMLParser
aInput
- the input source from which to read the XML documentCasInitializerDescription
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid CasInitializerDescription@Deprecated public CasInitializerDescription parseCasInitializerDescription(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
XMLParser
parseCasInitializerDescription
in interface XMLParser
aInput
- the input source from which to read the XML documentaOptions
- option settingsCasInitializerDescription
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid CasInitializerDescriptionpublic CollectionReaderDescription parseCollectionReaderDescription(XMLInputSource aInput) throws InvalidXMLException
XMLParser
parseCollectionReaderDescription
in interface XMLParser
aInput
- the input source from which to read the XML documentCollectionReaderDescription
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid CollectionReaderDescriptionpublic CollectionReaderDescription parseCollectionReaderDescription(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
XMLParser
parseCollectionReaderDescription
in interface XMLParser
aInput
- the input source from which to read the XML documentaOptions
- option settingsCollectionReaderDescription
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid CollectionReaderDescriptionpublic CpeDescription parseCpeDescription(XMLInputSource aInput) throws InvalidXMLException
XMLParser
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.
parseCpeDescription
in interface XMLParser
aInput
- the input source from which to read the XML documentcpeDescription
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid IndexingSpecificationpublic TypePriorities parseTypePriorities(XMLInputSource aInput) throws InvalidXMLException
XMLParser
parseTypePriorities
in interface XMLParser
aInput
- the input source from which to read the XML documentTypePriorities
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid TypePrioritiespublic TypePriorities parseTypePriorities(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
XMLParser
parseTypePriorities
in interface XMLParser
aInput
- the input source from which to read the XML documentaOptions
- option settingsTypePriorities
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid TypePrioritiespublic TypeSystemDescription parseTypeSystemDescription(XMLInputSource aInput) throws InvalidXMLException
XMLParser
parseTypeSystemDescription
in interface XMLParser
aInput
- the input source from which to read the XML documentTypeSystemDescription
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid TypeSystemDescriptionpublic TypeSystemDescription parseTypeSystemDescription(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
XMLParser
parseTypeSystemDescription
in interface XMLParser
aInput
- the input source from which to read the XML documentaOptions
- option settingsTypeSystemDescription
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid TypeSystemDescriptionpublic FsIndexCollection parseFsIndexCollection(XMLInputSource aInput) throws InvalidXMLException
XMLParser
parseFsIndexCollection
in interface XMLParser
aInput
- the input source from which to read the XML documentFsIndexCollection
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid FsIndexCollectionpublic FsIndexCollection parseFsIndexCollection(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
XMLParser
parseFsIndexCollection
in interface XMLParser
aInput
- the input source from which to read the XML documentaOptions
- option settingsFsIndexCollection
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid FsIndexCollectionpublic ResourceManagerConfiguration parseResourceManagerConfiguration(XMLInputSource aInput) throws InvalidXMLException
XMLParser
parseResourceManagerConfiguration
in interface XMLParser
aInput
- the input source from which to read the XML documentResourceManagerConfiguration
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid
ResourceManagerConfigurationpublic ResourceManagerConfiguration parseResourceManagerConfiguration(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
XMLParser
parseResourceManagerConfiguration
in interface XMLParser
aInput
- the input source from which to read the XML documentaOptions
- option settingsResourceManagerConfiguration
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid
ResourceManagerConfigurationpublic FlowControllerDescription parseFlowControllerDescription(XMLInputSource aInput) throws InvalidXMLException
XMLParser
parseFlowControllerDescription
in interface XMLParser
aInput
- the input source from which to read the XML documentFlowControllerDescription
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid FlowControllerDescriptionpublic FlowControllerDescription parseFlowControllerDescription(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
XMLParser
parseFlowControllerDescription
in interface XMLParser
aInput
- the input source from which to read the XML documentaOptions
- option settingsFlowControllerDescription
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid FlowControllerDescriptionpublic CustomResourceSpecifier parseCustomResourceSpecifier(XMLInputSource aInput) throws InvalidXMLException
XMLParser
parseCustomResourceSpecifier
in interface XMLParser
aInput
- the input source from which to read the XML documentCustomResourceSpecifier
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid CustomResourceSpecifierpublic CustomResourceSpecifier parseCustomResourceSpecifier(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
XMLParser
parseCustomResourceSpecifier
in interface XMLParser
aInput
- the input source from which to read the XML documentaOptions
- option settingsCustomResourceSpecifier
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid CustomResourceSpecifierpublic PearSpecifier parsePearSpecifier(XMLInputSource aInput) throws InvalidXMLException
XMLParser
parsePearSpecifier
in interface XMLParser
aInput
- the input source from which to read the XML documentPearSpecifier
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid PearSpecifierpublic PearSpecifier parsePearSpecifier(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
XMLParser
parsePearSpecifier
in interface XMLParser
aInput
- the input source from which to read the XML documentaOptions
- option settingsPearSpecifier
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid PearSpecifierpublic IndexBuildSpecification parseIndexBuildSpecification(XMLInputSource aInput) throws InvalidXMLException
XMLParser
parseIndexBuildSpecification
in interface XMLParser
aInput
- the input source from which to read the XML documentIndexBuildSpecification
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid IndexBuildSpecificationpublic IndexBuildSpecification parseIndexBuildSpecification(XMLInputSource aInput, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
XMLParser
parseIndexBuildSpecification
in interface XMLParser
aInput
- the input source from which to read the XML documentaOptions
- option settingsIndexBuildSpecification
object constructed from the XML documentInvalidXMLException
- if the input XML is not valid or does not specify a valid IndexBuildSpecificationpublic void addMapping(String aElementName, String aClassName) throws ClassNotFoundException
addMapping
in interface XMLParser
aElementName
- the name of an XML elementaClassName
- the name of a Class of object to be built. This class must implement XMLizable
and have a zero-argument constructor.ClassNotFoundException
- if the class named by aClassName
could not be foundUIMA_IllegalArgumentException
- if the class named by aClassName
does not implement
XMLIzable
. @public SaxDeserializer newSaxDeserializer()
XMLParser
SaxDeserializer
object, which implements the SAX
ContentHandler
interface and can be used to deserialize an
XMLizable
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 the parse
methods on this interface.
The SAX deserializer returned my this method will expand XIncludes but will not do schema validation.
newSaxDeserializer
in interface XMLParser
ContentHandler
and can be used to
deserialize an XMLizable
object from SAX events.XMLParser.newSaxDeserializer()
public SaxDeserializer newSaxDeserializer(XMLParser.ParsingOptions aOptions)
XMLParser
SaxDeserializer
.newSaxDeserializer
in interface XMLParser
aOptions
- option settingsContentHandler
and can be used to
deserialize an XMLizable
object from SAX events.XMLParser.newSaxDeserializer(org.apache.uima.util.XMLParser.ParsingOptions)
Copyright © 2006–2021 The Apache Software Foundation. All rights reserved.