public interface FeatureStructure extends Serializable
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.
Modifier and Type | Method and Description |
---|---|
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
|
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 featureaName
, 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[])
insteadaIndexed
- 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.Copyright © 2006–2017 The Apache Software Foundation. All rights reserved.