Interface CAS

All Superinterfaces:
AbstractCas
All Known Implementing Classes:
CASImpl

public interface CAS extends AbstractCas
Object-oriented CAS (Common Analysis System) API.

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.

  • Field Details

  • Method Details

    • createFS

      <T extends FeatureStructure> T createFS(Type type) throws CASRuntimeException
      Create a new FeatureStructure.
      Type Parameters:
      T - the Java cover class for the FS being created
      Parameters:
      type - The type of the FS.
      Returns:
      The new FS.
      Throws:
      CASRuntimeException
    • createArrayFS

      ArrayFS createArrayFS(int length) throws CASRuntimeException
      Create a new feature structure array.
      Parameters:
      length - The length of the array.
      Returns:
      The new array.
      Throws:
      CASRuntimeException
    • createIntArrayFS

      IntArrayFS createIntArrayFS(int length) throws CASRuntimeException
      Create a new int array.
      Parameters:
      length - The length of the array.
      Returns:
      The new array.
      Throws:
      CASRuntimeException
    • createFloatArrayFS

      FloatArrayFS createFloatArrayFS(int length) throws CASRuntimeException
      Create a new int array.
      Parameters:
      length - The length of the array.
      Returns:
      The new array.
      Throws:
      CASRuntimeException
    • createStringArrayFS

      StringArrayFS createStringArrayFS(int length) throws CASRuntimeException
      Create a new String array.
      Parameters:
      length - The length of the array.
      Returns:
      The new array.
      Throws:
      CASRuntimeException
    • createByteArrayFS

      ByteArrayFS createByteArrayFS(int length) throws CASRuntimeException
      Create a new Byte array.
      Parameters:
      length - The length of the array.
      Returns:
      The new array.
      Throws:
      CASRuntimeException
    • createBooleanArrayFS

      BooleanArrayFS createBooleanArrayFS(int length) throws CASRuntimeException
      Create a new Boolean array.
      Parameters:
      length - The length of the array.
      Returns:
      The new array.
      Throws:
      CASRuntimeException
    • createShortArrayFS

      ShortArrayFS createShortArrayFS(int length) throws CASRuntimeException
      Create a new Short array.
      Parameters:
      length - The length of the array.
      Returns:
      The new array.
      Throws:
      CASRuntimeException
    • createLongArrayFS

      LongArrayFS createLongArrayFS(int length) throws CASRuntimeException
      Create a new Long array.
      Parameters:
      length - The length of the array.
      Returns:
      The new array.
      Throws:
      CASRuntimeException
    • createDoubleArrayFS

      DoubleArrayFS createDoubleArrayFS(int length) throws CASRuntimeException
      Create a new Double array.
      Parameters:
      length - The length of the array.
      Returns:
      The new array.
      Throws:
      CASRuntimeException
    • getJCas

      JCas getJCas() throws CASException
      Get the JCas view for this CAS view
      Returns:
      The JCas view for this CAS view
      Throws:
      CASException - not thrown in v3, but kept for backwards compatibility
    • getJCasImpl

      default JCasImpl getJCasImpl()
      Get the JCasImpl view for this CAS view
      Returns:
      the JCasImpl view for this CAS view
    • getCurrentView

      CAS getCurrentView()
      Get the Cas view that the current component should use. This should only be used by single-view components.
      Returns:
      the Cas view specified for the current component by Sofa mapping. Defaults to _InitialView if there is no Sofa mapping.
    • getSofa

      @Deprecated 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.
      Get sofaFS for given Subject of Analysis ID.
      Parameters:
      sofaID - -
      Returns:
      The sofaFS.
    • getSofa

      SofaFS getSofa()
      Get the Sofa feature structure associated with this CAS view.
      Returns:
      The SofaFS associated with this CAS view.
    • createView

      CAS createView(String localViewName)
      Create a view and its underlying Sofa (subject of analysis). The view provides access to the Sofa data and the index repository that contains metadata (annotations and other feature structures) pertaining to that Sofa.

      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.

      Parameters:
      localViewName - the local name, before any sofa name mapping is done, for this view (note: this is the same as the associated Sofa name).
      Returns:
      The view corresponding to this local name.
      Throws:
      CASRuntimeException - if a View with this name already exists in this CAS
    • getJCas

      JCas getJCas(SofaFS aSofa) throws CASException
      Create a JCas view for a Sofa. Note: as of UIMA v2.0, can be replaced with getView(sofaFS).getJCas().
      Parameters:
      aSofa - a Sofa feature structure in this CAS.
      Returns:
      The JCas view for the given Sofa.
      Throws:
      CASException - -
    • getJCas

      @Deprecated JCas getJCas(SofaID aSofaID) throws CASException
      Deprecated.
      As of v2.0, use getView(String) followed by getJCas().
      Create a JCas view for a Sofa. Note: this is provided for convenience. It is equivalent to getView(aSofaID).getJCas().
      Parameters:
      aSofaID - the ID of a Sofa defined in this CAS
      Returns:
      The view for the Sofa with ID aSofaID.
      Throws:
      CASException - if no Sofa with the given ID exists in this CAS
    • getView

      CAS getView(String localViewName)
      Get the view for a Sofa (subject of analysis). The view provides access to the Sofa data and the index repository that contains metadata (annotations and other feature structures) pertaining to that Sofa.
      Parameters:
      localViewName - the local name, before any sofa name mapping is done, for this view (note: this is the same as the associated Sofa name).
      Returns:
      The view corresponding to this local name.
      Throws:
      CASRuntimeException - if no View with this name exists in this CAS
    • getView

      CAS getView(SofaFS aSofa)
      Get the view for a Sofa (subject of analysis). The view provides access to the Sofa data and the index repository that contains metadata (annotations and other feature structures) pertaining to that Sofa.
      Parameters:
      aSofa - a Sofa feature structure in the CAS
      Returns:
      The view for the given Sofa
    • getLowLevelCAS

      LowLevelCAS getLowLevelCAS()
      Get an instance of the low-level CAS. Low-level and regular CAS can be used in parallel, all data is always contained in both.

      Note: This is for internal use.

      Returns:
      A low-level CAS.
      See Also:
    • getAnnotationType

      Type getAnnotationType()
      Get the type object for the annotation type.
      Returns:
      The annotation type.
    • getBeginFeature

      Feature getBeginFeature()
      Get the feature object for the annotation begin feature.
      Returns:
      The annotation begin feature.
    • getEndFeature

      Feature getEndFeature()
      Get the feature object for the annotation end feature.
      Returns:
      The annotation end feature.
    • getAnnotationIndex

      <T extends AnnotationFS> AnnotationIndex<T> getAnnotationIndex()
      Get the standard annotation index.
      Type Parameters:
      T - either Annotation (if JCas is in use) or AnnotationImpl
      Returns:
      The standard annotation index.
    • getAnnotationIndex

      <T extends AnnotationFS> AnnotationIndex<T> getAnnotationIndex(Type type) throws CASRuntimeException
      Get the standard annotation index restricted to a specific annotation type.
      Type Parameters:
      T - the topmost Java class corresponding to the type
      Parameters:
      type - The annotation type the index is restricted to.
      Returns:
      The standard annotation index, restricted to type.
      Throws:
      CASRuntimeException - When type is not an annotation type.
    • getAnnotationIndex

      default <T extends AnnotationFS> AnnotationIndex<T> getAnnotationIndex(Class<T> clazz) throws CASRuntimeException
      Get the standard annotation index restricted to a specific annotation type.
      Type Parameters:
      T - the topmost Java class corresponding to the type
      Parameters:
      clazz - The annotation type the index is restricted to, specified as a JCas class
      Returns:
      The standard annotation index, restricted to type.
      Throws:
      CASRuntimeException - When type is not an annotation type.
    • createAnnotation

      <T extends AnnotationFS> AnnotationFS createAnnotation(Type type, int begin, int end)
      Create a new annotation. Note that you still need to insert the annotation into the index repository yourself.
      Type Parameters:
      T - the Java class corresponding to the type
      Parameters:
      type - The type of the annotation.
      begin - The start of the annotation.
      end - The end of the annotation.
      Returns:
      A new annotation object.
    • getDocumentAnnotation

      <T extends AnnotationFS> T getDocumentAnnotation()
      Get the Document Annotation. The Document Annotation has a string-valued feature called "language" where the document language is specified.
      Type Parameters:
      T - the Java class for the document annotation. Could be the JCas cover class or FeatureStructure
      Returns:
      The document annotation. If it doesn't exist, one is created. The return value is the JCas cover class or the plain Java cover class for FeatureStructures if there is no JCas cover class for this type.
    • setCurrentComponentInfo

      void setCurrentComponentInfo(ComponentInfo info)
      Informs the CAS of relevant information about the component that is currently processing it. This is called by the framework automatically; users do not need to call it.
      Parameters:
      info - information about the component that is currently processing this CAS.
    • getTypeSystem

      TypeSystem getTypeSystem() throws CASRuntimeException
      Return the type system of this CAS instance.
      Returns:
      The type system, or null if none is available.
      Throws:
      CASRuntimeException - If the type system has not been committed.
    • createSofa

      @Deprecated SofaFS createSofa(SofaID sofaID, String mimeType)
      Deprecated.
      As of v2.0, use createView(String) instead.
      Create a Subject of Analysis. The new sofaFS is automatically added to the SofaIndex.
      Parameters:
      sofaID - -
      mimeType - -
      Returns:
      The sofaFS.
    • getSofaIterator

      <T extends SofaFS> FSIterator<T> getSofaIterator()
      Get iterator for all SofaFS in the CAS.
      Type Parameters:
      T - generic type of sofa iterator
      Returns:
      an iterator over SofaFS.
    • createFilteredIterator

      <T extends FeatureStructure> FSIterator<T> createFilteredIterator(FSIterator<T> it, FSMatchConstraint cons)
      Create an iterator over structures satisfying a given constraint. Constraints are described in the javadocs for ConstraintFactory and related classes.
      Type Parameters:
      T - - the type of the Feature Structure
      Parameters:
      it - The input iterator.
      cons - The constraint specifying what structures should be returned.
      Returns:
      An iterator over FSs.
    • getConstraintFactory

      ConstraintFactory getConstraintFactory()
      Get a constraint factory. A constraint factory is a simple way of creating FSMatchConstraints.
      Returns:
      A constraint factory to create new FS constraints.
    • createFeaturePath

      FeaturePath createFeaturePath()
      Create a feature path. This is mainly useful for creating FSMatchConstraints.
      Returns:
      A new, empty feature path.
    • getIndexRepository

      FSIndexRepository getIndexRepository()
      Get the index repository.
      Returns:
      The index repository, or null if none is available.
    • fs2listIterator

      <T extends FeatureStructure> ListIterator<T> fs2listIterator(FSIterator<T> it)
      Wrap a standard Java ListIterator around an FSListIterator. Use if you feel more comfortable with java style iterators.
      Type Parameters:
      T - The type of FeatureStructure
      Parameters:
      it - The FSListIterator to be wrapped.
      Returns:
      An equivalent ListIterator.
    • reset

      void reset() throws CASAdminException
      Reset the CAS, emptying it of all content. Feature structures and iterators will no longer be valid. Note: this method may only be called from an application. Calling it from an annotator will trigger a runtime exception.
      Throws:
      CASRuntimeException - When called out of sequence.
      CASAdminException
      See Also:
    • getViewName

      String getViewName()
      Get the view name. The view name is the same as the name of the view's Sofa, retrieved by getSofa().getSofaID(), except for the initial View before its Sofa has been created.
      Returns:
      The name of the view
    • size

      int size()
      Estimate the memory consumption of this CAS instance (in bytes).
      Returns:
      The estimated memory used by this CAS instance.
    • createFeatureValuePath

      FeatureValuePath createFeatureValuePath(String featureValuePath) throws CASRuntimeException
      Create a feature-value path from a string.
      Parameters:
      featureValuePath - String representation of the feature-value path.
      Returns:
      Feature-value path object.
      Throws:
      CASRuntimeException - If the input string is not well-formed.
    • setDocumentText

      void setDocumentText(String text) throws CASRuntimeException
      Set the document text. Once set, Sofa data is immutable, and cannot be set again until the CAS has been reset.
      Parameters:
      text - The text to be analyzed.
      Throws:
      CASRuntimeException - If the Sofa data has already been set.
    • setSofaDataString

      void setSofaDataString(String text, String mimetype) throws CASRuntimeException
      Set the document text. Once set, Sofa data is immutable, and cannot be set again until the CAS has been reset.
      Parameters:
      text - The text to be analyzed.
      mimetype - The mime type of the data
      Throws:
      CASRuntimeException - If the Sofa data has already been set.
    • getDocumentText

      String getDocumentText()
      Get the document text.
      Returns:
      The text being analyzed, or null if not set.
    • getSofaDataString

      String getSofaDataString()
      Get the Sofa Data String (a.k.a. the document text).
      Returns:
      The Sofa data string, or null if not set.
    • setDocumentLanguage

      void setDocumentLanguage(String languageCode) throws CASRuntimeException
      Sets the language for this document. This value sets the language feature of the special instance of DocumentAnnotation associated with this CAS.
      Parameters:
      languageCode - -
      Throws:
      CASRuntimeException - passthru
    • getDocumentLanguage

      String getDocumentLanguage()
      Gets the language code for this document from the language feature of the special instance of the DocumentationAnnotation associated with this CAS.
      Returns:
      language identifier
    • setSofaDataArray

      void setSofaDataArray(FeatureStructure array, String mime) throws CASRuntimeException
      Set the Sofa data as an ArrayFS. Once set, Sofa data is immutable, and cannot be set again until the CAS has been reset.
      Parameters:
      array - The ArrayFS to be analyzed.
      mime - The mime type of the data
      Throws:
      CASRuntimeException - If the Sofa data has already been set.
    • getSofaDataArray

      FeatureStructure getSofaDataArray()
      Get the Sofa data array.
      Returns:
      The Sofa Data being analyzed, or null if not set.
    • setSofaDataURI

      void setSofaDataURI(String uri, String mime) throws CASRuntimeException
      Set the Sofa data as a URI. Once set, Sofa data is immutable, and cannot be set again until the CAS has been reset.
      Parameters:
      uri - The URI of the data to be analyzed.
      mime - The mime type of the data
      Throws:
      CASRuntimeException - If the Sofa data has already been set.
    • getSofaDataURI

      String getSofaDataURI()
      Get the Sofa data array.
      Returns:
      The Sofa URI being analyzed, or null if not set.
    • getSofaDataStream

      InputStream getSofaDataStream()
      Get the Sofa data as a byte stream.
      Returns:
      A stream handle to the Sofa Data, or null if not set.
    • getSofaMimeType

      String getSofaMimeType()
      Get the mime type of the Sofa data being analyzed.
      Returns:
      the mime type of the Sofa
    • addFsToIndexes

      void addFsToIndexes(FeatureStructure fs)
      Add a feature structure to all appropriate indexes in the repository associated with this CAS View. If no indexes exist for the type of FS that you are adding, then a bag (unsorted) index will be automatically created.

      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.

      Parameters:
      fs - The Feature Structure to be added.
      Throws:
      NullPointerException - If the fs parameter is null.
    • removeFsFromIndexes

      void removeFsFromIndexes(FeatureStructure fs)
      Remove a feature structure from all indexes in the repository associated with this CAS View. The remove operation removes the exact fs from the indexes, unlike operations such as moveTo which use the fs argument as a template. It is not an error if the FS is not present in the indexes.
      Parameters:
      fs - The Feature Structure to be removed.
      Throws:
      NullPointerException - If the fs parameter is null.
    • getViewIterator

      <T extends CAS> Iterator<T> getViewIterator()
      Get iterator over all views in this CAS. Each view provides access to Sofa data and the index repository that contains metadata (annotations and other feature structures) pertaining to that Sofa.
      Type Parameters:
      T - generic type of returned view
      Returns:
      an iterator which returns all views. Each object returned by the iterator is of type CAS or a subtype.
    • getViewIterator

      Iterator<CAS> getViewIterator(String localViewNamePrefix)
      Get iterator over all views with the given name prefix. Each view provides access to Sofa data and the index repository that contains metadata (annotations and other feature structures) pertaining to that Sofa.

      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.

      Parameters:
      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).
      Returns:
      an iterator which returns all views with the given name prefix. Each object returned by the iterator is of type CAS.
    • createMarker

      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. This can then be used to identify FSs as added before or after the mark was set and to identify FSs modified after the mark is set. Note: this method may only be called from an application. Calling it from an annotator will trigger a runtime exception.
      Returns:
      a marker object.
    • protectIndexes

      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 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.

      Returns:
      an object used to record things that need adding back
    • protectIndexes

      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. At the end of the block, affected indexes have any removed-under-the-covers FSs added back.
      Parameters:
      runnable - code to execute while protecting the indexes.
    • select

      default <T extends TOP> SelectFSs<T> select()
      Type Parameters:
      T - the Type of the elements being accessed
      Returns:
      a newly created selection object for accessing feature structures
    • select

      default <T extends TOP> SelectFSs<T> select(Type type)
      Type Parameters:
      T - the Type of the elements being accessed
      Parameters:
      type - specifies the type (and subtypes of that type) to access
      Returns:
      a newly created selection object for accessing feature structures of that type and its subtypes
      Throws:
      IllegalArgumentException - if no type is specified.
    • select

      default <T extends TOP> SelectFSs<T> select(Class<T> clazz)
      Type Parameters:
      T - the Type of the elements being accessed
      Parameters:
      clazz - a JCas class corresponding to the type (and subtypes of that type) to access
      Returns:
      a newly created selection object for accessing feature structures of that type and its subtypes
      Throws:
      IllegalArgumentException - if no type is specified.
    • select

      default <T extends TOP> SelectFSs<T> select(int jcasType)
      Type Parameters:
      T - the Type of the elements being accessed
      Parameters:
      jcasType - the "type" field from the JCas class corresponding to the type (and subtypes of that type) to access
      Returns:
      a newly created selection object for accessing feature structures of that type and its subtypes
      Throws:
      IllegalArgumentException - if no type is specified.
    • select

      default <T extends TOP> SelectFSs<T> select(String fullyQualifiedTypeName)
      Type Parameters:
      T - the Type of the elements being accessed
      Parameters:
      fullyQualifiedTypeName - the string name of the type to access
      Returns:
      a newly created selection object for accessing feature structures of that type and its subtypes
      Throws:
      IllegalArgumentException - if no type is specified.
    • emptyList

      default <T extends TOP> EmptyList emptyList(Class<T> clazz)
      Type Parameters:
      T - the type of the element of the list
      Parameters:
      clazz - a JCas class corresponding to the type (and subtypes of that type) to access
      Returns:
      a lazily created shared (for this CAS) empty list
    • emptyFloatList

      default EmptyFloatList emptyFloatList()
      Returns:
      a lazily created shared (for this CAS) empty list
    • emptyFSList

      default <T extends TOP> EmptyFSList<T> emptyFSList()
      Type Parameters:
      T - the type of the elements of the FSList
      Returns:
      a lazily created shared (for this CAS) empty list
    • emptyIntegerList

      default EmptyIntegerList emptyIntegerList()
      Returns:
      a lazily created shared (for this CAS) empty list
    • emptyStringList

      default EmptyStringList emptyStringList()
      Returns:
      a lazily created shared (for this CAS) empty list
    • emptyArray

      default <T extends TOP> CommonArrayFS<T> emptyArray(Class<T> clazz)
      Type Parameters:
      T - the type of the elements of the array
      Parameters:
      clazz - the class of the elements of the array
      Returns:
      a lazily created shared (for this CAS) 0-length array
    • emptyFloatArray

      default FloatArray emptyFloatArray()
      Returns:
      a lazily created shared (for this CAS) 0-length array
    • emptyFSArray

      default <T extends FeatureStructure> FSArray<T> emptyFSArray()
      Type Parameters:
      T - the type of the elements of the FSArray
      Returns:
      a lazily created shared (for this CAS) 0-length FSarray
    • emptyFSArray

      default <T extends FeatureStructure> FSArray<T> emptyFSArray(Type type)
      Type Parameters:
      T - the type of the elements of the FSArray
      Parameters:
      type - the type of the elements of the FSArray
      Returns:
      a lazily created shared (for this CAS) 0-length subtype of FSarray holding elements of type element-type
    • emptyIntegerArray

      default IntegerArray emptyIntegerArray()
      Returns:
      a lazily created shared (for this CAS) 0-length array
    • emptyStringArray

      default StringArray emptyStringArray()
      Returns:
      a lazily created shared (for this CAS) 0-length array
    • emptyDoubleArray

      default DoubleArray emptyDoubleArray()
      Returns:
      a lazily created shared (for this CAS) 0-length array
    • emptyLongArray

      default LongArray emptyLongArray()
      Returns:
      a lazily created shared (for this CAS) 0-length array
    • emptyShortArray

      default ShortArray emptyShortArray()
      Returns:
      a lazily created shared (for this CAS) 0-length array
    • emptyByteArray

      default ByteArray emptyByteArray()
      Returns:
      a lazily created shared (for this CAS) 0-length array
    • emptyBooleanArray

      default BooleanArray emptyBooleanArray()
      Returns:
      a lazily created shared (for this CAS) 0-length array
    • getCasType

      default <T extends TOP> Type getCasType(Class<T> clazz)
      Type Parameters:
      T - the type of the JCas class
      Parameters:
      clazz - - a JCas class
      Returns:
      the corresponding Type, for this CAS
    • getAllIndexedFS

      default <T extends TOP> FSIterator<T> getAllIndexedFS(Class<T> clazz)
      Gets an iterator over all indexed (in this CAS view) FeatureStructures of the specified Type (and any of its subtypes). The elements are returned in arbitrary order, and duplicates (if they exist) are not removed.
      Type Parameters:
      T - the Java clazz
      Parameters:
      clazz - - the JCas Java class specifing which type and subtypes are included
      Returns:
      An iterator that returns all indexed FeatureStructures of the Type and its subtypes, corresponding to the JCas clazz, in no particular order.
    • getAllIndexedFS

      default <T extends TOP> FSIterator<T> getAllIndexedFS(Type type)
      Gets an iterator over all indexed (in this CAS view) FeatureStructures of the specified Type (and any of its subtypes). The elements are returned in arbitrary order, and duplicates (if they exist) are not removed.
      Type Parameters:
      T - the JCas class the iterator uses
      Parameters:
      type - the type of Feature Structures to include (including subtypes)
      Returns:
      An iterator that returns all indexed FeatureStructures of the Type and its subtypes, corresponding to the JCas clazz, in no particular order.
    • getIndexedFSs

      default <T extends TOP> Collection<T> getIndexedFSs(Type type)
      Returns an unmodifiable collection of all the FSs that are indexed in this view, in an arbitrary order. Subsequent modifications to the indexes do not affect this collection.
      Type Parameters:
      T - The Java class associated with type
      Parameters:
      type - the type of Feature Structures to include (including subtypes)
      Returns:
      an unmodifiable, unordered collection of all indexed (in this view) Feature Structures of the specified type (including subtypes)
    • getIndexedFSs

      default Collection<TOP> getIndexedFSs()
      Returns an unmodifiable collection of all of the FSs that are indexed in this view, in an arbitrary order. Subsequent modifications to the indexes do not affect this collection.
      Returns:
      an unmodifiable, unordered collection of all indexed (in this view) Feature Structures of the specified type (including subtypes)
    • getIndexedFSs

      default <T extends TOP> Collection<T> getIndexedFSs(Class<T> clazz)
      Returns a collection of all the FSs that are indexed in this view, in an arbitrary order. Subsequent modifications to the indexes do not affect this collection.
      Type Parameters:
      T - The Java class associated with type
      Parameters:
      clazz - The JCas class corresponding to the type
      Returns:
      an unmodifiable, unordered collection of all indexed (in this view) Feature Structures of the specified type (including subtypes)