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:
- SofaID: Every Sofa in a CAS must have a unique SofaID. SoaIDs are the primary handle or access.
- Mime type: This string feature can be used to describe the type of the data represented by the Sofa.
- Sofa Data: The data itself. This data can be resident in the CAS or it can be a reference to data outside the CAS.
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.