|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
ex1.DataFileParser
This class contains functions to parse the data XML file for WEPS crops and operations. The parsing is done with the SAX parser and the important information is saved in internal data structures.
Constructor Summary | |
DataFileParser(DefnFileParser listing,
java.lang.String topdir,
boolean isCrop)
Creates a new instance to handle parsing detail CROP or OPRN files |
Method Summary | |
void |
addXmlFile(WepsDBFile xfile)
Parses the weps file contained in the structure. |
void |
characters(char[] buf,
int offset,
int len)
Called automatically by the SAX parser to get the string inside the tags This may require several calls to piece together the data. |
void |
endDocument()
Called automatically by the SAX parser. |
void |
endElement(java.lang.String namespaceURI,
java.lang.String sName,
java.lang.String qName)
Called automatically by the SAX parser when an ending <> is seen. |
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicID,
java.lang.String sysID)
This translates the external DTD references to the file location in the main mcrew_cfg directory. |
void |
startDocument()
Called automatically by the SAX parser. |
void |
startElement(java.lang.String namespaceURI,
java.lang.String lName,
java.lang.String qName,
org.xml.sax.Attributes attrs)
Called automatically by the SAX parser when a beginning <> tag is seen. |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DataFileParser(DefnFileParser listing, java.lang.String topdir, boolean isCrop)
listing
- parameter dictionary constructed from mcrew config filestopdir
- directory of mcrew filesisCrop
- true if we are parsing a crop xml file (simpler structre), false for operationsMethod Detail |
public void addXmlFile(WepsDBFile xfile)
xfile
- File to load as a WepsDBFile classpublic void startDocument() throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void endDocument() throws org.xml.sax.SAXException
org.xml.sax.SAXException
public org.xml.sax.InputSource resolveEntity(java.lang.String publicID, java.lang.String sysID)
public void startElement(java.lang.String namespaceURI, java.lang.String lName, java.lang.String qName, org.xml.sax.Attributes attrs) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void endElement(java.lang.String namespaceURI, java.lang.String sName, java.lang.String qName) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void characters(char[] buf, int offset, int len) throws org.xml.sax.SAXException
org.xml.sax.SAXException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |