edu.ucsb.nceas.morpho.datapackage.wizard
Class PackageWizardParser

java.lang.Object
  |
  +--org.xml.sax.helpers.DefaultHandler
        |
        +--edu.ucsb.nceas.morpho.datapackage.wizard.PackageWizardParser
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class PackageWizardParser
extends org.xml.sax.helpers.DefaultHandler

A Class implementing callback bethods for the SAX parser to call when processing the XML messages from the Package Wizard


Constructor Summary
PackageWizardParser(java.io.FileReader xml, java.lang.String parserName)
           
 
Method Summary
 void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)
           
 XMLElement getDoc()
          Returns the document as an XMLElement object.
 java.lang.String getDoctype()
          Returns the public identifier of the doctype that this config file represents
 java.lang.String getDtd()
          Returns the path to the dtd that this config file represents
 java.lang.String getRoot()
          Returns the public identifier of the doctype that this config file represents
static void main(java.lang.String[] args)
           
 void printDoc(XMLElement e)
          prints a string representation of the doc object
 void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)
          This method is called whenever a new start tag is encountered.
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PackageWizardParser

public PackageWizardParser(java.io.FileReader xml,
                           java.lang.String parserName)
Parameters:
xml - a FileReader object that reprents a stream of XML
parserName - the fully specifified parser name to be used in processing
Method Detail

startElement

public void startElement(java.lang.String uri,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes attributes)
                  throws org.xml.sax.SAXException
This method is called whenever a new start tag is encountered. It sorts the elements and puts them into their structured XMLElement object.
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler

endElement

public void endElement(java.lang.String uri,
                       java.lang.String localName,
                       java.lang.String qName)
                throws org.xml.sax.SAXException
Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler

getDoc

public XMLElement getDoc()
Returns the document as an XMLElement object.

getDtd

public java.lang.String getDtd()
Returns the path to the dtd that this config file represents

getDoctype

public java.lang.String getDoctype()
Returns the public identifier of the doctype that this config file represents

getRoot

public java.lang.String getRoot()
Returns the public identifier of the doctype that this config file represents

printDoc

public void printDoc(XMLElement e)
prints a string representation of the doc object

main

public static void main(java.lang.String[] args)


Copyright © 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.