public class FsVariablesImpl extends Object implements FsVariables
INDEX_NAME, NAME_FEATURE_NAME, TYPE_FEATURE_NAME, TYPE_NAME, VALUE_FEATURE_NAME| Constructor and Description |
|---|
FsVariablesImpl() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkCas(org.apache.uima.cas.CAS cas)
Check a CAS for FsVariable type system and index definition.
|
void |
declareFsVariable(String name,
org.apache.uima.cas.Type type)
Declare a new FsVariable.
|
org.apache.uima.cas.Type |
getFsVariableType(String name)
Get the type of an FsVariable.
|
org.apache.uima.cas.FeatureStructure |
getVariableValue(String name)
Get the FeatureStructure value of a variable.
|
void |
init(org.apache.uima.cas.CAS cas)
Initialize
this with current CAS. |
boolean |
isFsVariable(String name)
Check if a variable of that name exists.
|
List |
listFsVariables()
Return a list of all variable names that are currently declared.
|
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(String name,
org.apache.uima.cas.FeatureStructure fs)
Set the value of an existing variable.
|
public void declareFsVariable(String name, org.apache.uima.cas.Type type)
FsVariablesisFsVariable(String) to check if a variable with the same name
already exists.declareFsVariable in interface FsVariablesname - The name of the variable.type - The type of the variable.public org.apache.uima.cas.Type getFsVariableType(String name)
FsVariablesgetFsVariableType in interface FsVariablesname - The name of the variable.public org.apache.uima.cas.FeatureStructure getVariableValue(String name)
FsVariablesgetVariableValue in interface FsVariablesname - The name of the variable.public boolean isFsVariable(String name)
FsVariablesisFsVariable in interface FsVariablesname - The name of the variable.true iff a FsVariable of that name exists.public List listFsVariables()
FsVariableslistFsVariables in interface FsVariablespublic List listFsVariables(org.apache.uima.cas.Type type)
FsVariableslistFsVariables in interface FsVariablestype - The type of variables we want to see.public void setVariable(String name, org.apache.uima.cas.FeatureStructure fs)
FsVariablessetVariable in interface FsVariablesname - The name of the variable.fs - The value to set.public void init(org.apache.uima.cas.CAS cas)
FsVariablesthis with current CAS. This needs to be called on every process, before
any other APIs are called!init in interface FsVariablescas - The current CAS.public boolean checkCas(org.apache.uima.cas.CAS cas)
FsVariablestrue,
init(CAS) will not throw an exception.checkCas in interface FsVariablescas - The CAS to check.true iff CAS contains required type and index.Copyright © 2015. All rights reserved.