edu.ucsb.nceas.metacat
Class DBSAXElement

java.lang.Object
  |
  +--edu.ucsb.nceas.metacat.BasicElement
        |
        +--edu.ucsb.nceas.metacat.DBSAXElement

public class DBSAXElement
extends BasicElement

A Class that represents an XML element and its contents and can write its own representation to a database connection


Constructor Summary
DBSAXElement(java.sql.Connection conn, java.lang.String tagname, long parent_id, int nodeIndex)
          Construct a new element instance
 
Method Summary
 void setAttribute(java.lang.String attName, java.lang.String attValue)
          Add a new attribute to this element, or set its value
 void writeContentToDB()
          Write the element content to the db connection
 
Methods inherited from class edu.ucsb.nceas.metacat.BasicElement
appendContent, appendContent, getAttribute, getAttributes, getContent, getElementID, getNodeIndex, getParentID, getTagName, incChildNum, setElementID, setParentID, setTagName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DBSAXElement

public DBSAXElement(java.sql.Connection conn,
                    java.lang.String tagname,
                    long parent_id,
                    int nodeIndex)
Construct a new element instance
Parameters:
conn - the JDBC Connection to which all information is written
tagname - the name of the element
parent_id - the parent id number for this element
Method Detail

setAttribute

public void setAttribute(java.lang.String attName,
                         java.lang.String attValue)
Add a new attribute to this element, or set its value
Overrides:
setAttribute in class BasicElement

writeContentToDB

public void writeContentToDB()
Write the element content to the db connection