|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.ucsb.nceas.metacat.DBTransform
A Class that transforms XML documents utitlizing XSL style sheets
Constructor Summary | |
DBTransform()
construct a DBTransform instance. |
Method Summary | |
static org.w3c.dom.NodeList |
getPathContent(java.io.File f,
java.lang.String path)
gets the content of a tag in a given xml file with the given path |
java.lang.String |
getStyleSystemId(java.lang.String qformat,
java.lang.String sourcetype,
java.lang.String targettype)
Lookup a stylesheet reference from the db catalog |
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.lang.String qformat,
java.io.PrintWriter pw)
Transform an XML document using the stylesheet reference from the db |
void |
transformXMLDocument(java.lang.String doc,
java.lang.String sourceType,
java.lang.String targetType,
java.lang.String qFormat,
java.io.StringWriter pw)
Transform an XML document to StringWriter 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 |
Constructor Detail |
public DBTransform() throws java.io.IOException, java.sql.SQLException, java.lang.ClassNotFoundException
conn
- the database connection from which to lookup the public idsMethod Detail |
public void transformXMLDocument(java.lang.String doc, java.lang.String sourceType, java.lang.String targetType, java.lang.String qformat, java.io.PrintWriter pw)
doc
- the document to be transformedsourcetype
- the document type of the sourcetargettype
- the target document typeqformat
- the name of the style set to usepw
- the PrintWriter to which output is printedpublic void transformXMLDocument(java.lang.String doc, java.lang.String sourceType, java.lang.String targetType, java.lang.String qFormat, java.io.StringWriter pw)
doc
- the document to be transformedsourceType
- the document type of the sourcetargetType
- the target document typeqFormat
- the name of the style set to usepw
- the StringWriter to which output will be storedpublic static org.w3c.dom.NodeList getPathContent(java.io.File f, java.lang.String path)
f
- the file to parsepath
- the path to get the content frompublic java.lang.String getStyleSystemId(java.lang.String qformat, java.lang.String sourcetype, java.lang.String targettype)
qformat
- the named style-set formatsourcetype
- the document type of the sourcetargettype
- the document type of the targetpublic java.lang.String getSystemId(java.lang.String objecttype, java.lang.String sourcetype, java.lang.String targettype)
objecttype
- the type of the object we want to retrievesourcetype
- the document type of the sourcetargettype
- the document type of the targetpublic static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |