Package org.apache.uima.cas_data
Interface FeatureStructure
- All Superinterfaces:
- Serializable
- All Known Subinterfaces:
- PrimitiveArrayFS,- ReferenceArrayFS
- All Known Implementing Classes:
- FeatureStructureImpl,- PrimitiveArrayFSImpl,- ReferenceArrayFSImpl
An object in the CAS. Each FeatureStructure has an optional ID, a type (represented as a string),
 and a collection of features, which are attribute-value pairs. Feature names are strings, and
 their values may be primitives (String, integer, float) or references (via ID) to another
 FeatureStructures. Circular references are allowed.
 
 Arrays are represented by the subtypes PrimitiveArrayFS and ReferenceArrayFS.
 Arrays are not primitive values. This means that if the value of a feature is conceptually, for
 example, an integer array, this will be represented in the CasData as a reference, via ID, to a
 PrimitiveArrayFS object that actually contains the integer array value.
 
 FeatureStructures also have a property indexed, which determines whether the
 FeatureStructure should be added to the CAS's indexes if the CAS Data is converted to a CAS
 Object. The CasData itself does not provide indexes.
- 
Method SummaryModifier and TypeMethodDescriptionString[]Gets the names of all features on this FeatureStructure.getFeatureValue(String aName) Gets the value of a featuregetId()Gets the ID of this FeatureStructure.int[]Gets the index repositories that this FeatureStrucutre should be indexed in if the CasData is converted to a CAS Object.getType()Gets the type of this FeatureStructurebooleanDeprecated.voidsetFeatureValue(String aName, FeatureValue aValue) Sets the value of a featurevoidSets the ID of this FeatureStructure.voidsetIndexed(boolean aIndexed) Deprecated.UsesetIndexed(int[])insteadvoidsetIndexed(int[] aIndexed) Sets the index repositories that this FeatureStrucutre should be indexed in if the CasData is converted to a CAS Object.voidSets the type of this FeatureStructure
- 
Method Details- 
getIdString getId()Gets the ID of this FeatureStructure. IDs are optional, so this may return null. A FeatureStructure must have an ID if it is to be the target of a reference.- Returns:
- this FeatureStructure's ID, null if none
 
- 
setIdSets the ID of this FeatureStructure. IDs are optional, so null may be passed to this method. A FeatureStructure must have an ID if it is to be the target of a reference.- Parameters:
- aId- the ID to assign to this FeatureStructure, null if none. It is the caller's responsibiltiy to ensure that this ID is unique within the CasData containing this FeatureStructure.
 
- 
getTypeString getType()Gets the type of this FeatureStructure- Returns:
- this FeatureStructure's type, as a string
 
- 
setTypeSets the type of this FeatureStructure- Parameters:
- aType- this FeatureStructure's type, as a string
 
- 
getFeatureNamesString[] getFeatureNames()Gets the names of all features on this FeatureStructure.- Returns:
- an array of feature names
 
- 
getFeatureValueGets the value of a feature- Parameters:
- aName- name of feature
- Returns:
- value of feature named aName, or null if there is no such feature
 
- 
setFeatureValueSets the value of a feature- Parameters:
- aName- name of feature to set
- aValue- value of feature
 
- 
isIndexedDeprecated.UsegetIndexed()insteadGets whether this FeatureStructure should be indexed if the CasData is converted to a CAS Object. The CasData itself does not provide indexes.- Returns:
- true if this FS should be indexed, false if not
 
- 
setIndexedDeprecated.UsesetIndexed(int[])insteadSets whether this FeatureStructure should be indexed if the CasData is converted to a CAS Object. The CasData itself does not provide indexes.- Parameters:
- aIndexed- true if this FS should be indexed, false if not
 
- 
getIndexedint[] getIndexed()Gets the index repositories that this FeatureStrucutre should be indexed in if the CasData is converted to a CAS Object. The CasData itself does not provide indexes.- Returns:
- an array containing the numbers of the index repsositories that should contain this FS. Returns an empty array if this FS is not indexed.
 
- 
setIndexedvoid setIndexed(int[] aIndexed) Sets the index repositories that this FeatureStrucutre should be indexed in if the CasData is converted to a CAS Object. The CasData itself does not provide indexes.- Parameters:
- aIndexed- an array containing the numbers of the index repsositories that should contain this FS. Passing null is equivalent to passing an empty array.
 
 
- 
getIndexed()instead