org.apache.uima.resource.metadata

## Interface FeatureDescription

- All Superinterfaces:
    Cloneable, MetaDataObject, Serializable, XMLizable

      public interface FeatureDescription
      extends MetaDataObject

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

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getDescription()` Gets the verbose description of this Feature.
    `String` | `getElementType()` For a feature with a range type that is an array or list, gets the expected type of the elements of that array or list.
    `Boolean` | `getMultipleReferencesAllowed()` For a feature with a range type that is an array or list, gets whether value of the feature may also be referenced from another feature elsewhere in the CAS.
    `String` | `getName()` Gets the name of this Feature.
    `String` | `getRangeTypeName()` Gets the name of the range Type of this Feature.
    `void` | `setDescription(String aDescription)` Sets the verbose description of this Feature.
    `void` | `setElementType(String aElementType)` For a multi-valued (array or list) feature, sets the expected type of the elements of that array or list.
    `void` | `setMultipleReferencesAllowed(Boolean aAllowed)` For a feature with a range type that is an array or list, sets whether value of the feature may also be referenced from another feature elsewhere in the CAS.
    `void` | `setName(String aName)` Sets the name of this Feature.
    `void` | `setRangeTypeName(String aTypeName)` Sets the name of the range Type of this Feature.

    - ### 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 Feature.
      Returns:
        the name of this Feature

    - #### setName

          void setName(String aName)

      Sets the name of this Feature.
      Parameters:
        `aName` - the name of this Feature

    - #### getDescription

          String getDescription()

      Gets the verbose description of this Feature.
      Returns:
        the description of this Feature

    - #### setDescription

          void setDescription(String aDescription)

      Sets the verbose description of this Feature.
      Parameters:
        `aDescription` - the description of this Feature

    - #### getRangeTypeName

          String getRangeTypeName()

      Gets the name of the range Type of this Feature.
      Returns:
        the name of the range Type of this Feature

    - #### setRangeTypeName

          void setRangeTypeName(String aTypeName)

      Sets the name of the range Type of this Feature.
      Parameters:
        `aTypeName` - the name of the range Type of this Feature

    - #### getElementType

          String getElementType()

      For a feature with a range type that is an array or list, gets the expected type of the elements of that array or list. This is optional; if omitted the array or list can contain any type. There is currently no guarantee that the framework will enforce this type restriction. This property should not be set for features whose range type is not an array or list.
      Returns:
        the expected element type of an array or list feature, null if there is no restriction.

    - #### setElementType

          void setElementType(String aElementType)

      For a multi-valued (array or list) feature, sets the expected type of the elements of that array or list. This is optional; if omitted the array or list can contain any type. There is currently no guarantee that the framework will enforce this type restriction. This property should not be set for features whose range type is not an array or list.
      Parameters:
        `aElementType` - the expected element type of an array or list feature, null if there is no restriction.

    - #### getMultipleReferencesAllowed

          Boolean getMultipleReferencesAllowed()

      For a feature with a range type that is an array or list, gets whether value of the feature may also be referenced from another feature elsewhere in the CAS.

      This returns a Boolean object so that we can distinguish whether the descriptor contained no setting (null) versus an explicit setting of false. We want to preserve this if the descriptor is written out again.

      Setting this to false (the default) indicates that this feature has exclusive ownership of the array or list, so changes to the array or list are localized. Setting this to true indicates that the array or list may be shared, so changes to it may affect other objects in the CAS.

      There is currently no guarantee that the framework will enforce this restriction. However, this setting may affect how the CAS is serialized.

      This property should always be null for features whose range type is not an array or list.

      Returns:
        true if multiple references to an array or list are allowed, false if not.

    - #### setMultipleReferencesAllowed

          void setMultipleReferencesAllowed(Boolean aAllowed)

      For a feature with a range type that is an array or list, sets whether value of the feature may also be referenced from another feature elsewhere in the CAS.

      This takes a Boolean object so that we can distinguish whether the descriptor contained no setting (null) versus an explicit setting of false. We want to preserve this if the descriptor is written out again.

      Setting this to false (the default) indicates that this feature has exclusive ownership of the array or list, so changes to the array or list are localized. Setting this to true indicates that the array or list may be shared, so changes to it may affect other objects in the CAS.

      There is currently no guarantee that the framework will enforce this restriction. However, this setting may affect how the CAS is serialized.

      This property should never be set for features whose range type is not an array or list.

      Parameters:
        `aAllowed` - true if multiple references to an array or list are allowed, false if not.

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