org.apache.uima.resource.metadata

## Interface FsIndexCollection

- All Superinterfaces:
    Cloneable, MetaDataObject, Serializable, XMLizable
  All Known Implementing Classes:
    FsIndexCollection_impl

      public interface FsIndexCollection
      extends MetaDataObject

  Description of a collection of CAS feature structure indexes. This implements `MetaDataObject`, which implements `XMLizable`, so it can be serialized to and deserialized from an XML element.

  FS Index Collections can declare that they `import` other FS Index Collections. At runtime, these imports will be resolved to create a single logical FS Index Collection.

  Note that imports are not automatically resolved when an FsIndexCollection is deserialized from XML. To resolve the imports, call the `resolveImports()` method. Import resolution is done automatically when a CAS is created using a FsIndexCollection.

  FS Index Collections can optionally be assigned a `name`, `description`, `vendor`, and `version`. It is recommended that these properties be set on any FS Index Collection 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` | `addFsIndex(FsIndexDescription aFsIndexDescription)` Adds an FS Index description to this collection.
    `String` | `getDescription()` Gets the description of this FS Index Collection.
    `FsIndexDescription[]` | `getFsIndexes()` Retrieves the FS Index descriptions that are part of this collection.
    `Import[]` | `getImports()` Gets the imports declared by this FS Index Collection.
    `String` | `getName()` Gets the name of this FS Index Collection.
    `String` | `getVendor()` Gets the vendor of this FS Index Collection.
    `String` | `getVersion()` Gets the version number of this FS Index Collection.
    `void` | `removeFsIndex(FsIndexDescription aFsIndexDescription)` Removes an FS Index description from this collection.
    `void` | `resolveImports()` Resolves any import declarations in this FS Index Collection, adding the imported FsIndexDescriptions directly onto this FsIndexCollection's `fsIndexes` list.
    `void` | `resolveImports(Collection<String> aAlreadyImportedFsIndexCollectionURLs, ResourceManager aResourceManager)` Deprecated. Method is deprecated because it should only be used internally. Scheduled for removal in UIMA 4.0.
    `void` | `resolveImports(ResourceManager aResourceManager)` Resolves any import declarations in this FS Index Collection, adding the imported FsIndexDescriptions directly onto this FsIndexCollection's `fsIndexes` list.
    `void` | `setDescription(String aDescription)` Sets the description of this FS Index Collection.
    `void` | `setFsIndexes(FsIndexDescription[] aFSIndexes)` Retrieves the FS Index descriptions that are part of this collection.
    `void` | `setImports(Import[] aImports)` Sets the imports declared by this FS Index Collection.
    `void` | `setName(String aName)` Sets the name of this FS Index Collection.
    `void` | `setVendor(String aVendor)` Sets the vendor of this FS Index Collection.
    `void` | `setVersion(String aVersion)` Sets the version number of this FS Index Collection.

    - ### 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 FS Index Collection.
      Returns:
        the name of this FS Index Collection, null if none has been specified.

    - #### setName

          void setName(String aName)

      Sets the name of this FS Index Collection.
      Parameters:
        `aName` - the name of this FS Index Collection
      Throws:
        `UIMA_UnsupportedOperationException` - if this object is not modifiable

    - #### getVersion

          String getVersion()

      Gets the version number of this FS Index Collection.
      Returns:
        the version number of this FS Index Collection, as a String, null if none has been specified.

    - #### setVersion

          void setVersion(String aVersion)

      Sets the version number of this FS Index Collection.
      Parameters:
        `aVersion` - the version number of this FS Index Collection, as a String
      Throws:
        `UIMA_UnsupportedOperationException` - if this object is not modifiable

    - #### getDescription

          String getDescription()

      Gets the description of this FS Index Collection.
      Returns:
        the description of this FS Index Collection, null if none has been specified.

    - #### setDescription

          void setDescription(String aDescription)

      Sets the description of this FS Index Collection.
      Parameters:
        `aDescription` - the description of this FS Index Collection
      Throws:
        `UIMA_UnsupportedOperationException` - if this object is not modifiable

    - #### getVendor

          String getVendor()

      Gets the vendor of this FS Index Collection.
      Returns:
        the vendor of this FS Index Collection, as a String

    - #### setVendor

          void setVendor(String aVendor)

      Sets the vendor of this FS Index Collection.
      Parameters:
        `aVendor` - the vendor of this FS Index Collection, 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 FS Index Collection.
      Returns:
        an array of imports declared by this FS Index Collection.

    - #### setImports

          void setImports(Import[] aImports)

      Sets the imports declared by this FS Index Collection.
      Parameters:
        `aImports` - an array of imports declared by this FS Index Collection.
      Throws:
        `UIMA_UnsupportedOperationException` - if this object is not modifiable

    - #### getFsIndexes

          FsIndexDescription[] getFsIndexes()

      Retrieves the FS Index descriptions that are part of this collection. These define the indexes that are used to iterate over annotations in the `CAS`.
      Returns:
        a description of the FS Indexes that comprise this FS Index Collection

    - #### setFsIndexes

          void setFsIndexes(FsIndexDescription[] aFSIndexes)

      Retrieves the FS Index descriptions that are part of this collection. These define the indexes that are used to iterate over annotations in the `CAS`.
      Parameters:
        `aFSIndexes` - a description of the FS Indexes that comprise this FS Index Collection
      Throws:
        `UIMA_UnsupportedOperationException` - if this object is not modifiable

    - #### addFsIndex

          void addFsIndex(FsIndexDescription aFsIndexDescription)

      Adds an FS Index description to this collection.
      Parameters:
        `aFsIndexDescription` - the FS Index description to add
      Throws:
        `UIMA_UnsupportedOperationException` - if this object is not modifiable

    - #### removeFsIndex

          void removeFsIndex(FsIndexDescription aFsIndexDescription)

      Removes an FS Index description from this collection.
      Parameters:
        `aFsIndexDescription` - the FS Index description to remove (must be == with an FsIndexDescription 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 FS Index Collection, adding the imported FsIndexDescriptions directly onto this FsIndexCollection's `fsIndexes` list. The import elements are then deleted, so this results in a structure that is equivalent to the imported elements having been defined locally.
      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 FS Index Collection, adding the imported FsIndexDescriptions directly onto this FsIndexCollection's `fsIndexes` list. The import elements are then deleted, so this results in a structure that is equivalent to the imported elements having been defined locally.
      Parameters:
        `aResourceManager` - the Resource Manager used to locate FS Index Collections imported by name. For example, the path in which to locate these FS Index Collections can be set via the `ResourceManager.setDataPath(String)` method.
      Throws:
        `InvalidXMLException` - if either the import target does not exist or is invalid

    - #### resolveImports

          @Deprecated
          void resolveImports(Collection<String> aAlreadyImportedFsIndexCollectionURLs,
                                          ResourceManager aResourceManager)
                                   throws InvalidXMLException

      Deprecated. Method is deprecated because it should only be used internally. Scheduled for removal in UIMA 4.0.
      Resolves any import declarations in this FS Index Collection, adding the imported FsIndexDescriptions directly onto this FsIndexCollection's `fsIndexes` list. The import elements are then deleted, so this results in a structure that is equivalent to the imported elements having been defined locally.

      This version is used internally to resolve nested imports.

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

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