Package org.apache.uima.cas_data.impl
Class FeatureStructureImpl
- java.lang.Object
-
- org.apache.uima.cas_data.impl.FeatureStructureImpl
-
- All Implemented Interfaces:
java.io.Serializable,FeatureStructure
- Direct Known Subclasses:
PrimitiveArrayFSImpl,ReferenceArrayFSImpl
public class FeatureStructureImpl extends java.lang.Object implements FeatureStructure
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,FeatureValue>mFeatureMapprivate java.lang.StringmFSTypeprivate java.lang.StringmIdprivate int[]mIndexedprivate static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description FeatureStructureImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.Objectget()java.lang.String[]getFeatureNames()Gets the names of all features on this FeatureStructure.FeatureValuegetFeatureValue(java.lang.String aFeatureName)Gets the value of a featurejava.lang.StringgetId()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.java.lang.StringgetType()Gets the type of this FeatureStructurebooleanisIndexed()Deprecated.voidsetFeatureValue(java.lang.String aFeatureType, FeatureValue aValue)Sets the value of a featurevoidsetId(java.lang.String string)Sets the ID of this FeatureStructure.voidsetIndexed(boolean b)Deprecated.voidsetIndexed(int[] aIndexed)Sets the index repositories that this FeatureStrucutre should be indexed in if the CasData is converted to a CAS Object.voidsetType(java.lang.String aType)Sets the type of this FeatureStructurejava.lang.StringtoString()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
mFeatureMap
private java.util.Map<java.lang.String,FeatureValue> mFeatureMap
-
mFSType
private java.lang.String mFSType
-
mId
private java.lang.String mId
-
mIndexed
private int[] mIndexed
-
-
Method Detail
-
getType
public java.lang.String getType()
Description copied from interface:FeatureStructureGets the type of this FeatureStructure- Specified by:
getTypein interfaceFeatureStructure- Returns:
- this FeatureStructure's type, as a string
-
setType
public void setType(java.lang.String aType)
Description copied from interface:FeatureStructureSets the type of this FeatureStructure- Specified by:
setTypein interfaceFeatureStructure- Parameters:
aType- this FeatureStructure's type, as a string
-
getFeatureNames
public java.lang.String[] getFeatureNames()
Description copied from interface:FeatureStructureGets the names of all features on this FeatureStructure.- Specified by:
getFeatureNamesin interfaceFeatureStructure- Returns:
- an array of feature names
-
getFeatureValue
public FeatureValue getFeatureValue(java.lang.String aFeatureName)
Description copied from interface:FeatureStructureGets the value of a feature- Specified by:
getFeatureValuein interfaceFeatureStructure- Parameters:
aFeatureName- name of feature- Returns:
- value of feature named
aName, or null if there is no such feature
-
setFeatureValue
public void setFeatureValue(java.lang.String aFeatureType, FeatureValue aValue)Description copied from interface:FeatureStructureSets the value of a feature- Specified by:
setFeatureValuein interfaceFeatureStructure- Parameters:
aFeatureType- name of feature to setaValue- value of feature
-
get
public java.lang.Object get()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getId
public java.lang.String getId()
Description copied from interface:FeatureStructureGets 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.- Specified by:
getIdin interfaceFeatureStructure- Returns:
- an ID string
-
isIndexed
@Deprecated public boolean isIndexed()
Deprecated.Description copied from interface:FeatureStructureGets whether this FeatureStructure should be indexed if the CasData is converted to a CAS Object. The CasData itself does not provide indexes.- Specified by:
isIndexedin interfaceFeatureStructure- Returns:
- true if it is indexed
-
setId
public void setId(java.lang.String string)
Description copied from interface:FeatureStructureSets 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.- Specified by:
setIdin interfaceFeatureStructure- Parameters:
string- -
-
setIndexed
@Deprecated public void setIndexed(boolean b)
Deprecated.Description copied from interface:FeatureStructureSets whether this FeatureStructure should be indexed if the CasData is converted to a CAS Object. The CasData itself does not provide indexes.- Specified by:
setIndexedin interfaceFeatureStructure- Parameters:
b- true if this FS should be indexed, false if not
-
getIndexed
public int[] getIndexed()
Description copied from interface:FeatureStructureGets 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.- Specified by:
getIndexedin interfaceFeatureStructure- 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.
-
setIndexed
public void setIndexed(int[] aIndexed)
Description copied from interface:FeatureStructureSets 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.- Specified by:
setIndexedin interfaceFeatureStructure- 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.
-
-