public interface CAS extends AbstractCas
 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 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
 CAS.createSofa() to instantiate a Sofa feature
 structure. The SofaFS class provides methods to set and get the features of a
 SofaFS. Although Sofas are implemented as standard feature structures, generic CAS APIs must
 never be used to create Sofas or set their features.
 
 Use getView(String) or
 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 getTypeSystem() to access the type system. With a TypeSystem object, you can access the Type and Feature objects for
 the CAS built-in types. Note that this interface also provides constants for the names of the
 built-in types and features.
| Modifier and Type | Field and Description | 
|---|---|
| static String | DEFAULT_LANGUAGE_NAME | 
| static String | FEATURE_BASE_NAME_BEGINBase name of annotation begin feature. | 
| static String | FEATURE_BASE_NAME_ENDBase name of annotation end feature. | 
| static String | FEATURE_BASE_NAME_FS_ARRAYBase name of FSArrayList fsArray feature. | 
| static String | FEATURE_BASE_NAME_HEADBase name of list head feature. | 
| static String | FEATURE_BASE_NAME_INT_ARRAYBase name of FSArrayList fsArray feature. | 
| static String | FEATURE_BASE_NAME_LANGUAGEBase name of document language feature. | 
| static String | FEATURE_BASE_NAME_SOFASofa ID feature that is the handle to a text Sofa. | 
| static String | FEATURE_BASE_NAME_SOFAARRAYBase name of Sofa array fs data feature. | 
| static String | FEATURE_BASE_NAME_SOFAIDBase name of Sofa ID feature. | 
| static String | FEATURE_BASE_NAME_SOFAMIMEBase name of Sofa mime type feature. | 
| static String | FEATURE_BASE_NAME_SOFANUMBase name of Sofa Number feature. | 
| static String | FEATURE_BASE_NAME_SOFASTRINGBase name of Sofa string data feature. | 
| static String | FEATURE_BASE_NAME_SOFAURIBase name of Sofa URI feature. | 
| static String | FEATURE_BASE_NAME_TAILBase name of list tail feature. | 
| static String | FEATURE_FULL_NAME_BEGINFully qualified name of annotation begin feature. | 
| static String | FEATURE_FULL_NAME_ENDFully qualified name of annotation end feature. | 
| static String | FEATURE_FULL_NAME_FLOAT_LIST_HEADQualified name of float list head feature. | 
| static String | FEATURE_FULL_NAME_FLOAT_LIST_TAILQualified name of float list tail feature. | 
| static String | FEATURE_FULL_NAME_FS_LIST_HEADQualified name of fs list head feature. | 
| static String | FEATURE_FULL_NAME_FS_LIST_TAILQualified name of fs list tail feature. | 
| static String | FEATURE_FULL_NAME_INTEGER_LIST_HEADQualified name of integer list head feature. | 
| static String | FEATURE_FULL_NAME_INTEGER_LIST_TAILQualified name of integer list tail feature. | 
| static String | FEATURE_FULL_NAME_LANGUAGEFully qualified name of document language feature. | 
| static String | FEATURE_FULL_NAME_SOFAFully qualified name of annotation sofa feature. | 
| static String | FEATURE_FULL_NAME_SOFAARRAYQualified name of Sofa array fs data feature. | 
| static String | FEATURE_FULL_NAME_SOFAIDQualified name of Sofa id feature. | 
| static String | FEATURE_FULL_NAME_SOFAMIMEQualified name of Sofa mime type feature. | 
| static String | FEATURE_FULL_NAME_SOFANUMQualified name of Sofa number feature. | 
| static String | FEATURE_FULL_NAME_SOFASTRINGQualified name of Sofa string data feature. | 
| static String | FEATURE_FULL_NAME_SOFAURIQualified name of Sofa URI feature. | 
| static String | FEATURE_FULL_NAME_STRING_LIST_HEADQualified name of string list head feature. | 
| static String | FEATURE_FULL_NAME_STRING_LIST_TAILQualified name of string list tail feature. | 
| static String | NAME_DEFAULT_SOFASofa name for the initial view's sofa. | 
| static String | NAME_DEFAULT_TEXT_SOFADeprecated. 
 As of v2.0, this is replaced by  NAME_DEFAULT_SOFA, and the value has
             changed. In general, user code should not need to refer to this name. | 
| static String | NAME_SPACE_UIMA_CASUIMA CAS name space. | 
| static String | NAME_SPACE_UIMA_TCASName of Text CAS name space. | 
| static String | SOFA_INDEX_NAMESofa Index name. | 
| static String | STD_ANNOTATION_INDEXName of the built-in index on annotations. | 
| static String | TYPE_NAME_ANNOTATIONName of annotation type. | 
| static String | TYPE_NAME_ANNOTATION_BASEName of annotation base type. | 
| static String | TYPE_NAME_ARRAY_BASEArrayBase type. | 
| static String | TYPE_NAME_BOOLEANBoolean type. | 
| static String | TYPE_NAME_BOOLEAN_ARRAYBoolean array type. | 
| static String | TYPE_NAME_BYTEByte type. | 
| static String | TYPE_NAME_BYTE_ARRAYByte array type. | 
| static String | TYPE_NAME_DOCUMENT_ANNOTATIONName of document annotation type. | 
| static String | TYPE_NAME_DOUBLEDouble type. | 
| static String | TYPE_NAME_DOUBLE_ARRAYDouble array type. | 
| static String | TYPE_NAME_EMPTY_FLOAT_LISTEmpty float type. | 
| static String | TYPE_NAME_EMPTY_FS_LISTEmpty feature structure list type. | 
| static String | TYPE_NAME_EMPTY_INTEGER_LISTEmpty integer list type. | 
| static String | TYPE_NAME_EMPTY_STRING_LISTEmpty string list type. | 
| static String | TYPE_NAME_FLOATFloat type. | 
| static String | TYPE_NAME_FLOAT_ARRAYFloat array type. | 
| static String | TYPE_NAME_FLOAT_LISTFloat list type. | 
| static String | TYPE_NAME_FS_ARRAYFeature structure array type. | 
| static String | TYPE_NAME_FS_LISTFeature structure list type. | 
| static String | TYPE_NAME_INTEGERInteger type. | 
| static String | TYPE_NAME_INTEGER_ARRAYInteger array type. | 
| static String | TYPE_NAME_INTEGER_LISTInteger list type. | 
| static String | TYPE_NAME_LIST_BASEAbstract list base type. | 
| static String | TYPE_NAME_LONGLong type. | 
| static String | TYPE_NAME_LONG_ARRAYLong array type. | 
| static String | TYPE_NAME_NON_EMPTY_FLOAT_LISTNon-empty float list type. | 
| static String | TYPE_NAME_NON_EMPTY_FS_LISTNon-empty feature structure list type. | 
| static String | TYPE_NAME_NON_EMPTY_INTEGER_LISTNon-empty integer list type. | 
| static String | TYPE_NAME_NON_EMPTY_STRING_LISTNon-empty string list type. | 
| static String | TYPE_NAME_SHORTShort type. | 
| static String | TYPE_NAME_SHORT_ARRAYShort array type. | 
| static String | TYPE_NAME_SOFASofa type. | 
| static String | TYPE_NAME_STRINGString type. | 
| static String | TYPE_NAME_STRING_ARRAYString array type. | 
| static String | TYPE_NAME_STRING_LISTString list type. | 
| static String | TYPE_NAME_TOPTop type. | 
| static String | UIMA_CAS_PREFIXUIMA CAS name space prefix to prepend to type names (adds an extra period to the name space
 proper. | 
| static String | UIMA_TCAS_PREFIXUIMA TCAS name space prefix to prepend to type names (adds an extra period to the name space
 proper. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addFsToIndexes(FeatureStructure fs)Add a feature structure to all appropriate indexes in the repository associated with this CAS
 View. | 
| <T extends AnnotationFS> | createAnnotation(Type type,
                int begin,
                int end)Create a new annotation. | 
| ArrayFS | createArrayFS(int length)Create a new feature structure array. | 
| BooleanArrayFS | createBooleanArrayFS(int length)Create a new Boolean array. | 
| ByteArrayFS | createByteArrayFS(int length)Create a new Byte array. | 
| DoubleArrayFS | createDoubleArrayFS(int length)Create a new Double array. | 
| FeaturePath | createFeaturePath()Create a feature path. | 
| FeatureValuePath | createFeatureValuePath(String featureValuePath)Create a feature-value path from a string. | 
| <T extends FeatureStructure> | createFilteredIterator(FSIterator<T> it,
                      FSMatchConstraint cons)Create an iterator over structures satisfying a given constraint. | 
| FloatArrayFS | createFloatArrayFS(int length)Create a new int array. | 
| <T extends FeatureStructure> | createFS(Type type)Create a new FeatureStructure. | 
| IntArrayFS | createIntArrayFS(int length)Create a new int array. | 
| LongArrayFS | createLongArrayFS(int length)Create a new Long array. | 
| Marker | createMarker()Sets a mark and returns the marker object set with the current mark which can be used to query
 when certain FSs were created. | 
| ShortArrayFS | createShortArrayFS(int length)Create a new Short array. | 
| SofaFS | createSofa(SofaID sofaID,
          String mimeType)Deprecated. 
 As of v2.0, use  createView(String)instead. | 
| StringArrayFS | createStringArrayFS(int length)Create a new String array. | 
| CAS | createView(String localViewName)Create a view and its underlying Sofa (subject of analysis). | 
| default <T extends TOP> | emptyArray(Class<T> clazz) | 
| default BooleanArray | emptyBooleanArray() | 
| default ByteArray | emptyByteArray() | 
| default DoubleArray | emptyDoubleArray() | 
| default FloatArray | emptyFloatArray() | 
| default EmptyFloatList | emptyFloatList() | 
| default <T extends FeatureStructure> | emptyFSArray() | 
| default <T extends FeatureStructure> | emptyFSArray(Type type) | 
| default <T extends TOP> | emptyFSList() | 
| default IntegerArray | emptyIntegerArray() | 
| default EmptyIntegerList | emptyIntegerList() | 
| default <T extends TOP> | emptyList(Class<T> clazz) | 
| default LongArray | emptyLongArray() | 
| default ShortArray | emptyShortArray() | 
| default StringArray | emptyStringArray() | 
| default EmptyStringList | emptyStringList() | 
| <T extends FeatureStructure> | fs2listIterator(FSIterator<T> it)Wrap a standard Java  ListIteratoraround an FSListIterator. | 
| default <T extends TOP> | getAllIndexedFS(Class<T> clazz)Gets an iterator over all indexed (in this CAS view) FeatureStructures of the specified Type
 (and any of its subtypes). | 
| default <T extends TOP> | getAllIndexedFS(Type type)Gets an iterator over all indexed (in this CAS view) FeatureStructures of the specified Type
 (and any of its subtypes). | 
| <T extends AnnotationFS> | getAnnotationIndex()Get the standard annotation index. | 
| default <T extends AnnotationFS> | getAnnotationIndex(Class<T> clazz)Get the standard annotation index restricted to a specific annotation type. | 
| <T extends AnnotationFS> | getAnnotationIndex(Type type)Get the standard annotation index restricted to a specific annotation type. | 
| Type | getAnnotationType()Get the type object for the annotation type. | 
| Feature | getBeginFeature()Get the feature object for the annotation begin feature. | 
| default <T extends TOP> | getCasType(Class<T> clazz) | 
| ConstraintFactory | getConstraintFactory()Get a constraint factory. | 
| CAS | getCurrentView()Get the Cas view that the current component should use. | 
| <T extends AnnotationFS> | getDocumentAnnotation()Get the Document Annotation. | 
| String | getDocumentLanguage()Gets the language code for this document from the language feature of the special instance of
 the DocumentationAnnotation associated with this CAS. | 
| String | getDocumentText()Get the document text. | 
| Feature | getEndFeature()Get the feature object for the annotation end feature. | 
| default Collection<TOP> | getIndexedFSs()Returns an unmodifiable collection of all of the FSs that are indexed in this view, in an
 arbitrary order. | 
| default <T extends TOP> | getIndexedFSs(Class<T> clazz)Returns a collection of all the FSs that are indexed in this view, in an arbitrary order. | 
| default <T extends TOP> | getIndexedFSs(Type type)Returns an unmodifiable collection of all the FSs that are indexed in this view, in an
 arbitrary order. | 
| FSIndexRepository | getIndexRepository()Get the index repository. | 
| JCas | getJCas()Get the JCas view for this CAS view | 
| JCas | getJCas(SofaFS aSofa)Create a JCas view for a Sofa. | 
| JCas | getJCas(SofaID aSofaID)Deprecated. 
 As of v2.0, use  getView(String)followed bygetJCas(). | 
| default JCasImpl | getJCasImpl()Get the JCasImpl view for this CAS view | 
| LowLevelCAS | getLowLevelCAS()Get an instance of the low-level CAS. | 
| SofaFS | getSofa()Get the Sofa feature structure associated with this CAS view. | 
| SofaFS | getSofa(SofaID sofaID)Deprecated. 
 As of v2.0, use {#getView(String)}. From the view you can access the Sofa data, or
             call  getSofa()if you truly need to access the SofaFS object. | 
| FeatureStructure | getSofaDataArray()Get the Sofa data array. | 
| InputStream | getSofaDataStream()Get the Sofa data as a byte stream. | 
| String | getSofaDataString()Get the Sofa Data String (a.k.a. | 
| String | getSofaDataURI()Get the Sofa data array. | 
| <T extends SofaFS> | getSofaIterator()Get iterator for all SofaFS in the CAS. | 
| String | getSofaMimeType()Get the mime type of the Sofa data being analyzed. | 
| TypeSystem | getTypeSystem()Return the type system of this CAS instance. | 
| CAS | getView(SofaFS aSofa)Get the view for a Sofa (subject of analysis). | 
| CAS | getView(String localViewName)Get the view for a Sofa (subject of analysis). | 
| <T extends CAS> | getViewIterator()Get iterator over all views in this CAS. | 
| Iterator<CAS> | getViewIterator(String localViewNamePrefix)Get iterator over all views with the given name prefix. | 
| String | getViewName()Get the view name. | 
| AutoCloseable | protectIndexes()Call this method to set up a region, ended by a  AutoCloseable.close()call on
 the returned object, You can use this or theprotectIndexes(Runnable)method to
 protected the indexes. | 
| void | protectIndexes(Runnable runnable)Runs the code in the runnable inside a protection block, where any modifications to features
 done while in this block will be done in a way to protect any indexes which otherwise might
 become corrupted by the update action; the protection is achieved by temporarily removing the
 FS (if it is in the indexes), before the update happens. | 
| void | removeFsFromIndexes(FeatureStructure fs)Remove a feature structure from all indexes in the repository associated with this CAS View. | 
| void | reset()Reset the CAS, emptying it of all content. | 
| default <T extends TOP> | select() | 
| default <T extends TOP> | select(Class<T> clazz) | 
| default <T extends TOP> | select(int jcasType) | 
| default <T extends TOP> | select(String fullyQualifiedTypeName) | 
| default <T extends TOP> | select(Type type) | 
| void | setCurrentComponentInfo(ComponentInfo info)Informs the CAS of relevant information about the component that is currently processing it. | 
| void | setDocumentLanguage(String languageCode)Sets the language for this document. | 
| void | setDocumentText(String text)Set the document text. | 
| void | setSofaDataArray(FeatureStructure array,
                String mime)Set the Sofa data as an ArrayFS. | 
| void | setSofaDataString(String text,
                 String mimetype)Set the document text. | 
| void | setSofaDataURI(String uri,
              String mime)Set the Sofa data as a URI. | 
| int | size()Estimate the memory consumption of this CAS instance (in bytes). | 
releasestatic final String NAME_SPACE_UIMA_CAS
static final String UIMA_CAS_PREFIX
static final String TYPE_NAME_TOP
static final String TYPE_NAME_INTEGER
static final String TYPE_NAME_FLOAT
static final String TYPE_NAME_STRING
static final String TYPE_NAME_BOOLEAN
static final String TYPE_NAME_BYTE
static final String TYPE_NAME_SHORT
static final String TYPE_NAME_LONG
static final String TYPE_NAME_DOUBLE
static final String TYPE_NAME_ARRAY_BASE
static final String TYPE_NAME_FS_ARRAY
static final String TYPE_NAME_INTEGER_ARRAY
static final String TYPE_NAME_FLOAT_ARRAY
static final String TYPE_NAME_STRING_ARRAY
static final String TYPE_NAME_BOOLEAN_ARRAY
static final String TYPE_NAME_BYTE_ARRAY
static final String TYPE_NAME_SHORT_ARRAY
static final String TYPE_NAME_LONG_ARRAY
static final String TYPE_NAME_DOUBLE_ARRAY
static final String TYPE_NAME_SOFA
static final String TYPE_NAME_ANNOTATION_BASE
static final String FEATURE_BASE_NAME_SOFANUM
static final String FEATURE_BASE_NAME_SOFAID
static final String FEATURE_BASE_NAME_SOFAMIME
static final String FEATURE_BASE_NAME_SOFAURI
static final String FEATURE_BASE_NAME_SOFASTRING
static final String FEATURE_BASE_NAME_SOFAARRAY
static final String FEATURE_BASE_NAME_FS_ARRAY
static final String FEATURE_BASE_NAME_INT_ARRAY
static final String FEATURE_FULL_NAME_SOFANUM
static final String FEATURE_FULL_NAME_SOFAID
static final String FEATURE_FULL_NAME_SOFAMIME
static final String FEATURE_FULL_NAME_SOFAURI
static final String FEATURE_FULL_NAME_SOFASTRING
static final String FEATURE_FULL_NAME_SOFAARRAY
static final String SOFA_INDEX_NAME
@Deprecated static final String NAME_DEFAULT_TEXT_SOFA
NAME_DEFAULT_SOFA, and the value has
             changed. In general, user code should not need to refer to this name.static final String NAME_DEFAULT_SOFA
static final String TYPE_NAME_LIST_BASE
static final String TYPE_NAME_FS_LIST
static final String TYPE_NAME_NON_EMPTY_FS_LIST
static final String TYPE_NAME_EMPTY_FS_LIST
static final String TYPE_NAME_INTEGER_LIST
static final String TYPE_NAME_NON_EMPTY_INTEGER_LIST
static final String TYPE_NAME_EMPTY_INTEGER_LIST
static final String TYPE_NAME_FLOAT_LIST
static final String TYPE_NAME_NON_EMPTY_FLOAT_LIST
static final String TYPE_NAME_EMPTY_FLOAT_LIST
static final String TYPE_NAME_STRING_LIST
static final String TYPE_NAME_NON_EMPTY_STRING_LIST
static final String TYPE_NAME_EMPTY_STRING_LIST
static final String FEATURE_BASE_NAME_HEAD
static final String FEATURE_BASE_NAME_TAIL
static final String FEATURE_FULL_NAME_FS_LIST_HEAD
static final String FEATURE_FULL_NAME_INTEGER_LIST_HEAD
static final String FEATURE_FULL_NAME_FLOAT_LIST_HEAD
static final String FEATURE_FULL_NAME_STRING_LIST_HEAD
static final String FEATURE_FULL_NAME_FS_LIST_TAIL
static final String FEATURE_FULL_NAME_INTEGER_LIST_TAIL
static final String FEATURE_FULL_NAME_FLOAT_LIST_TAIL
static final String FEATURE_FULL_NAME_STRING_LIST_TAIL
static final String NAME_SPACE_UIMA_TCAS
static final String UIMA_TCAS_PREFIX
static final String TYPE_NAME_ANNOTATION
static final String TYPE_NAME_DOCUMENT_ANNOTATION
static final String FEATURE_BASE_NAME_SOFA
static final String FEATURE_BASE_NAME_BEGIN
static final String FEATURE_BASE_NAME_END
static final String FEATURE_BASE_NAME_LANGUAGE
static final String FEATURE_FULL_NAME_BEGIN
static final String FEATURE_FULL_NAME_SOFA
static final String FEATURE_FULL_NAME_END
static final String FEATURE_FULL_NAME_LANGUAGE
static final String STD_ANNOTATION_INDEX
static final String DEFAULT_LANGUAGE_NAME
<T extends FeatureStructure> T createFS(Type type) throws CASRuntimeException
T - the Java cover class for the FS being createdtype - The type of the FS.CASRuntimeExceptionArrayFS createArrayFS(int length) throws CASRuntimeException
length - The length of the array.CASRuntimeExceptionIntArrayFS createIntArrayFS(int length) throws CASRuntimeException
length - The length of the array.CASRuntimeExceptionFloatArrayFS createFloatArrayFS(int length) throws CASRuntimeException
length - The length of the array.CASRuntimeExceptionStringArrayFS createStringArrayFS(int length) throws CASRuntimeException
length - The length of the array.CASRuntimeExceptionByteArrayFS createByteArrayFS(int length) throws CASRuntimeException
length - The length of the array.CASRuntimeExceptionBooleanArrayFS createBooleanArrayFS(int length) throws CASRuntimeException
length - The length of the array.CASRuntimeExceptionShortArrayFS createShortArrayFS(int length) throws CASRuntimeException
length - The length of the array.CASRuntimeExceptionLongArrayFS createLongArrayFS(int length) throws CASRuntimeException
length - The length of the array.CASRuntimeExceptionDoubleArrayFS createDoubleArrayFS(int length) throws CASRuntimeException
length - The length of the array.CASRuntimeExceptionJCas getJCas() throws CASException
CASException - not thrown in v3, but kept for backwards compatibilitydefault JCasImpl getJCasImpl()
CAS getCurrentView()
@Deprecated SofaFS getSofa(SofaID sofaID)
getSofa() if you truly need to access the SofaFS object.sofaID - -SofaFS getSofa()
CAS createView(String localViewName)
 This method creates the underlying Sofa feature structure, but does not set the Sofa data.
 Setting ths Sofa data must be done by calling
 setSofaDataArray(FeatureStructure, String), setSofaDataString(String, String)
 or setSofaDataURI(String, String) on the CAS view returned by this method.
localViewName - the local name, before any sofa name mapping is done, for this view (note: this is the
          same as the associated Sofa name).CASRuntimeException - if a View with this name already exists in this CASJCas getJCas(SofaFS aSofa) throws CASException
aSofa - a Sofa feature structure in this CAS.CASException - -@Deprecated JCas getJCas(SofaID aSofaID) throws CASException
getView(String) followed by getJCas().getView(aSofaID).getJCas().aSofaID - the ID of a Sofa defined in this CASaSofaID.CASException - if no Sofa with the given ID exists in this CASCAS getView(String localViewName)
localViewName - the local name, before any sofa name mapping is done, for this view (note: this is the
          same as the associated Sofa name).CASRuntimeException - if no View with this name exists in this CASCAS getView(SofaFS aSofa)
aSofa - a Sofa feature structure in the CASLowLevelCAS getLowLevelCAS()
Note: This is for internal use.
LowLevelCASType getAnnotationType()
Feature getBeginFeature()
Feature getEndFeature()
<T extends AnnotationFS> AnnotationIndex<T> getAnnotationIndex()
T - either Annotation (if JCas is in use) or AnnotationImpl<T extends AnnotationFS> AnnotationIndex<T> getAnnotationIndex(Type type) throws CASRuntimeException
T - the topmost Java class corresponding to the typetype - The annotation type the index is restricted to.type.CASRuntimeException - When type is not an annotation type.default <T extends AnnotationFS> AnnotationIndex<T> getAnnotationIndex(Class<T> clazz) throws CASRuntimeException
T - the topmost Java class corresponding to the typeclazz - The annotation type the index is restricted to, specified as a JCas classtype.CASRuntimeException - When type is not an annotation type.<T extends AnnotationFS> AnnotationFS createAnnotation(Type type, int begin, int end)
T - the Java class corresponding to the typetype - The type of the annotation.begin - The start of the annotation.end - The end of the annotation.<T extends AnnotationFS> T getDocumentAnnotation()
T - the Java class for the document annotation. Could be the JCas cover class or
          FeatureStructurevoid setCurrentComponentInfo(ComponentInfo info)
info - information about the component that is currently processing this CAS.TypeSystem getTypeSystem() throws CASRuntimeException
null if none is available.CASRuntimeException - If the type system has not been committed.@Deprecated SofaFS createSofa(SofaID sofaID, String mimeType)
createView(String) instead.sofaID - -mimeType - -<T extends SofaFS> FSIterator<T> getSofaIterator()
T - generic type of sofa iterator<T extends FeatureStructure> FSIterator<T> createFilteredIterator(FSIterator<T> it, FSMatchConstraint cons)
ConstraintFactory and related classes.T - - the type of the Feature Structureit - The input iterator.cons - The constraint specifying what structures should be returned.ConstraintFactory getConstraintFactory()
FSMatchConstraints.FeaturePath createFeaturePath()
FSMatchConstraints.FSIndexRepository getIndexRepository()
null if none is available.<T extends FeatureStructure> ListIterator<T> fs2listIterator(FSIterator<T> it)
ListIterator around an FSListIterator. Use
 if you feel more comfortable with java style iterators.T - The type of FeatureStructureit - The FSListIterator to be wrapped.ListIterator.void reset()
    throws CASAdminException
CASRuntimeException - When called out of sequence.CASAdminExceptionCASMgrString getViewName()
int size()
FeatureValuePath createFeatureValuePath(String featureValuePath) throws CASRuntimeException
featureValuePath - String representation of the feature-value path.CASRuntimeException - If the input string is not well-formed.void setDocumentText(String text) throws CASRuntimeException
text - The text to be analyzed.CASRuntimeException - If the Sofa data has already been set.void setSofaDataString(String text, String mimetype) throws CASRuntimeException
text - The text to be analyzed.mimetype - The mime type of the dataCASRuntimeException - If the Sofa data has already been set.String getDocumentText()
null if not set.String getSofaDataString()
null if not set.void setDocumentLanguage(String languageCode) throws CASRuntimeException
languageCode - -CASRuntimeException - passthruString getDocumentLanguage()
void setSofaDataArray(FeatureStructure array, String mime) throws CASRuntimeException
array - The ArrayFS to be analyzed.mime - The mime type of the dataCASRuntimeException - If the Sofa data has already been set.FeatureStructure getSofaDataArray()
null if not set.void setSofaDataURI(String uri, String mime) throws CASRuntimeException
uri - The URI of the data to be analyzed.mime - The mime type of the dataCASRuntimeException - If the Sofa data has already been set.String getSofaDataURI()
null if not set.InputStream getSofaDataStream()
null if not set.String getSofaMimeType()
void addFsToIndexes(FeatureStructure fs)
 Important: after you have called addFsToIndexes(...) on a FS, do not change
 the values of any features used for indexing. If you do, the index will become corrupted and
 may be unusable. If you need to change an index feature value, first call
 removeFsFromIndexes(...) on the FS, change the
 feature values, then call addFsToIndexes(...) again.
fs - The Feature Structure to be added.NullPointerException - If the fs parameter is null.void removeFsFromIndexes(FeatureStructure fs)
fs - The Feature Structure to be removed.NullPointerException - If the fs parameter is null.<T extends CAS> Iterator<T> getViewIterator()
T - generic type of returned viewIterator<CAS> getViewIterator(String localViewNamePrefix)
 When passed the prefix namePrefix, the iterator will return all views who name is either
 exactly equal to namePrefix or is of the form
 namePrefix.suffix, where suffix can be any String.
localViewNamePrefix - the local name prefix, before any sofa name mapping is done, for this view (note: this
          is the same as the associated Sofa name prefix).Marker createMarker()
AutoCloseable protectIndexes()
AutoCloseable.close() call on
 the returned object, You can use this or the protectIndexes(Runnable) method to
 protected the indexes.
 This approach allows arbitrary code between the protectIndexes and the associated close method.
The close method is best done in a finally block, or using the try-with-resources statement in Java 8.
void protectIndexes(Runnable runnable)
runnable - code to execute while protecting the indexes.default <T extends TOP> SelectFSs<T> select()
T - the Type of the elements being accesseddefault <T extends TOP> SelectFSs<T> select(Type type)
T - the Type of the elements being accessedtype - specifies the type (and subtypes of that type) to accessIllegalArgumentException - if no type is specified.default <T extends TOP> SelectFSs<T> select(Class<T> clazz)
T - the Type of the elements being accessedclazz - a JCas class corresponding to the type (and subtypes of that type) to accessIllegalArgumentException - if no type is specified.default <T extends TOP> SelectFSs<T> select(int jcasType)
T - the Type of the elements being accessedjcasType - the "type" field from the JCas class corresponding to the type (and subtypes of that
          type) to accessIllegalArgumentException - if no type is specified.default <T extends TOP> SelectFSs<T> select(String fullyQualifiedTypeName)
T - the Type of the elements being accessedfullyQualifiedTypeName - the string name of the type to accessIllegalArgumentException - if no type is specified.default <T extends TOP> EmptyList emptyList(Class<T> clazz)
T - the type of the element of the listclazz - a JCas class corresponding to the type (and subtypes of that type) to accessdefault EmptyFloatList emptyFloatList()
default <T extends TOP> EmptyFSList<T> emptyFSList()
T - the type of the elements of the FSListdefault EmptyIntegerList emptyIntegerList()
default EmptyStringList emptyStringList()
default <T extends TOP> CommonArrayFS<T> emptyArray(Class<T> clazz)
T - the type of the elements of the arrayclazz - the class of the elements of the arraydefault FloatArray emptyFloatArray()
default <T extends FeatureStructure> FSArray<T> emptyFSArray()
T - the type of the elements of the FSArraydefault <T extends FeatureStructure> FSArray<T> emptyFSArray(Type type)
T - the type of the elements of the FSArraytype - the type of the elements of the FSArraydefault IntegerArray emptyIntegerArray()
default StringArray emptyStringArray()
default DoubleArray emptyDoubleArray()
default LongArray emptyLongArray()
default ShortArray emptyShortArray()
default ByteArray emptyByteArray()
default BooleanArray emptyBooleanArray()
default <T extends TOP> Type getCasType(Class<T> clazz)
T - the type of the JCas classclazz - - a JCas classdefault <T extends TOP> FSIterator<T> getAllIndexedFS(Class<T> clazz)
T - the Java clazzclazz - - the JCas Java class specifing which type and subtypes are includeddefault <T extends TOP> FSIterator<T> getAllIndexedFS(Type type)
T - the JCas class the iterator usestype - the type of Feature Structures to include (including subtypes)default <T extends TOP> Collection<T> getIndexedFSs(Type type)
T - The Java class associated with typetype - the type of Feature Structures to include (including subtypes)default Collection<TOP> getIndexedFSs()
default <T extends TOP> Collection<T> getIndexedFSs(Class<T> clazz)
T - The Java class associated with typeclazz - The JCas class corresponding to the typeCopyright © 2006–2022 The Apache Software Foundation. All rights reserved.