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 |
---|
Annotator.LocInfo(int seq,
int nodeType,
int startTagStartPos)
Creates a LocInfo.
|
Modifier and Type | Method and Description |
---|---|
String |
getHeadText(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.
|
String |
getText(boolean headOnly)
Returns the text of this location.
|
String |
getText(String xml)
Returns the fragment of source XML that this node encompasses.
|
String |
toString() |
String |
toString(Annotator annotator) |
final int seq
final int startTagStartPos
Node.ELEMENT_NODE
.final int type
int startTagEndPos
int endTagEndPos
Annotator.LocInfo(int seq, int nodeType, int startTagStartPos)
seq
- Sequence number in documentnodeType
- Node type, typically Node.ELEMENT_NODE
.startTagStartPos
- Position of start of elementpublic String getText(String xml)
xml
- Whole source XMLpublic String getHeadText(String xml)
xml
- Whole source XMLpublic String getText(boolean headOnly)
Location.getText(boolean)
.headOnly
- Whether to return only the head of elements