Package org.apache.uima.cas.impl
Class FeatureImpl
java.lang.Object
org.apache.uima.cas.impl.FeatureImpl
- All Implemented Interfaces:
Comparable<Feature>
,Feature
The implementation of features in the type system.
- Version:
- $Revision: 1.4 $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
private final boolean
private final String
private final TypeSystemImpl
-
Constructor Summary
ConstructorsConstructorDescriptionFeatureImpl
(int code, String name, TypeSystemImpl ts, boolean isMultipleRefsAllowed) -
Method Summary
Modifier and TypeMethodDescriptionint
Note: you can only compare features from the same type system.int
getCode()
Get the domain type for this feature.getName()
Get the name for this feature.getRange()
Get the range type for this feature.Get the unqualified, short name of this feature.Get the type hierarchy that this feature belongs to.boolean
Checks if there can be multiple references to values of this feature.toString()
-
Field Details
-
code
private final int code -
name
-
ts
-
isMultipleRefsAllowed
private final boolean isMultipleRefsAllowed
-
-
Constructor Details
-
FeatureImpl
FeatureImpl(int code, String name, TypeSystemImpl ts, boolean isMultipleRefsAllowed)
-
-
Method Details
-
getCode
public int getCode()- Returns:
- the internal code of this feature. Necessary when using low-level APIs.-
-
getDomain
Get the domain type for this feature. -
getRange
Get the range type for this feature. -
getName
Get the name for this feature. -
toString
-
getShortName
Description copied from interface:Feature
Get the unqualified, short name of this feature.- Specified by:
getShortName
in interfaceFeature
- Returns:
- The short name.
-
getTypeSystem
Get the type hierarchy that this feature belongs to.- Returns:
- The type hierarchy.
-
compareTo
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 interfaceComparable<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 interfaceFeature
- Returns:
true
iff the value type of this feature is an array or list and has been declared to allow multiple references.
-