Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.uima.resource.metadata
Interface TypePriorities

All Superinterfaces:
  Cloneable, MetaDataObject, Serializable, XMLizable

    public interface TypePriorities

extends MetaDataObject

A declaration of priorities between CAS Types. Type priority can be a basis for ordering feature structures within an index - see `FsIndexDescription`.

This object implements `MetaDataObject`, which implements `XMLizable`, so it can be serialized to and deserialized from an XML element.

TypePriorities can declare that they `import` other TypePriorities. At runtime, these imports will be resolved to create a single logical TypePriorities object.

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

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

Method Summary
`TypePriorityList` | `addPriorityList()` Creates a new, empty `TypePriorityList` and adds it to this object.
`void` | `addPriorityList(TypePriorityList aPriorityList)` Adds a `TypePriorityList`.
`String` | `getDescription()` Gets the description of this TypePriorities declaration.
`Import[]` | `getImports()` Gets the imports declared by this TypePriorities declaration.
`String` | `getName()` Gets the name of this TypePriorities declaration.
`TypePriorityList[]` | `getPriorityLists()` Gets the `TypePriorityList`s that define the priorities.
`String` | `getVendor()` Gets the vendor of this TypePriorities declaration.
`String` | `getVersion()` Gets the version number of this TypePriorities declaration.
`void` | `removePriorityList(TypePriorityList aPriorityList)` Removes a `TypePriorityList`.
`void` | `resolveImports()` Resolves any import declarations in this Type Priorities declaration, adding the imported `TypePriorityList` objects directly onto this TypePriorities object's `priorityLists`.
`void` | `resolveImports(Collection aAlreadyImportedPriorityListURLs, ResourceManager aResourceManager)` Resolves any import declarations in this Type Priorities declaration, adding the imported `TypePriorityList` objects directly onto this TypePriorities object's `priorityLists`.
`void` | `resolveImports(ResourceManager aResourceManager)` Resolves any import declarations in this Type Priorities declaration, adding the imported `TypePriorityList` objects directly onto this TypePriorities object's `priorityLists`.
`void` | `setDescription(String aDescription)` Sets the description of this TypePriorities declaration.
`void` | `setImports(Import[] aImports)` Sets the imports declared by this TypePriorities declaration.
`void` | `setName(String aName)` Sets the name of this TypePriorities declaration.
`void` | `setPriorityLists(TypePriorityList[] aPriorityLists)` Sets the `TypePriorityList`s that define the priorities.
`void` | `setVendor(String aVendor)` Sets the vendor of this TypePriorities declaration.
`void` | `setVersion(String aVersion)` Sets the version number of this TypePriorities declaration.

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 TypePriorities declaration.

  Returns:
    the name of this TypePriorities declaration, null if none has been specified.

### setName

    void setName(String aName)

  Sets the name of this TypePriorities declaration.

  Parameters:
    `aName` - the name of this TypePriorities declaration
  Throws:
    `UIMA_UnsupportedOperationException` - if this object is not modifiable

### getVersion

    String getVersion()

  Gets the version number of this TypePriorities declaration.

  Returns:
    the version number of this TypePriorities declaration, as a String, null if none has been specified.

### setVersion

    void setVersion(String aVersion)

  Sets the version number of this TypePriorities declaration.

  Parameters:
    `aVersion` - the version number of this TypePriorities declaration, as a String
  Throws:
    `UIMA_UnsupportedOperationException` - if this object is not modifiable

### getDescription

    String getDescription()

  Gets the description of this TypePriorities declaration.

  Returns:
    the description of this TypePriorities declaration, null if none has been specified.

### setDescription

    void setDescription(String aDescription)

  Sets the description of this TypePriorities declaration.

  Parameters:
    `aDescription` - the description of this TypePriorities declaration
  Throws:
    `UIMA_UnsupportedOperationException` - if this object is not modifiable

### getVendor

    String getVendor()

  Gets the vendor of this TypePriorities declaration.

  Returns:
    the vendor of this TypePriorities declaration, as a String

### setVendor

    void setVendor(String aVendor)

  Sets the vendor of this TypePriorities declaration.

  Parameters:
    `aVendor` - the vendor of this TypePriorities declaration, 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 TypePriorities declaration.

  Returns:
    an array of imports declared by this TypePriorities declaration.

### setImports

    void setImports(Import[] aImports)

  Sets the imports declared by this TypePriorities declaration.

  Parameters:
    `aImports` - an array of imports declared by this TypePriorities declaration.

### getPriorityLists

    TypePriorityList[] getPriorityLists()

  Gets the `TypePriorityList`s that define the priorities. Each `TypePriorityList` declares the relative priority of two or more types.

  Returns:
    the `TypePriorityList`s that define the priorities

### setPriorityLists

    void setPriorityLists(TypePriorityList[] aPriorityLists)

  Sets the `TypePriorityList`s that define the priorities. Each `TypePriorityList` declares the relative priority of two or more types.

  Parameters:
    `aPriorityLists` - the `TypePriorityList`s that define the priorities

### addPriorityList

    void addPriorityList(TypePriorityList aPriorityList)

  Adds a `TypePriorityList`.

  Parameters:
    `aPriorityList` - the `TypePriorityList` to add

### addPriorityList

    TypePriorityList addPriorityList()

  Creates a new, empty `TypePriorityList` and adds it to this object.

  Returns:
    the new `TypePriorityList`, which can be modified by the caller

### removePriorityList

    void removePriorityList(TypePriorityList aPriorityList)

  Removes a `TypePriorityList`.

  Parameters:
    `aPriorityList` - the `TypePriorityList` to remove

### resolveImports

    void resolveImports()
                        throws InvalidXMLException

  Resolves any import declarations in this Type Priorities declaration, adding the imported `TypePriorityList` objects directly onto this TypePriorities object's `priorityLists`. 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 Type Priorities declaration, adding the imported `TypePriorityList` objects directly onto this TypePriorities object's `priorityLists`. 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 type priorities XML files imported by name. For example, the path in which to locate these type priorities XML 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 aAlreadyImportedPriorityListURLs,
                        ResourceManager aResourceManager)
                        throws InvalidXMLException

  Resolves any import declarations in this Type Priorities declaration, adding the imported `TypePriorityList` objects directly onto this TypePriorities object's `priorityLists`. 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:
    `aAlreadyImportedPriorityListURLs` - URLs of already imported type priorities, so we don't import them again.
    `aResourceManager` - the Resource Manager used to locate type priorities XML files imported by name. For example, the path in which to locate these type priorities XML files can be set via the `ResourceManager.setDataPath(String)` method.
  Throws:
    `InvalidXMLException` - if either the import target does not exist or is invalid

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 The Apache Software Foundation. All Rights Reserved.