edu.ucsb.nceas.metacat
Class DBSAXDocument

java.lang.Object
  |
  +--edu.ucsb.nceas.metacat.DBSAXDocument

public class DBSAXDocument
extends java.lang.Object

A Class that writes an XML document main data to a database connection


Constructor Summary
DBSAXDocument(java.sql.Connection conn)
          Construct a new document instance, used for deleting documents
DBSAXDocument(java.sql.Connection conn, long rootnodeid, java.lang.String docname, java.lang.String doctype, java.lang.String docid, java.lang.String action)
          Construct a new document instance
 
Method Summary
 java.lang.String getDocID()
          Get doc id
 java.lang.String getDoctype()
          Get doctype
 java.lang.String getTitle()
          Get the document title
 void saveDocument(java.lang.String docid)
          Save a document entry in the xml_revisions table
 void setTitle(java.lang.String title)
          Set the document title
 void setTitleFromChildElement()
          Look up the title of the first child element named "title" and record it as the document title
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBSAXDocument

public DBSAXDocument(java.sql.Connection conn,
                     long rootnodeid,
                     java.lang.String docname,
                     java.lang.String doctype,
                     java.lang.String docid,
                     java.lang.String action)
              throws AccessionNumberException
Construct a new document instance
Parameters:
conn - the JDBC Connection to which all information is written
rootnodeid - - sequence id of the root node in the document
docname - - the name of DTD, i.e. the name immediately following the DOCTYPE keyword ( should be the root element name ) or the root element name if no DOCTYPE declaration provided (Oracle's and IBM parsers are not aware if it is not the root element name)
doctype - - Public ID of the DTD, i.e. the name immediately following the PUBLIC keyword in DOCTYPE declaration or the docname if no Public ID provided or null if no DOCTYPE declaration provided

DBSAXDocument

public DBSAXDocument(java.sql.Connection conn)
Construct a new document instance, used for deleting documents
Parameters:
conn - the JDBC Connection to which all information is written
Method Detail

getDoctype

public java.lang.String getDoctype()
Get doctype

getDocID

public java.lang.String getDocID()
Get doc id

getTitle

public java.lang.String getTitle()
Get the document title

setTitle

public void setTitle(java.lang.String title)
Set the document title
Parameters:
title - the new title for the document

setTitleFromChildElement

public void setTitleFromChildElement()
Look up the title of the first child element named "title" and record it as the document title

saveDocument

public void saveDocument(java.lang.String docid)
                  throws java.sql.SQLException
Save a document entry in the xml_revisions table


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