public class Annotation extends AnnotationBase implements AnnotationFS
| Modifier and Type | Field and Description | 
|---|---|
| static int | type | 
| static int | typeIndexID | 
| Modifier | Constructor and Description | 
|---|---|
| protected  | Annotation() | 
|   | Annotation(int addr,
          TOP_Type type) | 
|   | Annotation(JCas jcas) | 
|   | Annotation(JCas jcas,
          int begin,
          int end)Constructor with begin and end passed as arguments | 
| Modifier and Type | Method and Description | 
|---|---|
| int | getBegin()Get the start position of the annotation as character offset into the text. | 
| String | getCoveredText()Get the text covered by an annotation as a string. | 
| int | getEnd()Get the end position of the annotation as character offset into the text. | 
| int | getStart()Deprecated.   | 
| int | getTypeIndexID()used to obtain reference to the TOP_Type instance | 
| void | setBegin(int v) | 
| void | setEnd(int v) | 
getSofa, getViewaddToIndexes, addToIndexes, equals, getAddress, getCAS, getCASImpl, getLowLevelCas, hashCode, removeFromIndexes, removeFromIndexesclone, getavoidcollisionTypeCode, getBooleanValue, getByteValue, getDoubleValue, getFeatureValue, getFeatureValueAsString, getFloatValue, getIntValue, getLongValue, getShortValue, getStringValue, getType, prettyPrint, prettyPrint, prettyPrint, setBooleanValue, setByteValue, setDoubleValue, setFeatureValue, setFeatureValueFromString, setFloatValue, setIntValue, setLongValue, setShortValue, setStringValue, toString, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitgetViewclone, equals, getBooleanValue, getByteValue, getCAS, getDoubleValue, getFeatureValue, getFeatureValueAsString, getFloatValue, getIntValue, getLongValue, getShortValue, getStringValue, getType, hashCode, setBooleanValue, setByteValue, setDoubleValue, setFeatureValue, setFeatureValueFromString, setFloatValue, setIntValue, setLongValue, setShortValue, setStringValueprotected Annotation()
public Annotation(int addr,
                  TOP_Type type)
public Annotation(JCas jcas)
public Annotation(JCas jcas, int begin, int end)
jcas - JCasbegin - begin offsetend - end offsetpublic int getTypeIndexID()
TOPgetTypeIndexID in class AnnotationBasepublic int getBegin()
AnnotationFS0, the offset of the first character in the text.getBegin in interface AnnotationFSpublic void setBegin(int v)
public int getEnd()
AnnotationFS(getEnd()-getBegin()) == getCoveredText().length().getEnd in interface AnnotationFSpublic void setEnd(int v)
public String getCoveredText()
AnnotationFSdocText is your document
 text and annot an annotation, then 
 annot.getCoveredText().equals(docText.substring(annot.getBegin(), 
 annot.getEnd())).getCoveredText in interface AnnotationFSAnnotationFS.getCoveredText()@Deprecated public int getStart()
getBegin()Copyright © 2006–2017 The Apache Software Foundation. All rights reserved.