org.apache.uima.util.impl

## Class XMLParser_impl

- java.lang.Object
- - org.apache.uima.util.impl.XMLParser_impl

- All Implemented Interfaces:
    XMLParser

      public class XMLParser_impl
      extends Object
      implements XMLParser

  Reference implementation of `XMLParser`.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.uima.util.XMLParser

      `XMLParser.ParsingOptions`

  - ### Field Summary

    Fields
    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.

    - ### Fields inherited from interface org.apache.uima.util.XMLParser

      `RESOURCE_SPECIFIER_NAMESPACE, RESOURCE_SPECIFIER_SCHEMA_NAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XMLParser_impl()` Creates a new XMLParser_impl.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### mElementToClassMap

          protected Map<String,Class<? extends XMLizable>> mElementToClassMap

      Map from XML element names to Class objects.

    - #### mSchemaValidationEnabled

          protected boolean mSchemaValidationEnabled

      Whether schema validation is enabled.

    - #### DEFAULT_PARSING_OPTIONS

          protected static final XMLParser.ParsingOptions DEFAULT_PARSING_OPTIONS

  - ### Constructor Detail

    - #### XMLParser_impl

          public XMLParser_impl()
                         throws ParserConfigurationException

      Creates a new XMLParser_impl.
      Throws:
        `ParserConfigurationException` - if the underlying XML parser could not be constructed

  - ### Method Detail

    - #### enableSchemaValidation

          public void enableSchemaValidation(boolean aEnable)

      Description copied from interface: `XMLParser`
      Enables or disables XML schema validation.
      Specified by:
        `enableSchemaValidation` in interface `XMLParser`
      Parameters:
        `aEnable` - true to enable validation, false to disable validation
      See Also:
        `XMLParser.enableSchemaValidation(boolean)`

    - #### 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 interface `XMLParser`
      Parameters:
        `aInput` - the input source from which to read the XML document
        `aNamespaceForSchema` - 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 interface `XMLParser`
      Parameters:
        `aInput` - the input source from which to read the XML document
        `aNamespaceForSchema` - 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

          public XMLizable parse(XMLInputSource aInput)
                          throws InvalidXMLException

      Parses an XML input stream and produces an object. No schema validation will be done.
      Specified by:
        `parse` in interface `XMLParser`
      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 interface `XMLParser`
      Parameters:
        `aInput` - the input source from which to read the XML document
        `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

    - #### buildObject

          public XMLizable buildObject(Element aElement)
                                throws InvalidXMLException

      Builds an object from its XML DOM representation.
      Specified by:
        `buildObject` in interface `XMLParser`
      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 interface `XMLParser`
      Parameters:
        `aElement` - a DOM Element
        `aOptions` - 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 a `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`.

      Specified by:
        `buildObjectOrPrimitive` in interface `XMLParser`
      Parameters:
        `aElement` - a DOM Element
        `aOptions` - 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

          public ResourceSpecifier parseResourceSpecifier(XMLInputSource aInput)
                                                   throws InvalidXMLException

      Parses a ResourceSpecifier from an XML input stream. XML schema validation will be done against the `XMLParser.RESOURCE_SPECIFIER_SCHEMA_NAME` if it can be found in the classpath.
      Specified by:
        `parseResourceSpecifier` in interface `XMLParser`
      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 the `XMLParser.RESOURCE_SPECIFIER_SCHEMA_NAME` if it can be found in the classpath.
      Specified by:
        `parseResourceSpecifier` in interface `XMLParser`
      Parameters:
        `aInput` - the input source from which to read the XML document
        `aOptions` - 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

          public ResourceMetaData parseResourceMetaData(XMLInputSource aInput)
                                                 throws InvalidXMLException

      Parses a ResourceMetaData object from an XML input stream. XML schema validation will be done against the `XMLParser.RESOURCE_SPECIFIER_SCHEMA_NAME` if it can be found in the classpath.
      Specified by:
        `parseResourceMetaData` in interface `XMLParser`
      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 the `XMLParser.RESOURCE_SPECIFIER_SCHEMA_NAME` if it can be found in the classpath.
      Specified by:
        `parseResourceMetaData` in interface `XMLParser`
      Parameters:
        `aInput` - the input source from which to read the XML document
        `aOptions` - 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

          public URISpecifier parseURISpecifier(XMLInputSource aInput)
                                         throws InvalidXMLException

      Parses a URISpecifier from an XML input stream. XML schema validation will be done against the `XMLParser.RESOURCE_SPECIFIER_SCHEMA_NAME` if it can be found in the classpath.
      Specified by:
        `parseURISpecifier` in interface `XMLParser`
      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 the `XMLParser.RESOURCE_SPECIFIER_SCHEMA_NAME` if it can be found in the classpath.
      Specified by:
        `parseURISpecifier` in interface `XMLParser`
      Parameters:
        `aInput` - the input source from which to read the XML document
        `aOptions` - 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 the `XMLParser.RESOURCE_SPECIFIER_SCHEMA_NAME` if it can be found in the classpath.
      Specified by:
        `parseAnalysisEngineDescription` in interface `XMLParser`
      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 the `XMLParser.RESOURCE_SPECIFIER_SCHEMA_NAME` if it can be found in the classpath.
      Specified by:
        `parseAnalysisEngineDescription` in interface `XMLParser`
      Parameters:
        `aInput` - the input source from which to read the XML document
        `aOptions` - 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.0
      Parses a TaeDescription from an XML input stream. XML schema validation will be done against the `XMLParser.RESOURCE_SPECIFIER_SCHEMA_NAME` if it can be found in the classpath.
      Specified by:
        `parseTaeDescription` in interface `XMLParser`
      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.0
      Parses a TaeDescription from an XML input stream. XML schema validation will be done against the `XMLParser.RESOURCE_SPECIFIER_SCHEMA_NAME` if it can be found in the classpath.
      Specified by:
        `parseTaeDescription` in interface `XMLParser`
      Parameters:
        `aInput` - the input source from which to read the XML document
        `aOptions` - 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 interface `XMLParser`
      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:
        `XMLParser.parseResultSpecification(org.apache.uima.util.XMLInputSource)`

    - #### 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 interface `XMLParser`
      Parameters:
        `aInput` - the input source from which to read the XML document
        `aOptions` - 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:
        `XMLParser.parseResultSpecification(org.apache.uima.util.XMLInputSource)`

    - #### 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 interface `XMLParser`
      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:
        `XMLParser.parseCasConsumerDescription(org.apache.uima.util.XMLInputSource)`

    - #### 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 interface `XMLParser`
      Parameters:
        `aInput` - the input source from which to read the XML document
        `aOptions` - 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:
        `XMLParser.parseCasConsumerDescription(org.apache.uima.util.XMLInputSource)`

    - #### 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 interface `XMLParser`
      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 interface `XMLParser`
      Parameters:
        `aInput` - the input source from which to read the XML document
        `aOptions` - 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 interface `XMLParser`
      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 interface `XMLParser`
      Parameters:
        `aInput` - the input source from which to read the XML document
        `aOptions` - 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

          public CpeDescription parseCpeDescription(XMLInputSource aInput)
                                             throws InvalidXMLException

      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 interface `XMLParser`
      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

          public TypePriorities parseTypePriorities(XMLInputSource aInput)
                                             throws InvalidXMLException

      Description copied from interface: `XMLParser`
      Parses a TypePriorities declaration from an XML input stream.
      Specified by:
        `parseTypePriorities` in interface `XMLParser`
      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 interface `XMLParser`
      Parameters:
        `aInput` - the input source from which to read the XML document
        `aOptions` - 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 interface `XMLParser`
      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 interface `XMLParser`
      Parameters:
        `aInput` - the input source from which to read the XML document
        `aOptions` - 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

          public FsIndexCollection parseFsIndexCollection(XMLInputSource aInput)
                                                   throws InvalidXMLException

      Description copied from interface: `XMLParser`
      Parses a FsIndexCollection from an XML input stream.
      Specified by:
        `parseFsIndexCollection` in interface `XMLParser`
      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 interface `XMLParser`
      Parameters:
        `aInput` - the input source from which to read the XML document
        `aOptions` - 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 interface `XMLParser`
      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 interface `XMLParser`
      Parameters:
        `aInput` - the input source from which to read the XML document
        `aOptions` - 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 interface `XMLParser`
      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 interface `XMLParser`
      Parameters:
        `aInput` - the input source from which to read the XML document
        `aOptions` - 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 interface `XMLParser`
      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 interface `XMLParser`
      Parameters:
        `aInput` - the input source from which to read the XML document
        `aOptions` - 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

          public PearSpecifier parsePearSpecifier(XMLInputSource aInput)
                                           throws InvalidXMLException

      Description copied from interface: `XMLParser`
      Parses a PearSpecifier from an XML input stream.
      Specified by:
        `parsePearSpecifier` in interface `XMLParser`
      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 interface `XMLParser`
      Parameters:
        `aInput` - the input source from which to read the XML document
        `aOptions` - 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 interface `XMLParser`
      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 interface `XMLParser`
      Parameters:
        `aInput` - the input source from which to read the XML document
        `aOptions` - 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

          public void addMapping(String aElementName,
                                 String aClassName)
                          throws ClassNotFoundException

      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 interface `XMLParser`
      Parameters:
        `aElementName` - the name of an XML element
        `aClassName` - the name of a Class of object to be built. This class must implement `XMLizable` and have a zero-argument constructor.
      Throws:
        `ClassNotFoundException` - if the class named by `aClassName` could not be found
        `UIMA_IllegalArgumentException` - if the class named by `aClassName` does not implement `XMLIzable`. @

    - #### newSaxDeserializer

          public SaxDeserializer newSaxDeserializer()

      Description copied from interface: `XMLParser`
      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. 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.

      Specified by:
        `newSaxDeserializer` in interface `XMLParser`
      Returns:
        an object that implements `ContentHandler` and can be used to deserialize an `XMLizable` object from SAX events.
      See Also:
        `XMLParser.newSaxDeserializer()`

    - #### newSaxDeserializer

          public SaxDeserializer newSaxDeserializer(XMLParser.ParsingOptions aOptions)

      Description copied from interface: `XMLParser`
      Creates a new `SaxDeserializer`.
      Specified by:
        `newSaxDeserializer` in interface `XMLParser`
      Parameters:
        `aOptions` - option settings
      Returns:
        an object that implements `ContentHandler` and can be used to deserialize an `XMLizable` object from SAX events.
      See Also:
        `XMLParser.newSaxDeserializer(org.apache.uima.util.XMLParser.ParsingOptions)`

Copyright © 2006–2022 The Apache Software Foundation. All rights reserved.