org.apache.uima.analysis_engine.impl

## Class AnalysisEngineDescription_impl

- java.lang.Object
- - org.apache.uima.resource.metadata.impl.MetaDataObject_impl
  - - org.apache.uima.resource.impl.ResourceCreationSpecifier_impl
    - - org.apache.uima.analysis_engine.impl.AnalysisEngineDescription_impl

- All Implemented Interfaces:
    Serializable, Cloneable, AnalysisEngineDescription, MetaDataObject, ResourceCreationSpecifier, ResourceSpecifier, XMLizable
  Direct Known Subclasses:
    TaeDescription_impl

      public class AnalysisEngineDescription_impl
      extends ResourceCreationSpecifier_impl
      implements AnalysisEngineDescription

  Reference implementation of `AnalysisEngineDescription`. Note that this class contains two attributes of class Map, which are not supported by the default XML input/output routines. Therefore we override the `MetaDataObject_impl.writePropertyAsElement(PropertyXmlInfo, String)` and `MetaDataObject_impl.readPropertyValueFromXMLElement(PropertyXmlInfo, Element, XMLParser, XMLParser.ParsingOptions)` methods.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.uima.resource.metadata.impl.MetaDataObject_impl

      `MetaDataObject_impl.MetaDataAttr, MetaDataObject_impl.SerialContext, MetaDataObject_impl.Serializer`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected String` | `ELEM_DELEGATE_ANALYSIS_ENGINE_SPECIFIERS` Name of the "delegateAnalysisEngineSpecifiers" XML Element.
    `protected String` | `PROP_DELEGATE_ANALYSIS_ENGINE_SPECIFIERS` Name of the "delegateAnalysisEngineSpecifiers" property.
    `protected String` | `PROP_DELEGATE_ANALYSIS_ENGINE_SPECIFIERS_WITH_IMPORTS` Name of the "delegateAnalysisEngineSpecifiersWithImports" property.

    - ### Fields inherited from class org.apache.uima.resource.metadata.impl.MetaDataObject_impl

      `serialContext`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `buildFromXMLElement(Element aElement, XMLParser aParser, XMLParser.ParsingOptions aOptions)` Overridden to set default operational properties if they are not specified in descriptor.
    `protected boolean` | `capabilitiesContainSofa(String aSofaName, boolean aOutput)`
    `protected void` | `checkForInvalidParameterOverrides(ConfigurationParameter[] aParams, String aGroupName, ResourceManager aResourceManager)` Overrides`ResourceCreationSpecifier_impl.checkForInvalidParameterOverrides(ConfigurationParameter[], String, ResourceManager)` to validate parameter overrides in an aggregate AE.
    `Object` | `clone()` Creates a clone of this `MetaDataObject`.
    `void` | `doFullValidation()` Does full validation of this `ResourceCreationSpecifier`.
    `void` | `doFullValidation(ResourceManager aResourceManager)` Does full validation of this `ResourceCreationSpecifier`.
    `List<MetaDataObject_impl.MetaDataAttr>` | `getAdditionalAttributes()` Override this method to include additional attributes
    `Map<String,ResourceSpecifier>` | `getAllComponentSpecifiers(ResourceManager aResourceManager)` For an aggregate AnalysisEngine only, gets the ResourceSpecifiers of all components in this aggregate.
    `AnalysisEngineMetaData` | `getAnalysisEngineMetaData()` Retrieves the metadata that describes the AnalysisEngine.
    `String` | `getAnnotatorImplementationName()` For a primitive AnalysisEngine only, retrieves the name of the annotator implementation.
    `ResourceSpecifier` | `getComponentSpecifier(String key)` Gets the ResourceSpecifier of one a component of this aggregate, based on its key.
    `Map<String,ResourceSpecifier>` | `getDelegateAnalysisEngineSpecifiers()` For an aggregate AnalysisEngine only, retrieves a collection of `ResourceSpecifier`s that indicate which delegate AnalysisEngines comprise the aggregate.
    `Map<String,ResourceSpecifier>` | `getDelegateAnalysisEngineSpecifiers(ResourceManager aResourceManager)` For an aggregate AnalysisEngine only, retrieves a collection of `ResourceSpecifier`s that indicate which delegate AnalysisEngines comprise the aggregate.
    `Map<String,MetaDataObject>` | `getDelegateAnalysisEngineSpecifiersWithImports()` Retrieves a Map whose keys are string identifiers and whose values are the either `Import` or `ResourceSpecifier` objects.
    `FlowControllerDeclaration` | `getFlowControllerDeclaration()` For an aggregate AnalysisEngine only, gets the declaration of which FlowController should be used by the AnalysisEngine.
    `String` | `getFrameworkImplementation()` Gets the name of the AE framework implementation within which the Resource executes.
    `SofaMapping[]` | `getSofaMappings()`
    `protected XmlizationInfo` | `getXmlizationInfo()` To be implemented by subclasses to return information describing how to represent this object in XML.
    `protected static XmlizationInfo` | `getXmlizationInfoForClass()` Static method to get XmlizationInfo, used by subclasses to set up their own XmlizationInfo.
    `boolean` | `isPrimitive()` Retrieves whether the AnalysisEngine is primitive (consisting of one annotator), as opposed to aggregate (containing multiple delegate AnalysisEngines).
    `List<NameClassPair>` | `listAttributes()` Deprecated. never called anymore - getAdditionalAttributes called instead
    `protected void` | `readPropertyValueFromXMLElement(PropertyXmlInfo aPropXmlInfo, Element aElement, XMLParser aParser, XMLParser.ParsingOptions aOptions)` Overridden to handle XML import of the DelegateAnalysisEngineSpecifiers attribute.
    `protected void` | `resolveDelegateAnalysisEngineImports(Collection<String> aEnclosingAggregateAeUrls, ResourceManager aResourceManager, boolean aRecursive)` Resolves imports of delegate Analysis Engines.
    `protected void` | `resolveDelegateAnalysisEngineImports(ResourceManager aResourceManager, boolean aRecursive)` Resolves imports of delegate Analysis Engines.
    `void` | `resolveImports(Collection<String> aAlreadyImportedDelegateAeUrls, ResourceManager aResourceManager)` Resolves all import declarations in this AnalysisEngineDescription.
    `void` | `resolveImports(ResourceManager aResourceManager)` Resolves all import declarations in this AnalysisEngineDescription.
    `void` | `setAnnotatorImplementationName(String aImplementationName)` For a primitive AnalysisEngine only, sets the name of the annotator implementation.
    `void` | `setFlowControllerDeclaration(FlowControllerDeclaration aFlowControllerDeclaration)` For an aggregate AnalysisEngine only, sets the declaration of which FlowController should be used by the AnalysisEngine.
    `void` | `setFrameworkImplementation(String aFrameworkImplementation)` Sets the name of the AE framework implementation within which the `ResourceCreationSpecifier` executes.
    `void` | `setPrimitive(boolean aPrimitive)` Sets whether the AnalysisEngine is primitive (consisting of one annotator), as opposed to aggregate (containing multiple delegate AnalysisEngines).
    `void` | `setSofaMappings(SofaMapping[] aSofaMappings)`
    `void` | `toXML(ContentHandler aContentHandler, boolean aWriteDefaultNamespaceAttribute, boolean aPreserveDelegateAnalysisEngineImports)` Writes this object's XML representation by making calls on a SAX `ContentHandler`.
    `void` | `toXML(OutputStream aOutputStream, boolean aPreserveDelegateAnalysisEngineImports)` Writes this object's XML representation as a string in UTF-8 encoding.
    `void` | `toXML(Writer aWriter, boolean aPreserveDelegateAnalysisEngineImports)` Writes this object's XML representation as a string.
    `void` | `validate(ResourceManager aResourceManager)` Determines if the AnalysisEngineDescription is valid.
    `protected void` | `validateSofaMappings()` Validate SofA mappings and inputs/outputs for an aggregate AE.
    `protected void` | `writePropertyAsElement(PropertyXmlInfo aPropInfo, String aNamespace)` Overridden to handle XML export of the DelegateAnalysisEngineSpecifiers attribute.

    - ### Methods inherited from class org.apache.uima.resource.impl.ResourceCreationSpecifier_impl

      `checkForDuplicateParameterNames, getExternalResourceDependencies, getExternalResourceDependency, getImplementationName, getMetaData, getResourceManagerConfiguration, setExternalResourceDependencies, setImplementationName, setMetaData, setResourceManagerConfiguration, validate, validateConfigurationParameters`

    - ### Methods inherited from class org.apache.uima.resource.metadata.impl.MetaDataObject_impl

      `buildFromXMLElement, equals, getAttributeClass, getAttributeValue, getInfoset, getMatchingNode, getPropertyDescriptors, getPropertyXmlInfo, getRelativePathBase, getSerialContext, getSourceUrl, getSourceUrlString, getWrapperClass, getXMLAttributes, hashCode, isModifiable, readArrayPropertyValueFromXMLElement, readMapPropertyFromXml, readUnknownPropertyValueFromXMLElement, resolveSettings, setAttributeValue, setInfoset, setSourceUrl, setSourceUrlIfNull, toString, toXML, toXML, toXML, toXML, valueIsNullOrEmptyArray, writeArrayPropertyAsElement, writeMapPropertyToXml`

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

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.apache.uima.resource.ResourceCreationSpecifier

      `getExternalResourceDependencies, getExternalResourceDependency, getImplementationName, getMetaData, getResourceManagerConfiguration, setExternalResourceDependencies, setImplementationName, setMetaData, setResourceManagerConfiguration, validate`

    - ### Methods inherited from interface org.apache.uima.resource.metadata.MetaDataObject

      `equals, getAttributeValue, getSourceUrl, getSourceUrlString, isModifiable, setAttributeValue, setSourceUrl`

    - ### Methods inherited from interface org.apache.uima.util.XMLizable

      `buildFromXMLElement, toXML, toXML, toXML, toXML`

- - ### Field Detail

    - #### PROP_DELEGATE_ANALYSIS_ENGINE_SPECIFIERS

          protected final String PROP_DELEGATE_ANALYSIS_ENGINE_SPECIFIERS

      Name of the "delegateAnalysisEngineSpecifiers" property. Change this if interface changes.
      See Also:
        Constant Field Values

    - #### PROP_DELEGATE_ANALYSIS_ENGINE_SPECIFIERS_WITH_IMPORTS

          protected final String PROP_DELEGATE_ANALYSIS_ENGINE_SPECIFIERS_WITH_IMPORTS

      Name of the "delegateAnalysisEngineSpecifiersWithImports" property. Change this if interface changes.
      See Also:
        Constant Field Values

    - #### ELEM_DELEGATE_ANALYSIS_ENGINE_SPECIFIERS

          protected final String ELEM_DELEGATE_ANALYSIS_ENGINE_SPECIFIERS

      Name of the "delegateAnalysisEngineSpecifiers" XML Element. Change this if schema changes.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### AnalysisEngineDescription_impl

          public AnalysisEngineDescription_impl()

      Creates a new AnalysisEngineDescription_impl. Initializes the MetaData, DelegateAnalysisEngineSpecifiers, and ExternalResourcesRequired attributes.

  - ### Method Detail

    - #### getFrameworkImplementation

          public String getFrameworkImplementation()

      Description copied from interface: `ResourceCreationSpecifier`
      Gets the name of the AE framework implementation within which the Resource executes. The framework name for this implementation is given by `Constants.JAVA_FRAMEWORK_NAME`..
      Specified by:
        `getFrameworkImplementation` in interface `AnalysisEngineDescription`
      Specified by:
        `getFrameworkImplementation` in interface `ResourceCreationSpecifier`
      Overrides:
        `getFrameworkImplementation` in class `ResourceCreationSpecifier_impl`
      Returns:
        the framework implementation name
      See Also:
        `AnalysisEngineDescription.getFrameworkImplementation()`

    - #### setFrameworkImplementation

          public void setFrameworkImplementation(String aFrameworkImplementation)

      Description copied from interface: `ResourceCreationSpecifier`
      Sets the name of the AE framework implementation within which the `ResourceCreationSpecifier` executes. The framework name for this implementation is given by `Constants.JAVA_FRAMEWORK_NAME`..
      Specified by:
        `setFrameworkImplementation` in interface `AnalysisEngineDescription`
      Specified by:
        `setFrameworkImplementation` in interface `ResourceCreationSpecifier`
      Overrides:
        `setFrameworkImplementation` in class `ResourceCreationSpecifier_impl`
      Parameters:
        `aFrameworkImplementation` - the framework implementation name
      See Also:
        `AnalysisEngineDescription.setFrameworkImplementation(java.lang.String)`

    - #### isPrimitive

          public boolean isPrimitive()

      Description copied from interface: `AnalysisEngineDescription`
      Retrieves whether the AnalysisEngine is primitive (consisting of one annotator), as opposed to aggregate (containing multiple delegate AnalysisEngines).

      Some of the methods on this class apply only to one type of AnalysisEngine:
      `AnalysisEngineDescription.getAnnotatorImplementationName()` - primitive AnalysisEngine only
      `AnalysisEngineDescription.getDelegateAnalysisEngineSpecifiers()` - aggregate AnalysisEngine only
      `AnalysisEngineDescription.getFlowControllerDeclaration()` - aggregate AnalysisEngine only

      Specified by:
        `isPrimitive` in interface `AnalysisEngineDescription`
      Returns:
        true if and only if the AnalysisEngine is primitive
      See Also:
        `AnalysisEngineDescription.isPrimitive()`

    - #### setPrimitive

          public void setPrimitive(boolean aPrimitive)

      Description copied from interface: `AnalysisEngineDescription`
      Sets whether the AnalysisEngine is primitive (consisting of one annotator), as opposed to aggregate (containing multiple delegate AnalysisEngines).
      Specified by:
        `setPrimitive` in interface `AnalysisEngineDescription`
      Parameters:
        `aPrimitive` - true if and only if the AnalysisEngine is primitive
      See Also:
        `AnalysisEngineDescription.setPrimitive(boolean)`

    - #### getAnnotatorImplementationName

          public String getAnnotatorImplementationName()

      Description copied from interface: `AnalysisEngineDescription`
      For a primitive AnalysisEngine only, retrieves the name of the annotator implementation. For Java annotators, this will be a fully qualified Java class name.
      Specified by:
        `getAnnotatorImplementationName` in interface `AnalysisEngineDescription`
      Returns:
        the implementation name of the annotator. If the AnalysisEngine is aggregate, always returns `null`.
      See Also:
        `AnalysisEngineDescription.getAnnotatorImplementationName()`

    - #### setAnnotatorImplementationName

          public void setAnnotatorImplementationName(String aImplementationName)

      Description copied from interface: `AnalysisEngineDescription`
      For a primitive AnalysisEngine only, sets the name of the annotator implementation. For Java annotators, this must be a fully qualified Java class name.
      Specified by:
        `setAnnotatorImplementationName` in interface `AnalysisEngineDescription`
      Parameters:
        `aImplementationName` - the implementation name of the annotator.
      See Also:
        `AnalysisEngineDescription.setAnnotatorImplementationName(String)`

    - #### getDelegateAnalysisEngineSpecifiers

          public Map<String,ResourceSpecifier> getDelegateAnalysisEngineSpecifiers()
                                                                            throws InvalidXMLException

      Description copied from interface: `AnalysisEngineDescription`
      For an aggregate AnalysisEngine only, retrieves a collection of `ResourceSpecifier`s that indicate which delegate AnalysisEngines comprise the aggregate. Each `ResourceSpecifier` can either:
      1. completely describe how to build a AnalysisEngine instance
      2. describe how to locate a distributed AnalysisEngine service, for example a specific endpoint or a JNDI name

      This method returns an unmodifiable Map whose keys are string identifiers and whose values are the `ResourceSpecifier` objects. The string identifiers in this Map are to refer to the delegate AnalysisEngines from elsewhere in this `AnalysisEngineDescription`. (For example in the `FlowConstraints` description.)

      Note that the Map returned by this method will never contain `Import` objects -- they will always be resolved first. If you want to get access to the original Import objects, use `AnalysisEngineDescription.getDelegateAnalysisEngineSpecifiersWithImports()`. Also use that method if you want to be able to make changes to the Map.

      Specified by:
        `getDelegateAnalysisEngineSpecifiers` in interface `AnalysisEngineDescription`
      Returns:
        an unmodifiable Map with `String` keys and `ResourceSpecifier` values.
      Throws:
        `InvalidXMLException` - if import resolution failed
      See Also:
        `AnalysisEngineDescription.getDelegateAnalysisEngineSpecifiers()`

    - #### getDelegateAnalysisEngineSpecifiers

          public Map<String,ResourceSpecifier> getDelegateAnalysisEngineSpecifiers(ResourceManager aResourceManager)
                                                                            throws InvalidXMLException

      Description copied from interface: `AnalysisEngineDescription`
      For an aggregate AnalysisEngine only, retrieves a collection of `ResourceSpecifier`s that indicate which delegate AnalysisEngines comprise the aggregate. Each `ResourceSpecifier` can either:
      1. completely describe how to build a AnalysisEngine instance
      2. describe how to locate a distributed AnalysisEngine service, for example a specific endpoint or a JNDI name

      This method returns an unmodifiable Map whose keys are string identifiers and whose values are the `ResourceSpecifier` objects. The string identifiers in this Map are to refer to the delegate AnalysisEngines from elsewhere in this `AnalysisEngineDescription`. (For example in the `FlowConstraints` description.)

      Note that the Map returned by this method will never contain `Import` objects -- they will always be resolved first. If you want to get access to the original Import objects, use `AnalysisEngineDescription.getDelegateAnalysisEngineSpecifiersWithImports()`. Also use that method if you want to be able to make changes to the Map.

      Specified by:
        `getDelegateAnalysisEngineSpecifiers` in interface `AnalysisEngineDescription`
      Parameters:
        `aResourceManager` - the ResourceManager to use to get the datapath needed to resolve imports
      Returns:
        an unmodifiable Map with `String` keys and `ResourceSpecifier` values.
      Throws:
        `InvalidXMLException` - if import resolution failed
      See Also:
        `AnalysisEngineDescription.getDelegateAnalysisEngineSpecifiers()`

    - #### getDelegateAnalysisEngineSpecifiersWithImports

          public Map<String,MetaDataObject> getDelegateAnalysisEngineSpecifiersWithImports()

      Description copied from interface: `AnalysisEngineDescription`
      Retrieves a Map whose keys are string identifiers and whose values are the either `Import` or `ResourceSpecifier` objects. These indicate the delegate AnalysisEngines that comprise the aggregate.

      This is a direct representation of what is in the XML syntax for the descriptor. That is, if the XML had an <import> element, the Map will contain an `Import` object. If you do not want to deal with imports, use the `AnalysisEngineDescription.getDelegateAnalysisEngineSpecifiers()` method instead.

      Specified by:
        `getDelegateAnalysisEngineSpecifiersWithImports` in interface `AnalysisEngineDescription`
      Returns:
        a Map with `String` keys and `ResourceSpecifier` or `Import` objects as values. This Map may be modified to add or remove imports or specifiers.
      See Also:
        `AnalysisEngineDescription.getDelegateAnalysisEngineSpecifiersWithImports()`

    - #### getFlowControllerDeclaration

          public FlowControllerDeclaration getFlowControllerDeclaration()

      Description copied from interface: `AnalysisEngineDescription`
      For an aggregate AnalysisEngine only, gets the declaration of which FlowController should be used by the AnalysisEngine.
      Specified by:
        `getFlowControllerDeclaration` in interface `AnalysisEngineDescription`
      Returns:
        an object containing either an import of a ResourceSpecifier or a ResourceSpecifier itself. This specifier will be used to create the FlowController.

    - #### setFlowControllerDeclaration

          public void setFlowControllerDeclaration(FlowControllerDeclaration aFlowControllerDeclaration)

      Description copied from interface: `AnalysisEngineDescription`
      For an aggregate AnalysisEngine only, sets the declaration of which FlowController should be used by the AnalysisEngine.
      Specified by:
        `setFlowControllerDeclaration` in interface `AnalysisEngineDescription`
      Parameters:
        `aFlowControllerDeclaration` - an object containing either an import of a ResourceSpecifier or a ResourceSpecifier itself. This specifier will be used to create the FlowController.

    - #### getAllComponentSpecifiers

          public Map<String,ResourceSpecifier> getAllComponentSpecifiers(ResourceManager aResourceManager)
                                                                  throws InvalidXMLException

      Description copied from interface: `AnalysisEngineDescription`
      For an aggregate AnalysisEngine only, gets the ResourceSpecifiers of all components in this aggregate. This includes the FlowController as well as all of the component AnalysisEngines.

      This method returns an unmodifiable Map whose keys are string identifiers and whose values are the `ResourceSpecifier` objects. The string identifiers in this Map are to refer to the components from elsewhere in this aggregate descriptor, for example in configuration parameter overrides and resource bindings.

      Note that the Map returned by this method will never contain `Import` objects -- they will always be resolved first. If you want to get access to the original Import objects, use `AnalysisEngineDescription.getDelegateAnalysisEngineSpecifiersWithImports()` and `AnalysisEngineDescription.getFlowControllerDeclaration()`. Also use those methods if you want to make changes to be able to make changes to the Map.

      Specified by:
        `getAllComponentSpecifiers` in interface `AnalysisEngineDescription`
      Parameters:
        `aResourceManager` - the ResourceManager from which to get the datapath needed to resolve imports. Pass null to use the default ResourceManager.
      Returns:
        an unmodifiable Map with `String` keys and `ResourceSpecifier` values.
      Throws:
        `InvalidXMLException` - if import resolution failed

    - #### getAnalysisEngineMetaData

          public AnalysisEngineMetaData getAnalysisEngineMetaData()

      Description copied from interface: `AnalysisEngineDescription`
      Retrieves the metadata that describes the AnalysisEngine. This includes the AnalysisEngine's capabilties, the TypeSystem that is uses, the specified Flow information for an aggregate AnalysisEngine, and various informational attributes such as name, description, version, vendor, and copyright.
      Specified by:
        `getAnalysisEngineMetaData` in interface `AnalysisEngineDescription`
      Returns:
        the `AnalysisEngineMetaData` object containing the AnalysisEngine's metadata. This object can be modified.
      See Also:
        `AnalysisEngineDescription.getAnalysisEngineMetaData()`

    - #### getSofaMappings

          public SofaMapping[] getSofaMappings()

      Specified by:
        `getSofaMappings` in interface `AnalysisEngineDescription`

    - #### setSofaMappings

          public void setSofaMappings(SofaMapping[] aSofaMappings)

      Specified by:
        `setSofaMappings` in interface `AnalysisEngineDescription`

    - #### doFullValidation

          public void doFullValidation()
                                throws ResourceInitializationException

      Description copied from interface: `ResourceCreationSpecifier`
      Does full validation of this `ResourceCreationSpecifier`. This essentially performs all operations necessary to instantiate a Resource except that it does not actually instantiate the implementation class. If appropriate, this method will also attempt to create a CAS based on the descriptor, in order to do full type system verification. If any operations fail, an exception will be thrown.
      Specified by:
        `doFullValidation` in interface `AnalysisEngineDescription`
      Specified by:
        `doFullValidation` in interface `ResourceCreationSpecifier`
      Overrides:
        `doFullValidation` in class `ResourceCreationSpecifier_impl`
      Throws:
        `ResourceInitializationException` - if validation failed

    - #### doFullValidation

          public void doFullValidation(ResourceManager aResourceManager)
                                throws ResourceInitializationException

      Description copied from interface: `ResourceCreationSpecifier`
      Does full validation of this `ResourceCreationSpecifier`. This essentially performs all operations necessary to instantiate a Resource except that it does not actually instantiate the implementation class. If appropriate, this method will also attempt to create a CAS based on the descriptor, in order to do full type system verification. If any operations fail, an exception will be thrown.
      Specified by:
        `doFullValidation` in interface `AnalysisEngineDescription`
      Specified by:
        `doFullValidation` in interface `ResourceCreationSpecifier`
      Overrides:
        `doFullValidation` in class `ResourceCreationSpecifier_impl`
      Parameters:
        `aResourceManager` - a ResourceManager instance to use to load annotator classes, external resource classes, and resolve imports by name.
      Throws:
        `ResourceInitializationException` - if validation failed

    - #### validate

          public void validate(ResourceManager aResourceManager)
                        throws ResourceInitializationException,
                               ResourceConfigurationException

      Determines if the AnalysisEngineDescription is valid. An exception is thrown if it is not valid. This should be called from this Analysis Engine's initialize method. Note this does not check configuration parameter settings - that must be done by an explicit call to validateConfigurationParameterSettings.
      Specified by:
        `validate` in interface `ResourceCreationSpecifier`
      Overrides:
        `validate` in class `ResourceCreationSpecifier_impl`
      Parameters:
        `aResourceManager` - a ResourceManager instance to use to resolve imports by name.
      Throws:
        `ResourceInitializationException` - if `aDesc` is invalid
        `ResourceConfigurationException` - if the configuration parameter settings in `aDesc` are invalid

    - #### checkForInvalidParameterOverrides

          protected void checkForInvalidParameterOverrides(ConfigurationParameter[] aParams,
                                                           String aGroupName,
                                                           ResourceManager aResourceManager)
                                                    throws ResourceInitializationException

      Overrides`ResourceCreationSpecifier_impl.checkForInvalidParameterOverrides(ConfigurationParameter[], String, ResourceManager)` to validate parameter overrides in an aggregate AE. Also logs a warning for aggregate parameters with no declared overrides.
      Overrides:
        `checkForInvalidParameterOverrides` in class `ResourceCreationSpecifier_impl`
      Parameters:
        `aParams` - an array of ConfigurationParameters
        `aGroupName` - name of groups in which these parameters are contained. Null if no group
        `aResourceManager` - a ResourceManager instance to use to resolve imports by name.
      Throws:
        `ResourceInitializationException` - if there is an invalid parameter override declaration

    - #### getComponentSpecifier

          public ResourceSpecifier getComponentSpecifier(String key)
                                                  throws ResourceInitializationException

      Gets the ResourceSpecifier of one a component of this aggregate, based on its key. This may be the specifier of a component (i.e. delegate) AnalysisEngine, or it may be the specifier of the FlowController.
      Specified by:
        `getComponentSpecifier` in interface `AnalysisEngineDescription`
      Parameters:
        `key` - the key of the component specifier to get
      Returns:
        the specifier for the component, null if there is no component with the given key
      Throws:
        `ResourceInitializationException` - if there's a problem resolving imports

    - #### validateSofaMappings

          protected void validateSofaMappings()
                                       throws ResourceInitializationException

      Validate SofA mappings and inputs/outputs for an aggregate AE.
      Throws:
        `ResourceInitializationException` - -

    - #### capabilitiesContainSofa

          protected boolean capabilitiesContainSofa(String aSofaName,
                                                    boolean aOutput)

    - #### getAdditionalAttributes

          public List<MetaDataObject_impl.MetaDataAttr> getAdditionalAttributes()

      Description copied from class: `MetaDataObject_impl`
      Override this method to include additional attributes
      Overrides:
        `getAdditionalAttributes` in class `MetaDataObject_impl`
      Returns:
        additional attributes

    - #### listAttributes

          @Deprecated
          public List<NameClassPair> listAttributes()

      Deprecated. never called anymore - getAdditionalAttributes called instead
      Overridden to add Delegate AE Specifiers to the result list. Default introspection implementation won't return it because it has no set method. We've also overridden the XML import/export methods, though, so that set methods are not required.
      Specified by:
        `listAttributes` in interface `MetaDataObject`
      Overrides:
        `listAttributes` in class `MetaDataObject_impl`
      Returns:
        a List containing `NameClassPair` objects, each of which contains the name of a parameter and the Class of its value. For primitive types, the wrapper classes will be returned (e.g. `java.lang.Integer` instead of int).
      See Also:
        `MetaDataObject.listAttributes()`

    - #### toXML

          public void toXML(OutputStream aOutputStream,
                            boolean aPreserveDelegateAnalysisEngineImports)
                     throws SAXException,
                            IOException

      Description copied from interface: `AnalysisEngineDescription`
      Writes this object's XML representation as a string in UTF-8 encoding.
      Specified by:
        `toXML` in interface `AnalysisEngineDescription`
      Parameters:
        `aOutputStream` - an OutputStream to which the XML string will be written, in UTF-8 encoding.
        `aPreserveDelegateAnalysisEngineImports` - if true, XML serialization will always preserve <import> elements used to import delegate analysis engine specifiers into an aggregate. If false, the default import serialization behavior applies, which is to write <import> elements only in the case where they have not previously been resolved.
      Throws:
        `SAXException` - if a SAX exception occurs
        `IOException` - if an I/O failure occurs

    - #### toXML

          public void toXML(Writer aWriter,
                            boolean aPreserveDelegateAnalysisEngineImports)
                     throws SAXException,
                            IOException

      Description copied from interface: `AnalysisEngineDescription`
      Writes this object's XML representation as a string. Note that if you want to write the XML to a file, it is highly recommended that you use `XMLizable.toXML(OutputStream)` instead, as it ensures that output is written in UTF-8 encoding, which is the default encoding that should be used for XML files.
      Specified by:
        `toXML` in interface `AnalysisEngineDescription`
      Parameters:
        `aWriter` - a Writer to which the XML string will be written
        `aPreserveDelegateAnalysisEngineImports` - if true, XML serialization will always preserve <import> elements used to import delegate analysis engine specifiers into an aggregate. If false, the default import serialization behavior applies, which is to write <import> elements only in the case where they have not previously been resolved.
      Throws:
        `SAXException` - if a SAX exception occurs
        `IOException` - if an I/O failure occurs

    - #### toXML

          public void toXML(ContentHandler aContentHandler,
                            boolean aWriteDefaultNamespaceAttribute,
                            boolean aPreserveDelegateAnalysisEngineImports)
                     throws SAXException

      Description copied from interface: `AnalysisEngineDescription`
      Writes this object's XML representation by making calls on a SAX `ContentHandler`.
      Specified by:
        `toXML` in interface `AnalysisEngineDescription`
      Parameters:
        `aContentHandler` - the content handler to which this object will write events that describe its XML representation.
        `aWriteDefaultNamespaceAttribute` - whether the namespace of this element should be written as the default namespace. This should be done only for the root element, and it defaults to false.
        `aPreserveDelegateAnalysisEngineImports` - if true, XML serialization will always preserve <import> elements used to import delegate analysis engine specifiers into an aggregate. If false, the default import serialization behavior applies, which is to write <import> elements only in the case where they have not previously been resolved.
      Throws:
        `SAXException` - if a SAX exception occurs

    - #### resolveImports

          public void resolveImports(ResourceManager aResourceManager)
                              throws InvalidXMLException

      Description copied from interface: `AnalysisEngineDescription`
      Resolves all import declarations in this AnalysisEngineDescription. For an aggregate, this is recursive, also resolving all imports in each delegate AnalysisEngine. Users do not typically need to call this method; it is called automatically when `UIMAFramework.produceAnalysisEngine(ResourceSpecifier)` is called.
      Specified by:
        `resolveImports` in interface `AnalysisEngineDescription`
      Parameters:
        `aResourceManager` - the Resource Manager used to locate imports by name. For example, the path in which to locate these imported descriptors can be set via the `ResourceManager.setDataPath(String)` method.
      Throws:
        `InvalidXMLException` - if an import target does not exist or is invalid

    - #### resolveImports

          public void resolveImports(Collection<String> aAlreadyImportedDelegateAeUrls,
                                     ResourceManager aResourceManager)
                              throws InvalidXMLException

      Description copied from interface: `AnalysisEngineDescription`
      Resolves all import declarations in this AnalysisEngineDescription. For an aggregate, this is recursive, also resolving all imports in each delegate AnalysisEngine. Users do not typically need to call this method; it is called automatically when `UIMAFramework.produceAnalysisEngine(ResourceSpecifier)` is called.

      This version is used internally to resolve nested imports.

      Specified by:
        `resolveImports` in interface `AnalysisEngineDescription`
      Parameters:
        `aAlreadyImportedDelegateAeUrls` - URLs of already imported AE descriptors, so we don't import them again.
        `aResourceManager` - the Resource Manager used to locate imports by name. For example, the path in which to locate these imported descriptors can be set via the `ResourceManager.setDataPath(String)` method.
      Throws:
        `InvalidXMLException` - if an import target does not exist or is invalid

    - #### resolveDelegateAnalysisEngineImports

          protected void resolveDelegateAnalysisEngineImports(ResourceManager aResourceManager,
                                                              boolean aRecursive)
                                                       throws InvalidXMLException

      Resolves imports of delegate Analysis Engines. This reads from the delegateAnalysisEngineSpecifiersWithImports map and populates the delegateAnalysisEngineSpecifiers map.
      Parameters:
        `aResourceManager` - -
        `aRecursive` - If true, this method will call `resolveImports(Collection, ResourceManager)` on each delegate. If a cirular import is found, an exception will be thrown.
      Throws:
        `InvalidXMLException` - -

    - #### resolveDelegateAnalysisEngineImports

          protected void resolveDelegateAnalysisEngineImports(Collection<String> aEnclosingAggregateAeUrls,
                                                              ResourceManager aResourceManager,
                                                              boolean aRecursive)
                                                       throws InvalidXMLException

      Resolves imports of delegate Analysis Engines. This reads from the delegateAnalysisEngineSpecifiersWithImports map and populates the delegateAnalysisEngineSpecifiers map.
      Parameters:
        `aEnclosingAggregateAeUrls` - URLs of enclosing aggregate AEs. Used to detect circular imports.
        `aResourceManager` - -
        `aRecursive` - If true, this method will call `resolveImports(Collection, ResourceManager)` on each delegate. If a circular import is found, an exception will be thrown.
      Throws:
        `InvalidXMLException` - -

    - #### clone

          public Object clone()

      Description copied from interface: `MetaDataObject`
      Creates a clone of this `MetaDataObject`. This performs a "deep" copy by cloning all attribute values that are also MetaDataObjects.
      Specified by:
        `clone` in interface `MetaDataObject`
      Overrides:
        `clone` in class `MetaDataObject_impl`
      Returns:
        a clone of this `MetaDataObject`
      See Also:
        `multi-core: could be cloning while another thread is modifying?`

    - #### writePropertyAsElement

          protected void writePropertyAsElement(PropertyXmlInfo aPropInfo,
                                                String aNamespace)
                                         throws SAXException

      Overridden to handle XML export of the DelegateAnalysisEngineSpecifiers attribute. This attribute has a value of type `Map`, which is not handled by the default XML export logic.
      Overrides:
        `writePropertyAsElement` in class `MetaDataObject_impl`
      Parameters:
        `aPropInfo` - -
        `aNamespace` - -
      Throws:
        `SAXException` - -
      See Also:
        `MetaDataObject_impl.writePropertyAsElement(PropertyXmlInfo, String)`

    - #### readPropertyValueFromXMLElement

          protected void readPropertyValueFromXMLElement(PropertyXmlInfo aPropXmlInfo,
                                                         Element aElement,
                                                         XMLParser aParser,
                                                         XMLParser.ParsingOptions aOptions)
                                                  throws InvalidXMLException

      Overridden to handle XML import of the DelegateAnalysisEngineSpecifiers attribute. This attribute has a value of type `Map`, which is not handled by the default XML import logic.
      Overrides:
        `readPropertyValueFromXMLElement` in class `MetaDataObject_impl`
      Parameters:
        `aPropXmlInfo` - information about the property to read
        `aElement` - DOM element to read from
        `aParser` - parser to use to construct complex values
        `aOptions` - option settings
      Throws:
        `InvalidXMLException` - -
      See Also:
        `MetaDataObject_impl.readPropertyValueFromXMLElement(PropertyXmlInfo, Element, XMLParser, XMLParser.ParsingOptions)`

    - #### buildFromXMLElement

          public void buildFromXMLElement(Element aElement,
                                          XMLParser aParser,
                                          XMLParser.ParsingOptions aOptions)
                                   throws InvalidXMLException

      Overridden to set default operational properties if they are not specified in descriptor.
      Specified by:
        `buildFromXMLElement` in interface `XMLizable`
      Overrides:
        `buildFromXMLElement` in class `MetaDataObject_impl`
      Parameters:
        `aElement` - -
        `aParser` - -
        `aOptions` - -
      Throws:
        `InvalidXMLException` - -

    - #### getXmlizationInfo

          protected XmlizationInfo getXmlizationInfo()

      Description copied from class: `MetaDataObject_impl`
      To be implemented by subclasses to return information describing how to represent this object in XML.
      Overrides:
        `getXmlizationInfo` in class `ResourceCreationSpecifier_impl`
      Returns:
        information defining this object's XML representation

    - #### getXmlizationInfoForClass

          protected static XmlizationInfo getXmlizationInfoForClass()

      Static method to get XmlizationInfo, used by subclasses to set up their own XmlizationInfo.
      Returns:
        XmlizationInfo, used by subclasses to set up their own XmlizationInfo

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