edu.ucsb.nceas.metacat
Class DBReader
java.lang.Object
|
+--edu.ucsb.nceas.metacat.DBReader
- public class DBReader
- extends java.lang.Object
A Class that creates an XML text document
from a query to a relational DB containing a DOM representation
Inner Class Summary |
class |
DBReader.DoctypeInfo
A utility class that encapsulates document type information |
Constructor Summary |
DBReader(java.sql.Connection conn)
construct a DBReader instance. |
Method Summary |
DBReader.DoctypeInfo |
getDoctypeInfo(java.lang.String docid)
Look up the document type information from the database |
long |
getRootNode(java.lang.String docid)
Get the root node id for an XML document given a document id |
static void |
main(java.lang.String[] args)
main routine used for testing. |
java.lang.String |
readXMLDocument(java.lang.String docid)
Create an XML document from the database starting with the element
having element_id nodeid |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
DBReader
public DBReader(java.sql.Connection conn)
throws java.io.IOException,
java.sql.SQLException,
java.lang.ClassNotFoundException
- construct a DBReader instance.
Generally, one calls readXMLDocument() after constructing the instance
- Parameters:
conn
- the database connection from which to read the document
main
public static void main(java.lang.String[] args)
- main routine used for testing.
Usage: java DBReader
- Parameters:
nodeid
- the id number of the root of the subtree to display
getRootNode
public long getRootNode(java.lang.String docid)
- Get the root node id for an XML document given a document id
- Parameters:
docid
- the document node contains the root of the document
readXMLDocument
public java.lang.String readXMLDocument(java.lang.String docid)
- Create an XML document from the database starting with the element
having element_id nodeid
- Parameters:
docid
- the document that we want retrieved
getDoctypeInfo
public DBReader.DoctypeInfo getDoctypeInfo(java.lang.String docid)
- Look up the document type information from the database
- Parameters:
docid
- the id of the document to look up
Copyright © 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.