Package org.eigenbase.xom.wrappers
Class Annotator.LocInfo
- java.lang.Object
-
- org.eigenbase.xom.wrappers.Annotator.LocInfo
-
- Enclosing class:
- Annotator
class Annotator.LocInfo extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field 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, typicallyNode.ELEMENT_NODE
.(package private) int
type
-
Constructor Summary
Constructors Constructor Description LocInfo(int seq, int nodeType, int startTagStartPos)
Creates a LocInfo.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
-
-
Method Detail
-
toString
public java.lang.String toString(Annotator annotator)
-
getText
public java.lang.String getText(java.lang.String xml)
Returns the fragment of source XML that this node encompasses.- Parameters:
xml
- Whole source XML- Returns:
- fragment of source XML
-
getHeadText
public 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.- Parameters:
xml
- Whole source XML- Returns:
- fragment of source XML
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getText
public java.lang.String getText(boolean headOnly)
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
-
-