|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.ucsb.nceas.metacat.DBUtil
A suite of utility classes for quering DB
Constructor Summary | |
DBUtil()
Construct an instance of the utility class |
Method Summary | |
static java.lang.String |
findDataSetDocIdForGivenDocument(java.lang.String givenDocId)
To a given docid, found a dataset docid which conatains the the given doicd This will be done by searching xml_relation table If couldn't find, null will be return |
java.lang.String |
getCurrentRevisionAndDocTypeForGivenDocument(java.lang.String givenDocId)
Method to get current revision and doctype for a given docid The output will look like "rev;doctype" |
java.lang.String |
getMaxDocid(java.lang.String scope)
get the lastest Accession Number from a particular scope |
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 |
java.lang.String |
readDTDSchema(java.lang.String doctype)
read DTD or Schema file from Metacat's XML catalog system |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DBUtil()
Method Detail |
public static void main(java.lang.String[] args)
Usage: java DBUtil <-dt|-dg>
-dt
- for selecting all doctypes
-dg for selecting DataGuidepublic java.lang.String readDoctypes() throws java.sql.SQLException
public java.lang.String readDTDSchema(java.lang.String doctype) throws java.sql.SQLException, java.net.MalformedURLException, java.io.IOException
public java.lang.String readDataGuide(java.lang.String doctype) throws java.sql.SQLException
public java.lang.String getMaxDocid(java.lang.String scope) throws java.sql.SQLException
public static java.lang.String findDataSetDocIdForGivenDocument(java.lang.String givenDocId)
givenDocId,
- the docid which we want to findpublic java.lang.String getCurrentRevisionAndDocTypeForGivenDocument(java.lang.String givenDocId) throws java.sql.SQLException
givenDocId,
- the docid which we want
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |