|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.uima.fsvars.impl.FsVariablesImpl
public class FsVariablesImpl
TODO: Create type commment.
Field Summary |
---|
Fields inherited from interface org.apache.uima.fsvars.FsVariables |
---|
INDEX_NAME, NAME_FEATURE_NAME, TYPE_FEATURE_NAME, TYPE_NAME, VALUE_FEATURE_NAME |
Constructor Summary | |
---|---|
FsVariablesImpl()
|
Method Summary | |
---|---|
boolean |
checkCas(org.apache.uima.cas.CAS cas)
Check a CAS for FsVariable type system and index definition. |
void |
declareFsVariable(java.lang.String name,
org.apache.uima.cas.Type type)
Declare a new FsVariable. |
org.apache.uima.cas.Type |
getFsVariableType(java.lang.String name)
Get the type of an FsVariable. |
org.apache.uima.cas.FeatureStructure |
getVariableValue(java.lang.String name)
Get the FeatureStructure value of a variable. |
void |
init(org.apache.uima.cas.CAS cas)
Initialize this with current CAS. |
boolean |
isFsVariable(java.lang.String name)
Check if a variable of that name exists. |
java.util.List |
listFsVariables()
Return a list of all variable names that are currently declared. |
java.util.List |
listFsVariables(org.apache.uima.cas.Type type)
Return a list of all variable names of those variables whose type is a subtype of the type parameter. |
void |
setVariable(java.lang.String name,
org.apache.uima.cas.FeatureStructure fs)
Set the value of an existing variable. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FsVariablesImpl()
Method Detail |
---|
public void declareFsVariable(java.lang.String name, org.apache.uima.cas.Type type)
FsVariables
isFsVariable(String)
to check if a variable with the same name
already exists.
declareFsVariable
in interface FsVariables
name
- The name of the variable.type
- The type of the variable.public org.apache.uima.cas.Type getFsVariableType(java.lang.String name)
FsVariables
getFsVariableType
in interface FsVariables
name
- The name of the variable.
public org.apache.uima.cas.FeatureStructure getVariableValue(java.lang.String name)
FsVariables
getVariableValue
in interface FsVariables
name
- The name of the variable.
public boolean isFsVariable(java.lang.String name)
FsVariables
isFsVariable
in interface FsVariables
name
- The name of the variable.
true
iff a FsVariable of that name exists.public java.util.List listFsVariables()
FsVariables
listFsVariables
in interface FsVariables
public java.util.List listFsVariables(org.apache.uima.cas.Type type)
FsVariables
listFsVariables
in interface FsVariables
type
- The type of variables we want to see.
public void setVariable(java.lang.String name, org.apache.uima.cas.FeatureStructure fs)
FsVariables
setVariable
in interface FsVariables
name
- The name of the variable.fs
- The value to set.public void init(org.apache.uima.cas.CAS cas)
FsVariables
this
with current CAS. This needs to be called on every process, before
any other APIs are called!
init
in interface FsVariables
cas
- The current CAS.public boolean checkCas(org.apache.uima.cas.CAS cas)
FsVariables
true
,
init(CAS)
will not throw an exception.
checkCas
in interface FsVariables
cas
- The CAS to check.
true
iff CAS contains required type and index.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |