edu.ucsb.nceas.metacat
Class DBUtil
java.lang.Object
|
+--edu.ucsb.nceas.metacat.DBUtil
- public class DBUtil
- extends java.lang.Object
A suite of utility classes for quering DB
Constructor Summary |
DBUtil(java.sql.Connection conn)
Construct an instance of the utility class |
Method Summary |
static void |
main(java.lang.String[] args)
main routine used for testing. |
java.lang.String |
readDataGuide(java.lang.String doctype)
read Data Guide for a given doctype from db connection in XML format
select all distinct absolute paths from xml_index table |
java.lang.String |
readDoctypes()
read all doctypes from db connection in XML format
select all Public Id from xml_catalog table |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DBUtil
public DBUtil(java.sql.Connection conn)
- Construct an instance of the utility class
main
public static void main(java.lang.String[] args)
- main routine used for testing.
Usage: java DBUtil <-dt|-dg>
- Parameters:
-dt
- for selecting all doctypes
-dg for selecting DataGuide
readDoctypes
public java.lang.String readDoctypes()
throws java.sql.SQLException
- read all doctypes from db connection in XML format
select all Public Id from xml_catalog table
readDataGuide
public java.lang.String readDataGuide(java.lang.String doctype)
throws java.sql.SQLException
- read Data Guide for a given doctype from db connection in XML format
select all distinct absolute paths from xml_index table
Copyright © 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.