edu.ucsb.nceas.metacat
Class DBTransform
java.lang.Object
|
+--edu.ucsb.nceas.metacat.DBTransform
- public class DBTransform
- extends java.lang.Object
A Class that transforms XML documents utitlizing XSL style sheets
Constructor Summary |
DBTransform(java.sql.Connection conn)
construct a DBTransform instance. |
Method Summary |
void |
dbg(int position)
|
java.lang.String |
getSystemId(java.lang.String objecttype,
java.lang.String sourcetype,
java.lang.String targettype)
Lookup a stylesheet reference from the db catalog |
static void |
main(java.lang.String[] args)
the main routine used to test the transform utility. |
void |
transformXMLDocument(java.lang.String doc,
java.lang.String sourcetype,
java.lang.String targettype,
java.io.PrintWriter pw)
Transform an XML document using the stylesheet reference from the db |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
DBTransform
public DBTransform(java.sql.Connection conn)
throws java.io.IOException,
java.sql.SQLException,
java.lang.ClassNotFoundException
- construct a DBTransform instance.
Generally, one calls transformXMLDocument() after constructing the instance
- Parameters:
conn
- the database connection from which to lookup the public ids
transformXMLDocument
public void transformXMLDocument(java.lang.String doc,
java.lang.String sourcetype,
java.lang.String targettype,
java.io.PrintWriter pw)
- Transform an XML document using the stylesheet reference from the db
- Parameters:
doc
- the document to be transformedsourcetype
- the document type of the sourcetargettype
- the target document type
getSystemId
public java.lang.String getSystemId(java.lang.String objecttype,
java.lang.String sourcetype,
java.lang.String targettype)
- Lookup a stylesheet reference from the db catalog
- Parameters:
objecttype
- the type of the object we want to retrievesourcetype
- the document type of the sourcetargettype
- the document type of the target
main
public static void main(java.lang.String[] args)
- the main routine used to test the transform utility.
Usage: java transform [dbstring]
- Parameters:
user
- the username to use for the database connectionpassword
- the password to use for the database connectiondbstring
- the connection info to use for the database connection
dbg
public void dbg(int position)
Copyright © 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.