public class AnnotationImpl extends AnnotationBaseImpl implements AnnotationFS
addr, casImpl| Modifier | Constructor and Description |
|---|---|
protected |
AnnotationImpl()
Constructor for AnnotationImpl.
|
|
AnnotationImpl(int addr,
CASImpl cas)
Constructor for AnnotationImpl.
|
| 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.
|
String |
toString() |
String |
toString(int indent) |
getViewequals, getAddress, getCAS, getCASImpl, hashCodeclone, getavoidcollisionTypeCode, getBooleanValue, getByteValue, getDoubleValue, getFeatureValue, getFeatureValueAsString, getFloatValue, getIntValue, getLongValue, getShortValue, getStringValue, getType, prettyPrint, prettyPrint, prettyPrint, setBooleanValue, setByteValue, setDoubleValue, setFeatureValue, setFeatureValueFromString, setFloatValue, setIntValue, setLongValue, setShortValue, setStringValuefinalize, 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 AnnotationImpl()
public AnnotationImpl(int addr,
CASImpl cas)
addr - -cas - -public int getBegin()
AnnotationFS0, the offset of the first character in the text.getBegin in interface AnnotationFSAnnotationFS.getBegin()public int getEnd()
AnnotationFS(getEnd()-getBegin()) == getCoveredText().length().getEnd in interface AnnotationFSAnnotationFS.getEnd()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()public String toString()
toString in class AnnotationBaseImplpublic String toString(int indent)
toString in class AnnotationBaseImplCopyright © 2006–2021 The Apache Software Foundation. All rights reserved.