public class Annotator
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
(package private) class |
Annotator.LocInfo |
Constructor and Description |
---|
Annotator(java.lang.String xml,
DOMWrapper def)
Creates an Annotator.
|
Modifier and Type | Method and Description |
---|---|
(package private) int |
getCol(int pos)
Returns the column that a character position falls on.
|
(package private) int |
getLine(int pos)
Returns the line that a character position falls on.
|
Location |
getLocation(DOMWrapper wrapper) |
(package private) java.util.List |
getLocInfoList()
Returns the list of LocInfo.
|
(package private) void |
list(java.io.PrintWriter pw) |
(package private) void |
parse(java.lang.String s) |
Annotator(java.lang.String xml, DOMWrapper def)
For testing purposes, wrapper
may be null. Parses the XML
but does not build the mapping from location information to DOM nodes.
xml
- XML source stringdef
- Wrapper around root DOM nodepublic Location getLocation(DOMWrapper wrapper)
java.util.List getLocInfoList()
void parse(java.lang.String s)
int getLine(int pos)
pos
- Character positionint getCol(int pos)
pos
- Character positionvoid list(java.io.PrintWriter pw)