|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--util.InputParser
This class reads in a given XML file and parses it for a variety of values which it will store in its private variables. It then provides methods for retrieving the values.
Field Summary | |
private javax.xml.parsers.DocumentBuilder |
db
The XML doc we create from given filename. |
static java.lang.String |
DIRECTORY
The directory where the configuration files are located. |
private java.lang.String |
mapname
A default map. |
private java.util.Vector |
refpoints
Our vector of reference points |
Constructor Summary | |
InputParser(java.lang.String filename)
This constructor builds up an XML Document of Nodes from the given XML file and then calls the method echo to retrieve the values of certain nodes. |
Method Summary | |
java.lang.String |
getMapFilename()
This method is for getting the filename of the map image. |
java.util.Vector |
getRefPoints()
This method is for getting the ref points of the map. |
java.lang.String |
getText(org.w3c.dom.Element e)
This method takes in an Element and returns the concatenation of all of its text subnodes. |
void |
parse(org.w3c.dom.Document doc)
This method takes in a Document node, which heads the XML tree structure. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String DIRECTORY
private java.lang.String mapname
private java.util.Vector refpoints
private javax.xml.parsers.DocumentBuilder db
Constructor Detail |
public InputParser(java.lang.String filename)
filename
- The filename of the XML input file.Method Detail |
public java.lang.String getText(org.w3c.dom.Element e)
e
- The Element to analize
public void parse(org.w3c.dom.Document doc)
public java.lang.String getMapFilename()
public java.util.Vector getRefPoints()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |