|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SofaFS
Interface for "Subject of Analysis" (Sofa) feature structures. A Sofa is implemented as a built-in CAS type uima.cas.Sofa. The features of the Sofa type include:
SofaFS (the feature structure that represents a sofa) are created as a side effect of
creating a new CAS view. To create a new CAS view, use
CAS.createView(string-view-name)
.
From the returned CAS view, you can get the associated SofaFS instance, using
CAS.getSofa()
.
The SofaFS interface provides methods to set the values of the features of the Sofa FS. Generic CAS APIs
should never be used to create Sofas or set their features.
Sofa data can be contained locally in the CAS itself or it can be remote from CAS. To set the
local Sofa data in the Sofa FS use:
SofaFS.setLocalSofaData()
. If the data is
remote from the CAS use:
SofaFS.setRemoteSofaURI()
.
Once set, the Sofa data cannot be set again until the CAS has been reset. This is so that annotators cannot change the subject of analysis during processing.
Method Summary | |
---|---|
FeatureStructure |
getLocalFSData()
Get the Local Subject of Analysis returns null if not previously set. |
String |
getLocalStringData()
Get the Local Subject of Analysis returns null if not previously set. |
InputStream |
getSofaDataStream()
Provides stream access to both local and remote Sofa data. |
String |
getSofaID()
Get the Sofa globally unique name, after mapping. |
String |
getSofaMime()
Get the Sofa mime type. |
int |
getSofaRef()
Get the Sofa Ref value. |
String |
getSofaURI()
Get the Sofa URI value. |
void |
setLocalSofaData(FeatureStructure aFS)
Set the Local Subject of Analysis to be a predefined ArrayFS. |
void |
setLocalSofaData(String aString)
Set the Local Subject of Analysis to be a String. |
void |
setRemoteSofaURI(String aURI)
Set the URI for a Remote Subject of Analysis. |
Methods inherited from interface org.apache.uima.cas.FeatureStructure |
---|
clone, equals, getBooleanValue, getByteValue, getCAS, getDoubleValue, getFeatureValue, getFeatureValueAsString, getFloatValue, getIntValue, getLongValue, getShortValue, getStringValue, getType, hashCode, setBooleanValue, setByteValue, setDoubleValue, setFeatureValue, setFeatureValueFromString, setFloatValue, setIntValue, setLongValue, setShortValue, setStringValue |
Method Detail |
---|
void setRemoteSofaURI(String aURI) throws CASRuntimeException
CASRuntimeException
- if the Sofa data has already been setvoid setLocalSofaData(FeatureStructure aFS) throws CASRuntimeException
CASRuntimeException
- if given FS is not an ArrayFS, or if the Sofa data has already been setvoid setLocalSofaData(String aString) throws CASRuntimeException
CASRuntimeException
- if the Sofa data has already been setFeatureStructure getLocalFSData()
String getLocalStringData()
String getSofaMime()
String getSofaID()
String getSofaURI()
int getSofaRef()
InputStream getSofaDataStream()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |