org.apache.uima.cas.impl
Class FeatureImpl

java.lang.Object
  extended by org.apache.uima.cas.impl.FeatureImpl
All Implemented Interfaces:
java.lang.Comparable<Feature>, Feature

public class FeatureImpl
extends java.lang.Object
implements Feature

The implementation of features in the type system.

Version:
$Revision: 1.4 $

Method Summary
 int compareTo(Feature o)
          Note: you can only compare features from the same type system.
 int getCode()
          Get the internal code of this feature.
 Type getDomain()
          Get the domain type for this feature.
 java.lang.String getName()
          Get the name for this feature.
 Type getRange()
          Get the range type for this feature.
 java.lang.String getShortName()
          Get the unqualified, short name of this feature.
 TypeSystem getTypeSystem()
          Get the type hierarchy that this feature belongs to.
 boolean isMultipleReferencesAllowed()
          Checks if there can be multiple references to values of this feature.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getCode

public int getCode()
Get the internal code of this feature. Necessary when using low-level APIs.


getDomain

public Type getDomain()
Get the domain type for this feature.

Specified by:
getDomain in interface Feature
Returns:
The domain type. This can not be null.

getRange

public Type getRange()
Get the range type for this feature.

Specified by:
getRange in interface Feature
Returns:
The range type. This can not be null.

getName

public java.lang.String getName()
Get the name for this feature.

Specified by:
getName in interface Feature
Returns:
The name. This can not be null.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getShortName

public java.lang.String getShortName()
Description copied from interface: Feature
Get the unqualified, short name of this feature.

Specified by:
getShortName in interface Feature
Returns:
The short name.

getTypeSystem

public TypeSystem getTypeSystem()
Get the type hierarchy that this feature belongs to.

Returns:
The type hierarchy.

compareTo

public int compareTo(Feature o)
Note: you can only compare features from the same type system. If you compare features from different type systems, the result is undefined.

Specified by:
compareTo in interface java.lang.Comparable<Feature>

isMultipleReferencesAllowed

public boolean isMultipleReferencesAllowed()
Description copied from interface: Feature
Checks if there can be multiple references to values of this feature. This is only meaningful for array-valued or list-values features.

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

Specified by:
isMultipleReferencesAllowed in interface Feature
Returns:
true iff the value type of this feature is an array or list and has been declared to allow multiple references.


Copyright © 2011. All Rights Reserved.