class Annotator.LocInfo
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
(package private) int |
endTagEndPos |
(package private) int |
seq
Sequence in document, ordered by start position (prefix order)
|
(package private) int |
startTagEndPos |
(package private) int |
startTagStartPos
Node type, typically
Node.ELEMENT_NODE. |
(package private) int |
type |
| Constructor and Description |
|---|
LocInfo(int seq,
int nodeType,
int startTagStartPos)
Creates a LocInfo.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getHeadText(java.lang.String xml)
Returns the fragment of source XML corresponding to the head tag
of this element, if this is an element, otherwise the whole node.
|
java.lang.String |
getText(boolean headOnly)
Returns the text of this location.
|
java.lang.String |
getText(java.lang.String xml)
Returns the fragment of source XML that this node encompasses.
|
java.lang.String |
toString() |
java.lang.String |
toString(Annotator annotator) |
final int seq
final int startTagStartPos
Node.ELEMENT_NODE.final int type
int startTagEndPos
int endTagEndPos
LocInfo(int seq,
int nodeType,
int startTagStartPos)
seq - Sequence number in documentnodeType - Node type, typically Node.ELEMENT_NODE.startTagStartPos - Position of start of elementpublic java.lang.String toString(Annotator annotator)
public java.lang.String getText(java.lang.String xml)
xml - Whole source XMLpublic java.lang.String getHeadText(java.lang.String xml)
xml - Whole source XMLpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getText(boolean headOnly)
Location.getText(boolean).headOnly - Whether to return only the head of elements