public interface AnnotationFS extends AnnotationBaseFS
| 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.
|
void |
setBegin(int begin)
Set the start position of the annotation as character offset into the text.
|
void |
setEnd(int end)
Set the end position of the annotation as character offset into the text.
|
getView_getTypeCode, _id, clone, equals, getAddress, getBooleanValue, getByteValue, getCAS, getDoubleValue, getFeatureValue, getFeatureValueAsString, getFloatValue, getIntValue, getJCas, getLongValue, getShortValue, getStringValue, getType, hashCode, setBooleanValue, setByteValue, setDoubleValue, setFeatureValue, setFeatureValueFromString, setFloatValue, setIntValue, setLongValue, setShortValue, setStringValueint getBegin()
0, the offset of the first character in the text.int getEnd()
(getEnd()-getBegin()) == getCoveredText().length().void setBegin(int begin)
0, the offset of the first character in the text.begin - The start position.void setEnd(int end)
(getEnd()-getBegin()) == getCoveredText().length().end - The end position position.String getCoveredText()
docText is your document
text and annot an annotation, then
annot.getCoveredText().equals(docText.substring(annot.getBegin(),
annot.getEnd())).Copyright © 2006–2019 The Apache Software Foundation. All rights reserved.