|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eigenbase.xom.wrappers.Annotator
public class Annotator
Quick and dirty XML parser that finds the precise start and end position of all nodes in a document. Also finds all line endings, so that character offsets can be converted to line/column positions.

| Nested Class Summary | |
|---|---|
(package private) class |
Annotator.LocInfo
|
| Constructor Summary | |
|---|---|
Annotator(String xml,
DOMWrapper def)
Creates an Annotator. |
|
| Method Summary | |
|---|---|
(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) List |
getLocInfoList()
Returns the list of LocInfo. |
(package private) void |
list(PrintWriter pw)
|
(package private) void |
parse(String s)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
Annotator(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 node| Method Detail |
|---|
public Location getLocation(DOMWrapper wrapper)
List getLocInfoList()
void parse(String s)
int getLine(int pos)
pos - Character position
int getCol(int pos)
pos - Character position
void list(PrintWriter pw)
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||