Class Annotation

    • Field Detail

      • typeIndexID

        public static final int typeIndexID
      • type

        public static final int type
    • Constructor Detail

      • Annotation

        protected Annotation()
      • Annotation

        public Annotation​(int addr,
                          TOP_Type type)
      • Annotation

        public Annotation​(JCas jcas)
      • Annotation

        public Annotation​(JCas jcas,
                          int begin,
                          int end)
        Constructor with begin and end passed as arguments
        Parameters:
        jcas - JCas
        begin - begin offset
        end - end offset
    • Method Detail

      • getTypeIndexID

        public int getTypeIndexID()
        Description copied from class: TOP
        used to obtain reference to the TOP_Type instance
        Overrides:
        getTypeIndexID in class AnnotationBase
        Returns:
        the type array index
      • 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.
      • setBegin

        public void setBegin​(int v)
      • 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.
      • setEnd

        public void setEnd​(int v)
      • getCoveredText

        public java.lang.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:
        AnnotationFS.getCoveredText()
      • getStart

        @Deprecated
        public int getStart()
        Deprecated.
        Returns:
        the Annotation "begin" feature value
        See Also:
        getBegin()