edu.ucsb.nceas.metacat
Class DBSAXHandler

edu.ucsb.nceas.metacat.DBSAXHandler

public class DBSAXHandler

A database aware Class implementing callback bethods for the SAX parser to call when processing the XML stream and generating events


Constructor Summary
DBSAXHandler(java.sql.Connection conn)
          Construct an instance of the handler class
 
Method Summary
 void characters(char[] cbuf, int start, int len)
          SAX Handler that is called for each XML text node
 void comment(java.lang.String data)
          SAX Handler called once for each comment found: node that comment may occur before or after the root element.
 void endDoctype()
          SAX Handler that receives notification of end of DTD All events in DTDHandler about all unparsed entities and the event in EntityResolver for the DTD file declaration appear between setDoctype and endDoctype.
 void endDocument()
          SAX Handler that receives notification of end of the document
 void endElement(oracle.xml.parser.v2.NSName name)
          SAX Handler that is called at the end of each XML element
 void ignorableWhitespace(char[] cbuf, int start, int len)
          SAX Handler that is called for each XML text node that is Ignorable white space
 void processingInstruction(java.lang.String target, java.lang.String data)
          SAX Handler called once for each processing instruction found: node that PI may occur before or after the root element.
 void setDoctype(oracle.xml.parser.v2.DTD dtd)
          SAX Handler that receives notification of DTD.
 void startDocument()
          SAX Handler that receives notification of beginning of the document
 void startElement(oracle.xml.parser.v2.NSName name, oracle.xml.parser.v2.SAXAttrList atts)
          SAX Handler that is called at the start of each XML element
 

Constructor Detail

DBSAXHandler

public DBSAXHandler(java.sql.Connection conn)
Construct an instance of the handler class
Parameters:
conn - the JDBC connection to which information is written
Method Detail

startDocument

public void startDocument()
                   throws org.xml.sax.SAXException
SAX Handler that receives notification of beginning of the document

endDocument

public void endDocument()
                 throws org.xml.sax.SAXException
SAX Handler that receives notification of end of the document

setDoctype

public void setDoctype(oracle.xml.parser.v2.DTD dtd)
                throws org.xml.sax.SAXException
SAX Handler that receives notification of DTD. Sets the DTD

endDoctype

public void endDoctype()
                throws org.xml.sax.SAXException
SAX Handler that receives notification of end of DTD All events in DTDHandler about all unparsed entities and the event in EntityResolver for the DTD file declaration appear between setDoctype and endDoctype. The rest of parsable external entities inside DTD file appear later in the elements from where they are referred to.

startElement

public void startElement(oracle.xml.parser.v2.NSName name,
                         oracle.xml.parser.v2.SAXAttrList atts)
                  throws org.xml.sax.SAXException
SAX Handler that is called at the start of each XML element

characters

public void characters(char[] cbuf,
                       int start,
                       int len)
SAX Handler that is called for each XML text node

ignorableWhitespace

public void ignorableWhitespace(char[] cbuf,
                                int start,
                                int len)
SAX Handler that is called for each XML text node that is Ignorable white space

comment

public void comment(java.lang.String data)
             throws org.xml.sax.SAXException
SAX Handler called once for each comment found: node that comment may occur before or after the root element.

processingInstruction

public void processingInstruction(java.lang.String target,
                                  java.lang.String data)
                           throws org.xml.sax.SAXException
SAX Handler called once for each processing instruction found: node that PI may occur before or after the root element.

endElement

public void endElement(oracle.xml.parser.v2.NSName name)
                throws org.xml.sax.SAXException
SAX Handler that is called at the end of each XML element


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