A CAS
object provides the starting point for working with the CAS. It provides access to the type system, to indexes, iterators and filters (constraints). It also lets you create new annotations and other data structures. You can create a CAS
object using static methods on the class {@link org.apache.uima.util.CasCreationUtils}.
The CAS
object is also the container that manages multiple Subjects of Analysis or Sofas. A Sofa represents some form of an unstructured artifact that is processed in a UIMA pipeline. The Java string called the "DocumentText" used in a UIMA text processing pipeline is an example of a Sofa. A Sofa can be analyzed independently using the standard UIMA programming model or analyzed together with other Sofas utilizing the Sofa programming model extensions.
A Sofa is implemented as a built-in CAS type uima.cas.Sofa. Use {@link org.apache.uima.cas.CAS#createSofa CAS.createSofa()} to instantiate a Sofa featurestructure. The {@link SofaFS SofaFS} class provides methods to set and get the features of aSofaFS. Although Sofas are implemented as standard feature structures, generic CAS APIs must never be used to create Sofas or set their features.
Use {@link org.apache.uima.cas.CAS#getView(String)} or{@link org.apache.uima.cas.CAS#getView(SofaFS)} to obtain a view of a particular Sofa in the CAS.This view will provide access to the Sofa data (for example the document text) as well as the index repository, which contains metadata (annotations and other feature structures) about that Sofa.
Use {@link #getTypeSystem getTypeSystem()} to access the type system. With a{@link TypeSystem TypeSystem} object, you can access the {@link Type Type} and{@link Feature Feature} objects for the CAS built-in types. Note that this interface alsoprovides constants for the names of the built-in types and features.
|
|