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) |
getView
equals, getAddress, getCAS, getCASImpl, hashCode
clone, 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
finalize, getClass, notify, notifyAll, wait, wait, wait
getView
clone, equals, getBooleanValue, getByteValue, getCAS, getDoubleValue, getFeatureValue, getFeatureValueAsString, getFloatValue, getIntValue, getLongValue, getShortValue, getStringValue, getType, hashCode, setBooleanValue, setByteValue, setDoubleValue, setFeatureValue, setFeatureValueFromString, setFloatValue, setIntValue, setLongValue, setShortValue, setStringValue
protected AnnotationImpl()
public AnnotationImpl(int addr, CASImpl cas)
addr
- -cas
- -public int getBegin()
AnnotationFS
0
, the offset of the first character in the text.getBegin
in interface AnnotationFS
AnnotationFS.getBegin()
public int getEnd()
AnnotationFS
(getEnd()-getBegin()) == getCoveredText().length()
.getEnd
in interface AnnotationFS
AnnotationFS.getEnd()
public String getCoveredText()
AnnotationFS
docText
is your document
text and annot
an annotation, then
annot.getCoveredText().equals(docText.substring(annot.getBegin(),
annot.getEnd()))
.getCoveredText
in interface AnnotationFS
AnnotationFS.getCoveredText()
public String toString()
toString
in class AnnotationBaseImpl
public String toString(int indent)
toString
in class AnnotationBaseImpl
Copyright © 2006–2021 The Apache Software Foundation. All rights reserved.