Interface ICasDocument

All Known Implementing Classes:
AbstractDocument, DocumentUimaImpl

public interface ICasDocument
The ICasDocument represents texts with meta information. A ICasDocument allows manipulation of its meta information the text must not be changed. Meta information can be retrieved over the CAS object. Note: All changes to meta information should be done with calls to the manipulation methods of the document. If this is not possible, change the CAS and after the change call the changed() method.
  • Method Details

    • addChangeListener

      void addChangeListener(ICasDocumentListener listener)
      Adds a given change listener.
      Parameters:
      listener - the listener
    • removeChangeListener

      void removeChangeListener(ICasDocumentListener listener)
      Removes the given change listener.
      Parameters:
      listener - the listener
    • getCAS

      CAS getCAS()
      Retrieves the CAS.
      Returns:
      the CAS
    • addFeatureStructure

      void addFeatureStructure(FeatureStructure structure)
      Adds a FeatureStructure to the document.
      Parameters:
      structure - - the FeatureStructure to add.
    • addFeatureStructures

      void addFeatureStructures(Collection<? extends FeatureStructure> structures)
      Adds the FeatureStructures.
      Parameters:
      structures - the structures
    • removeFeatureStructure

      void removeFeatureStructure(FeatureStructure structure)
      Removes an FeatureStructure from the Document.
      Parameters:
      structure - - the FeatureStructure to remove.
    • removeFeatureStructures

      void removeFeatureStructures(Collection<? extends FeatureStructure> structuresToRemove)
      Removes the given FeatureStructures.
      Parameters:
      structuresToRemove - the structures to remove
    • update

      void update(FeatureStructure structure)
      Updates the given FeatureStructure.
      Parameters:
      structure - the structure
    • updateFeatureStructure

      void updateFeatureStructure(Collection<? extends FeatureStructure> structures)
      Updates the given FeatureStructures.
      Parameters:
      structures - the structures
    • changed

      void changed()
      The document was changed. Its unknown what changed.
    • getAnnotations

      Collection<AnnotationFS> getAnnotations(Type type)
      Returns all Annotations of the given type.
      Parameters:
      type - - type of the requested Annotations.
      Returns:
      - return all Annotation of the given type or null if no Annotation of this type exist.
    • switchView

      void switchView(String viewName)
      Switches the view of the underlying CAS to the provided view name.
      Parameters:
      viewName - the view name
    • getType

      Type getType(String type)
      Retrieves the requested type.
      Parameters:
      type - the type
      Returns:
      the type
    • getTypeSystemText

      String getTypeSystemText()
      Retrieves the string representation of the applied type system.
      Returns:
      the string representation of the applied type system