|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--DocumentReader
| Field Summary | |
protected java.util.Hashtable |
hashOriginalIDsToElements
Store once for every translation |
protected org.w3c.dom.Document |
origDoc
Document it wraps around |
static boolean |
sanityChecks
Setting this |
| Constructor Summary | |
DocumentReader(org.w3c.dom.Document theDoc)
Constructor with hand-over of document |
|
| Method Summary | |
static org.w3c.dom.NodeList |
getAllChildrenWithLabel(org.w3c.dom.Element el,
java.lang.String label)
Return all child nodes that have a specific label |
static java.lang.String |
getCdataOfElement(org.w3c.dom.Element el)
If the Element is a tag containing CDATA, then this data is returned. |
org.w3c.dom.Element |
getElementByID(java.lang.String id)
Return the Element-Node in the original document that is augmented with the specific id Throw excpetion, if it does not exist. |
static java.lang.String |
getElementID(org.w3c.dom.Element el)
Read the id of a given element Throw exception, if it does not exist |
static java.lang.String |
getElementName(org.w3c.dom.Element el)
Read the contens of name child of a given element Throw exception, if it does not exist |
static org.w3c.dom.Element |
getFirstChildWithLabel(org.w3c.dom.Element el,
java.lang.String label)
Get first child that has the designated label. Throw exception, if no such child exists |
static org.w3c.dom.Element |
getFirstChildWithLabelIfExists(org.w3c.dom.Element el,
java.lang.String label)
Get first child that has the designated label. Returns null, if no such child exists |
static org.w3c.dom.Element |
getTheChildWithLabel(org.w3c.dom.Element el,
java.lang.String label)
Get the child that has the designated label. Throw exception, if none or more than one such child exists. |
static org.w3c.dom.Element |
getTheChildWithLabelIfExists(org.w3c.dom.Element el,
java.lang.String label)
Get the child that has the designated label. Throw exception, if more than one such child exists. |
long |
getXCoordinate(org.w3c.dom.Element e)
Read x coordinate (as long). Return "0L" if not present |
long |
getYCoordinate(org.w3c.dom.Element e)
Read y coordinate (as long). Return "0L" if not present |
static int |
max(int a,
int b)
the larger of two integers |
static long |
max(long a,
long b)
the larger of two longs |
static int |
max3(int a,
int b,
int c)
the larger of three integers |
static int |
max4(int a,
int b,
int c,
int d)
the larger of four integers |
static int |
max5(int a,
int b,
int c,
int d,
int e)
the larger of five integers |
void |
memorizeIDsOfOriginalDocument()
Enter IDs in the hashtable hashOriginalIDsToElementsThrows exception, if document is not set properly |
static int |
min(int a,
int b)
the lesser of two integers |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
protected org.w3c.dom.Document origDoc
protected java.util.Hashtable hashOriginalIDsToElements
public static final boolean sanityChecks
| Constructor Detail |
public DocumentReader(org.w3c.dom.Document theDoc)
| Method Detail |
public static java.lang.String getElementID(org.w3c.dom.Element el)
throws java.lang.Exception
public static java.lang.String getElementName(org.w3c.dom.Element el)
throws java.lang.Exception
public static java.lang.String getCdataOfElement(org.w3c.dom.Element el)
throws java.lang.Exception
public static org.w3c.dom.NodeList getAllChildrenWithLabel(org.w3c.dom.Element el,
java.lang.String label)
public static org.w3c.dom.Element getFirstChildWithLabel(org.w3c.dom.Element el,
java.lang.String label)
throws java.lang.Exception
public static org.w3c.dom.Element getFirstChildWithLabelIfExists(org.w3c.dom.Element el,
java.lang.String label)
throws java.lang.Exception
public static org.w3c.dom.Element getTheChildWithLabel(org.w3c.dom.Element el,
java.lang.String label)
throws java.lang.Exception
public static org.w3c.dom.Element getTheChildWithLabelIfExists(org.w3c.dom.Element el,
java.lang.String label)
throws java.lang.Exception
public long getXCoordinate(org.w3c.dom.Element e)
public long getYCoordinate(org.w3c.dom.Element e)
public org.w3c.dom.Element getElementByID(java.lang.String id)
throws java.lang.Exception
Document
public void memorizeIDsOfOriginalDocument()
throws java.lang.Exception
hashOriginalIDsToElements
public static int min(int a,
int b)
public static long max(long a,
long b)
public static int max(int a,
int b)
public static int max3(int a,
int b,
int c)
public static int max4(int a,
int b,
int c,
int d)
public static int max5(int a,
int b,
int c,
int d,
int e)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||