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 {@link org.apache.uima.cas.CAS#createView CAS.createView(string-view-name)}. From the returned CAS view, you can get the associated SofaFS instance, using {@link org.apache.uima.cas.CAS#getSofa 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: {@link org.apache.uima.cas.SofaFS#setLocalSofaData(FeatureStructure) SofaFS.setLocalSofaData()}. If the data is remote from the CAS use: {@link org.apache.uima.cas.SofaFS#setRemoteSofaURI 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|