org.apache.uima.resource.metadata

## Interface TypeDescription

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

      public interface TypeDescription
      extends MetaDataObject

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

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static TypeDescription[]` | `EMPTY_TYPE_DESCRIPTIONS`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `FeatureDescription` | `addFeature(String aFeatureName, String aDescription, String aRangeTypeName)` Convenience method which adds a FeatureDescription to this TypeDescription.
    `FeatureDescription` | `addFeature(String aFeatureName, String aDescription, String aRangeTypeName, String aElementTypeName, Boolean aMultipleReferencesAllowed)` Convenience method which adds a FeatureDescription to this TypeDescription.
    `AllowedValue[]` | `getAllowedValues()` Gets the allowed values for instances of this Type.
    `String` | `getDescription()` Gets the verbose description of this Type.
    `FeatureDescription[]` | `getFeatures()` Gets the descriptions of the features for this Type.
    `String` | `getName()` Gets the name of this Type.
    `String` | `getSupertypeName()` Gets the name of the supertype for this Type.
    `void` | `setAllowedValues(AllowedValue[] aAllowedValues)` Sets the allowed values for instances of this Type.
    `void` | `setDescription(String aDescription)` Sets the verbose description of this Type.
    `void` | `setFeatures(FeatureDescription[] aFeatures)` Sets the descriptions of the features for this Type.
    `void` | `setName(String aName)` Sets the name of this Type.
    `void` | `setSupertypeName(String aTypeName)` Sets the name of the supertype for this Type.

    - ### 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`

- - ### Field Detail

    - #### EMPTY_TYPE_DESCRIPTIONS

          static final TypeDescription[] EMPTY_TYPE_DESCRIPTIONS

  - ### Method Detail

    - #### getName

          String getName()

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

    - #### setName

          void setName(String aName)

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

    - #### getDescription

          String getDescription()

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

    - #### setDescription

          void setDescription(String aDescription)

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

    - #### getSupertypeName

          String getSupertypeName()

      Gets the name of the supertype for this Type. This is the Type from which this Type inherits.
      Returns:
        the name of the supertype for this Type

    - #### setSupertypeName

          void setSupertypeName(String aTypeName)

      Sets the name of the supertype for this Type. This is the Type from which this Type inherits.
      Parameters:
        `aTypeName` - the name of the supertype for this Type

    - #### getFeatures

          FeatureDescription[] getFeatures()

      Gets the descriptions of the features for this Type.
      Returns:
        the descriptions of the features for this Type.

    - #### setFeatures

          void setFeatures(FeatureDescription[] aFeatures)

      Sets the descriptions of the features for this Type.
      Parameters:
        `aFeatures` - descriptions of the features for this Type.

    - #### getAllowedValues

          AllowedValue[] getAllowedValues()

      Gets the allowed values for instances of this Type. This is used only for special "enumerated types" that extend the String type and define a specific set of allowed values. For all other Types this will return `null`. Note that if a type has allowed values, it may not have features.
      Returns:
        the allowed values for instances of this Type

    - #### setAllowedValues

          void setAllowedValues(AllowedValue[] aAllowedValues)

      Sets the allowed values for instances of this Type. This is used only for special "enumerated types" that extend the String type and define a specific set of allowed values. For all other Types this property should be `null`. Note that if a type has allowed values, it may not have features.
      Parameters:
        `aAllowedValues` - the allowed values for instances of this Type

    - #### addFeature

          FeatureDescription addFeature(String aFeatureName,
                                        String aDescription,
                                        String aRangeTypeName)

      Convenience method which adds a FeatureDescription to this TypeDescription.
      Parameters:
        `aFeatureName` - name of feature to add
        `aDescription` - verbose description of the feature
        `aRangeTypeName` - name of feature's range type
      Returns:
        description of the new Feature

    - #### addFeature

          FeatureDescription addFeature(String aFeatureName,
                                        String aDescription,
                                        String aRangeTypeName,
                                        String aElementTypeName,
                                        Boolean aMultipleReferencesAllowed)

      Convenience method which adds a FeatureDescription to this TypeDescription. Used for array or list valued features, which have additional attributes.
      Parameters:
        `aFeatureName` - name of feature to add
        `aDescription` - verbose description of the feature
        `aRangeTypeName` - name of feature's range type
        `aElementTypeName` - type of element expected to be contained in the array or list
        `aMultipleReferencesAllowed` - whether an array or list that's assigned to this feature can also be referenced from another feature. This is a Boolean object so that the null value can be used to represent the case where the user has not specified a value.
      Returns:
        description of the new Feature

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