Package org.eigenbase.xom.wrappers
Class Annotator.LocInfo
java.lang.Object
org.eigenbase.xom.wrappers.Annotator.LocInfo
- Enclosing class:
- Annotator
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) int
(package private) final int
Sequence in document, ordered by start position (prefix order)(package private) int
(package private) final int
Node type, typicallyNode.ELEMENT_NODE
.(package private) final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetHeadText
(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.getText
(boolean headOnly) Returns the text of this location.Returns the fragment of source XML that this node encompasses.toString()
-
Field Details
-
seq
final int seqSequence in document, ordered by start position (prefix order) -
startTagStartPos
final int startTagStartPosNode type, typicallyNode.ELEMENT_NODE
. -
type
final int type -
startTagEndPos
int startTagEndPos -
endTagEndPos
int endTagEndPos
-
-
Constructor Details
-
LocInfo
LocInfo(int seq, int nodeType, int startTagStartPos) Creates a LocInfo.- Parameters:
seq
- Sequence number in documentnodeType
- Node type, typicallyNode.ELEMENT_NODE
.startTagStartPos
- Position of start of element
-
-
Method Details
-
toString
-
getText
Returns the fragment of source XML that this node encompasses.- Parameters:
xml
- Whole source XML- Returns:
- fragment of source XML
-
getHeadText
Returns the fragment of source XML corresponding to the head tag of this element, if this is an element, otherwise the whole node.- Parameters:
xml
- Whole source XML- Returns:
- fragment of source XML
-
toString
-
getText
Returns the text of this location. Specification as forLocation.getText(boolean)
.- Parameters:
headOnly
- Whether to return only the head of elements- Returns:
- Source text underlying a location
-