|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FeatureStructure
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 FeatureStuctures. 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 Summary | |
---|---|
String[] |
getFeatureNames()
Gets the names of all features on this FeatureStructure. |
FeatureValue |
getFeatureValue(String aName)
Gets the value of a feature |
String |
getId()
Gets the ID of this FeatureStructure. |
int[] |
getIndexed()
Gets the index repositories that this FeatureStrucutre should be indexed in if the CasData is converted to a CAS Object. |
String |
getType()
Gets the type of this FeatureStructure |
boolean |
isIndexed()
Deprecated. Use getIndexed() instead |
void |
setFeatureValue(String aName,
FeatureValue aValue)
Sets the value of a feature |
void |
setId(String aId)
Sets the ID of this FeatureStructure. |
void |
setIndexed(boolean aIndexed)
Deprecated. Use setIndexed(int[]) instead |
void |
setIndexed(int[] aIndexed)
Sets the index repositories that this FeatureStrucutre should be indexed in if the CasData is converted to a CAS Object. |
void |
setType(String aType)
Sets the type of this FeatureStructure |
Method Detail |
---|
String getId()
void setId(String aId)
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.String getType()
void setType(String aType)
aType
- this FeatureStructure's type, as a stringString[] getFeatureNames()
FeatureValue getFeatureValue(String aName)
aName
- name of feature
aName
, or null if there is no such featurevoid setFeatureValue(String aName, FeatureValue aValue)
aName
- name of feature to setaValue
- value of feature@Deprecated boolean isIndexed()
getIndexed()
instead
@Deprecated void setIndexed(boolean aIndexed)
setIndexed(int[])
instead
aIndexed
- true if this FS should be indexed, false if notint[] getIndexed()
void setIndexed(int[] aIndexed)
aIndexed
- an array containing the numbers of the index repsositories that should contain this
FS. Passing null is equivalent to passing an empty array.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |