org.apache.uima.resource.metadata

## Interface ResourceManagerConfiguration

- All Superinterfaces:
    Cloneable, MetaDataObject, Serializable, XMLizable

      public interface ResourceManagerConfiguration
      extends MetaDataObject

  Defines a set of external resources and their bindings to `ExternalResourceDependencies`.

  Resource Manager Configurations can declare that they `import` other Resource Manager Configurations. At runtime, these imports will be resolved to create a single logical Resource Manager Configuration..

  Note that type system imports are not automatically resolved when a ResourceMangerConfiguration is deserialized from XML. To resolve the imports, call the `resolveImports()` method. Import resolution is done automatically when the `ResourceManager` is initialized (e.g. during AnalysisEngine initialization).

  Resource Manager Configurations can optionally be assigned a `name`, `description`, `vendor`, and `version`. It is recommended that these properties be set on any Resource Manager Configuration that is meant to be shared by (imported by) multiple components.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addExternalResource(ExternalResourceDescription aExternalResourceDescription)` Adds a External Resource to this configuration
    `void` | `addExternalResourceBinding(ExternalResourceBinding aExternalResourceBinding)` Adds a External ResourceBinding to this configuration
    `String` | `getDescription()` Gets the description of this Resource Manager Configuration.
    `ExternalResourceBinding[]` | `getExternalResourceBindings()` Gets the bindings between an Analysis Engine's `ExternalResourceDependencies` and the `ExternalResourceDescription` objects defined in this configuration.
    `ExternalResourceDescription[]` | `getExternalResources()` Gets the descriptions of the external resources to be instantiated and managed by the resource manager.
    `Import` | `getImport()` Deprecated. Use `getImports()` instead. There may be many imports; this method only returns the first.
    `Import[]` | `getImports()` Gets the imports declared by this Resource Manager Configuration.
    `String` | `getName()` Gets the name of this Resource Manager Configuration.
    `String` | `getVendor()` Gets the vendor of this Resource Manager Configuration.
    `String` | `getVersion()` Gets the version number of this Resource Manager Configuration.
    `void` | `removeExternalResource(ExternalResourceDescription aExternalResourceDescription)` Removes an ExternalResource from this configuration.
    `void` | `removeExternalResourceBinding(ExternalResourceBinding aExternalResourceBinding)` Removes an ExternalResourceBinding from this configuration.
    `void` | `resolveImports()` Resolves any import declarations in this resource manager configuration, adding the imported external resources and external resource bindings directly onto this ResourceManagerConfiguration's `externalResources` and `externalResourceBindings` lists.
    `void` | `resolveImports(Collection<String> aAlreadyImportedURLs, ResourceManager aResourceManager)` Resolves any import declarations in this resource manager configuration, adding the imported external resources and external resource bindings directly onto this ResourceManagerConfiguration's `externalResources` and `externalResourceBindings` lists.
    `void` | `resolveImports(ResourceManager aResourceManager)` Resolves any import declarations in this resource manager configuration, adding the imported external resources and external resource bindings directly onto this ResourceManagerConfiguration's `externalResources` and `externalResourceBindings` lists.
    `void` | `setDescription(String aDescription)` Sets the description of this Resource Manager Configuration.
    `void` | `setExternalResourceBindings(ExternalResourceBinding[] aBindings)` Sets the bindings between an Analysis Engine's `ExternalResourceDependencies` and the `ExternalResourceDescription` objects defined in this configuration.
    `void` | `setExternalResources(ExternalResourceDescription[] aDescriptions)` Sets the descriptions of the external resources to be instantiated and managed by the resource manager.
    `void` | `setImport(Import aImport)` Deprecated. Use `setImports(Import[])` instead.
    `void` | `setImports(Import[] aImports)` Sets the imports declared by this Resource Manager Configuration.
    `void` | `setName(String aName)` Sets the name of this Resource Manager Configuration.
    `void` | `setVendor(String aVendor)` Sets the vendor of this Resource Manager Configuration.
    `void` | `setVersion(String aVersion)` Sets the version number of this Resource Manager Configuration.

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

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

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

      `buildFromXMLElement, buildFromXMLElement, toXML, toXML, toXML, toXML`

- - ### Method Detail

    - #### getName

          String getName()

      Gets the name of this Resource Manager Configuration.
      Returns:
        the name of this Resource Manager Configuration, null if none has been specified.

    - #### setName

          void setName(String aName)

      Sets the name of this Resource Manager Configuration.
      Parameters:
        `aName` - the name of this Resource Manager Configuration
      Throws:
        `UIMA_UnsupportedOperationException` - if this object is not modifiable

    - #### getVersion

          String getVersion()

      Gets the version number of this Resource Manager Configuration.
      Returns:
        the version number of this Resource Manager Configuration, as a String, null if none has been specified.

    - #### setVersion

          void setVersion(String aVersion)

      Sets the version number of this Resource Manager Configuration.
      Parameters:
        `aVersion` - the version number of this Resource Manager Configuration, as a String
      Throws:
        `UIMA_UnsupportedOperationException` - if this object is not modifiable

    - #### getDescription

          String getDescription()

      Gets the description of this Resource Manager Configuration.
      Returns:
        the description of this Resource Manager Configuration, null if none has been specified.

    - #### setDescription

          void setDescription(String aDescription)

      Sets the description of this Resource Manager Configuration.
      Parameters:
        `aDescription` - the description of this Resource Manager Configuration
      Throws:
        `UIMA_UnsupportedOperationException` - if this object is not modifiable

    - #### getVendor

          String getVendor()

      Gets the vendor of this Resource Manager Configuration.
      Returns:
        the vendor of this Resource Manager Configuration, as a String

    - #### setVendor

          void setVendor(String aVendor)

      Sets the vendor of this Resource Manager Configuration.
      Parameters:
        `aVendor` - the vendor of this Resource Manager Configuration, as a String, null if none has been specified.
      Throws:
        `UIMA_UnsupportedOperationException` - if this object is not modifiable

    - #### getImports

          Import[] getImports()

      Gets the imports declared by this Resource Manager Configuration.
      Returns:
        an array of imports declared by this Resource Manager Configuration.

    - #### setImports

          void setImports(Import[] aImports)

      Sets the imports declared by this Resource Manager Configuration.
      Parameters:
        `aImports` - an array of imports declared by this Resource Manager Configuration.

    - #### getImport

          @Deprecated
          Import getImport()

      Deprecated. Use `getImports()` instead. There may be many imports; this method only returns the first.
      Gets the import declared by this Resource Manager Configuration, if any.
      Returns:
        an object that defines how to locate an external XML file defining the resource manager configuration. Returns null if there is no import.

    - #### setImport

          @Deprecated
          void setImport(Import aImport)

      Deprecated. Use `setImports(Import[])` instead.
      Sets the import declared by this Resource Manager Configuration, if any.
      Parameters:
        `aImport` - an object that defines how to locate an external XML file defining the resource manager configuration. Null indicates that there is no import.

    - #### getExternalResources

          ExternalResourceDescription[] getExternalResources()

      Gets the descriptions of the external resources to be instantiated and managed by the resource manager.
      Returns:
        an array of `ExternalResourceDescription` objects that describe the external resources.

    - #### setExternalResources

          void setExternalResources(ExternalResourceDescription[] aDescriptions)

      Sets the descriptions of the external resources to be instantiated and managed by the resource manager.
      Parameters:
        `aDescriptions` - an array of `ExternalResourceDescription` objects that describe the external resources.

    - #### addExternalResource

          void addExternalResource(ExternalResourceDescription aExternalResourceDescription)

      Adds a External Resource to this configuration
      Parameters:
        `aExternalResourceDescription` - the ExternalResourceDescription to add
      Throws:
        `UIMA_UnsupportedOperationException` - if this object is not modifiable

    - #### removeExternalResource

          void removeExternalResource(ExternalResourceDescription aExternalResourceDescription)

      Removes an ExternalResource from this configuration.
      Parameters:
        `aExternalResourceDescription` - the ExternalResourceDescription to remove (must be == with an ExternalResourceDescription in this collection, or this method will do nothing).
      Throws:
        `UIMA_UnsupportedOperationException` - if this object is not modifiable

    - #### getExternalResourceBindings

          ExternalResourceBinding[] getExternalResourceBindings()

      Gets the bindings between an Analysis Engine's `ExternalResourceDependencies` and the `ExternalResourceDescription` objects defined in this configuration.
      Returns:
        an array of `ExternalResourceBinding` objects that bind dependencies to resources.

    - #### setExternalResourceBindings

          void setExternalResourceBindings(ExternalResourceBinding[] aBindings)

      Sets the bindings between an Analysis Engine's `ExternalResourceDependencies` and the `ExternalResourceDescription` objects defined in this configuration.
      Parameters:
        `aBindings` - an array of `ExternalResourceBinding` objects that bind dependencies to resources.

    - #### addExternalResourceBinding

          void addExternalResourceBinding(ExternalResourceBinding aExternalResourceBinding)

      Adds a External ResourceBinding to this configuration
      Parameters:
        `aExternalResourceBinding` - the ExternalResourceBinding to add
      Throws:
        `UIMA_UnsupportedOperationException` - if this object is not modifiable

    - #### removeExternalResourceBinding

          void removeExternalResourceBinding(ExternalResourceBinding aExternalResourceBinding)

      Removes an ExternalResourceBinding from this configuration.
      Parameters:
        `aExternalResourceBinding` - the ExternalResourceBinding to remove (must be == with an ExternalResourceBinding in this collection, or this method will do nothing).
      Throws:
        `UIMA_UnsupportedOperationException` - if this object is not modifiable

    - #### resolveImports

          void resolveImports()
                       throws InvalidXMLException

      Resolves any import declarations in this resource manager configuration, adding the imported external resources and external resource bindings directly onto this ResourceManagerConfiguration's `externalResources` and `externalResourceBindings` lists.
      Throws:
        `InvalidXMLException` - if either the import target does not exist or is invalid

    - #### resolveImports

          void resolveImports(ResourceManager aResourceManager)
                       throws InvalidXMLException

      Resolves any import declarations in this resource manager configuration, adding the imported external resources and external resource bindings directly onto this ResourceManagerConfiguration's `externalResources` and `externalResourceBindings` lists.
      Parameters:
        `aResourceManager` - the Resource Manager used to locate the XML file imported by name. For example, the path in which to locate the imported files can be set via the `ResourceManager.setDataPath(String)` method.
      Throws:
        `InvalidXMLException` - if either the import target does not exist or is invalid

    - #### resolveImports

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

      Resolves any import declarations in this resource manager configuration, adding the imported external resources and external resource bindings directly onto this ResourceManagerConfiguration's `externalResources` and `externalResourceBindings` lists.

      This version is used internally to resolve nested imports.

      Parameters:
        `aResourceManager` - the Resource Manager used to locate the XML file imported by name. For example, the path in which to locate the imported files can be set via the `ResourceManager.setDataPath(String)` method.
        `aAlreadyImportedURLs` - names of already imported URLs, so we don't import them again.
      Throws:
        `InvalidXMLException` - if either the import target does not exist or is invalid

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