public abstract class FeatureStructureImpl extends Object implements FeatureStructure, Cloneable
| Constructor and Description |
|---|
FeatureStructureImpl() |
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
Creates a copy of this feature structure.
|
abstract int |
getAddress() |
int |
getavoidcollisionTypeCode() |
boolean |
getBooleanValue(Feature feat)
Get the boolean value of a feature.
|
byte |
getByteValue(Feature feat)
Get the byte value of a feature.
|
protected abstract CASImpl |
getCASImpl() |
double |
getDoubleValue(Feature feat)
Get the double value of a feature.
|
FeatureStructure |
getFeatureValue(Feature feat)
Get a feature value.
|
String |
getFeatureValueAsString(Feature feat)
Get the value of the feature as a string if the type of the feature is one of the primitive
type.
|
float |
getFloatValue(Feature feat)
Get the float value of a feature.
|
int |
getIntValue(Feature feat)
Get the int value of a feature.
|
long |
getLongValue(Feature feat)
Get the long value of a feature.
|
short |
getShortValue(Feature feat)
Get the short value of a feature.
|
String |
getStringValue(Feature f)
Get the string value under a feature.
|
Type |
getType()
Get the type of this FS.
|
void |
prettyPrint(int indent,
int incr,
StringBuffer buf,
boolean useShortNames) |
void |
prettyPrint(int indent,
int incr,
StringBuffer buf,
boolean useShortNames,
String s) |
void |
prettyPrint(int indent,
int incr,
StringBuffer buf,
boolean useShortNames,
String s,
org.apache.uima.cas.impl.FeatureStructureImpl.PrintReferences printRefs) |
void |
setBooleanValue(Feature feat,
boolean b)
Set the boolean value of a feature.
|
void |
setByteValue(Feature feat,
byte val)
Set the byte (8 bit) value of a feature.
|
void |
setDoubleValue(Feature feat,
double val)
Set the double value of a feature.
|
void |
setFeatureValue(Feature feat,
FeatureStructure fs)
Set a feature value to another FS.
|
void |
setFeatureValueFromString(Feature feat,
String s)
Sets the value of a feature from a string input if the feature type is one of the primitive
types.
|
void |
setFloatValue(Feature feat,
float val)
Set the float value of a feature.
|
void |
setIntValue(Feature feat,
int val)
Set the int value of a feature.
|
void |
setLongValue(Feature feat,
long val)
Set the long (64 bit) value of a feature.
|
void |
setShortValue(Feature feat,
short val)
Set the short (16 bit) value of a feature.
|
void |
setStringValue(Feature feat,
String val)
Set the string value of a feature.
|
String |
toString() |
String |
toString(int indent) |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitequals, getCAS, hashCodepublic abstract int getAddress()
protected abstract CASImpl getCASImpl()
public Type getType()
FeatureStructuregetType in interface FeatureStructurepublic int getavoidcollisionTypeCode()
public void setFeatureValue(Feature feat, FeatureStructure fs)
FeatureStructuresetFeatureValue in interface FeatureStructurefeat - The feature whose value should be set.fs - The value FS.public void setIntValue(Feature feat, int val)
FeatureStructuresetIntValue in interface FeatureStructurefeat - The feature whose value we want to set.val - The int we're setting the feature to.public void setFloatValue(Feature feat, float val)
FeatureStructuresetFloatValue in interface FeatureStructurefeat - The feature whose value we want to set.val - The float we're setting the feature to.public void setStringValue(Feature feat, String val)
FeatureStructuresetStringValue in interface FeatureStructurefeat - The feature whose value we want to set.val - The string we're setting the feature to.public void setByteValue(Feature feat, byte val) throws CASRuntimeException
FeatureStructuresetByteValue in interface FeatureStructurefeat - The feature whose value we want to set.val - The 8bit value we're setting the feature to.CASRuntimeException - tbdpublic void setBooleanValue(Feature feat, boolean b) throws CASRuntimeException
FeatureStructuresetBooleanValue in interface FeatureStructurefeat - The feature whose value we want to set.b - The boolean value we're setting the feature to.CASRuntimeExceptionpublic void setShortValue(Feature feat, short val) throws CASRuntimeException
FeatureStructuresetShortValue in interface FeatureStructurefeat - The feature whose value we want to set.val - The short (16bit) value we're setting the feature to.CASRuntimeExceptionpublic void setLongValue(Feature feat, long val) throws CASRuntimeException
FeatureStructuresetLongValue in interface FeatureStructurefeat - The feature whose value we want to set.val - The long (64bit) value we're setting the feature to.CASRuntimeExceptionpublic void setDoubleValue(Feature feat, double val) throws CASRuntimeException
FeatureStructuresetDoubleValue in interface FeatureStructurefeat - The feature whose value we want to set.val - The double value we're setting the feature to.CASRuntimeExceptionpublic void setFeatureValueFromString(Feature feat, String s) throws CASRuntimeException
FeatureStructuresetFeatureValueFromString in interface FeatureStructurefeat - The feature whose value we want to set.s - The string value that the feature will be set to.CASRuntimeException - If feat is not a primitive type or the value cannot be converted to
this type.public FeatureStructure getFeatureValue(Feature feat) throws CASRuntimeException
FeatureStructuregetFeatureValue in interface FeatureStructurefeat - The feature whose value we want to get.null if the value has not been set.CASRuntimeException - If there is a typing violation, i.e., if feat is not defined for
the type of this FS, or the range type of feat is Float, Integer or
String.public int getIntValue(Feature feat)
FeatureStructuregetIntValue in interface FeatureStructurefeat - The feature whose value we want to get.0 if the value has not been set.public float getFloatValue(Feature feat) throws CASRuntimeException
FeatureStructuregetFloatValue in interface FeatureStructurefeat - The feature whose value we want to get.0.0 if the value has not been set.CASRuntimeException - If feat is not defined for the type of this FS, or if it is not
float valued.public String getStringValue(Feature f) throws CASRuntimeException
FeatureStructuregetStringValue in interface FeatureStructuref - The feature for which we want the value.null if the value has not been set.CASRuntimeException - If there is a typing violation, i.e., if f is not defined for the
type of this feature structure, or if the range type of f is not
String.public byte getByteValue(Feature feat) throws CASRuntimeException
FeatureStructuregetByteValue in interface FeatureStructurefeat - The feature whose value we want to set.0 if the value has not been set.CASRuntimeException - tbdpublic boolean getBooleanValue(Feature feat) throws CASRuntimeException
FeatureStructuregetBooleanValue in interface FeatureStructurefeat - The feature whose value we want to get.0 if the value has not been set.CASRuntimeException - If feat is not defined for the type of this FS, or if it is not
boolean valued.public short getShortValue(Feature feat) throws CASRuntimeException
FeatureStructuregetShortValue in interface FeatureStructurefeat - The feature whose value we want to get.0 if the value has not been set.CASRuntimeException - If feat is not defined for the type of this FS, or if it is not
short valued.public long getLongValue(Feature feat) throws CASRuntimeException
FeatureStructuregetLongValue in interface FeatureStructurefeat - The feature whose value we want to get.0 if the value has not been set.CASRuntimeException - If feat is not defined for the type of this FS, or if it is not
long valued.public double getDoubleValue(Feature feat) throws CASRuntimeException
FeatureStructuregetDoubleValue in interface FeatureStructurefeat - The feature whose value we want to get.0 if the value has not been set.CASRuntimeException - If feat is not defined for the type of this FS, or if it is not
double valued.public String getFeatureValueAsString(Feature feat) throws CASRuntimeException
FeatureStructuregetFeatureValueAsString in interface FeatureStructurefeat - The feature whose value we want to get and whose type is one of the primitve types.CASRuntimeException - If feat is not defined for the type of this FS, or if the type is not
a primitive type.public String toString(int indent)
public void prettyPrint(int indent,
int incr,
StringBuffer buf,
boolean useShortNames)
public void prettyPrint(int indent,
int incr,
StringBuffer buf,
boolean useShortNames,
String s)
public void prettyPrint(int indent,
int incr,
StringBuffer buf,
boolean useShortNames,
String s,
org.apache.uima.cas.impl.FeatureStructureImpl.PrintReferences printRefs)
public Object clone() throws CASRuntimeException
FeatureStructureclone in interface FeatureStructureclone in class ObjectCASRuntimeException - passthruCopyright © 2006–2021 The Apache Software Foundation. All rights reserved.