Class AnnotationImpl

All Implemented Interfaces:
Cloneable, AnnotationBaseFS, FeatureStructure, AnnotationFS

public class AnnotationImpl extends AnnotationBaseImpl implements AnnotationFS
Class comment for AnnotationImpl.java goes here.
  • Constructor Details

    • AnnotationImpl

      protected AnnotationImpl()
      Constructor for AnnotationImpl.
    • AnnotationImpl

      public AnnotationImpl(int addr, CASImpl cas)
      Constructor for AnnotationImpl.
      Parameters:
      addr - -
      cas - -
  • Method Details

    • getAnnotationGenerator

      static FSGenerator<AnnotationImpl> getAnnotationGenerator()
    • getBegin

      public int getBegin()
      Description copied from interface: AnnotationFS
      Get the start position of the annotation as character offset into the text. The smallest possible start position is 0, the offset of the first character in the text.
      Specified by:
      getBegin in interface AnnotationFS
      Returns:
      The start position.
      See Also:
    • getEnd

      public int getEnd()
      Description copied from interface: AnnotationFS
      Get the end position of the annotation as character offset into the text. The end position points at the first character after the annotation, such that (getEnd()-getBegin()) == getCoveredText().length().
      Specified by:
      getEnd in interface AnnotationFS
      Returns:
      The end position.
      See Also:
    • getCoveredText

      public String getCoveredText()
      Description copied from interface: AnnotationFS
      Get the text covered by an annotation as a string. If docText is your document text and annot an annotation, then annot.getCoveredText().equals(docText.substring(annot.getBegin(), annot.getEnd())).
      Specified by:
      getCoveredText in interface AnnotationFS
      Returns:
      String
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class AnnotationBaseImpl
    • toString

      public String toString(int indent)
      Overrides:
      toString in class AnnotationBaseImpl