public class DBTransform
extends java.lang.Object
| Constructor and Description |
|---|
DBTransform()
construct a DBTransform instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doTransform(javax.xml.transform.stream.StreamSource xml,
javax.xml.transform.stream.StreamResult resultOutput,
java.lang.String xslSystemId,
java.util.Hashtable<java.lang.String,java.lang.String[]> param,
java.lang.String qformat,
java.lang.String sessionid)
Reads skin's config file if it exists, and populates Transformer paramaters
with its contents.
|
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
|
protected static javax.xml.transform.Transformer |
getTransformer(java.lang.String xslSystemId)
The method that manages the Templates Map instances that will be used to build
transformers from.
|
static void |
setForceRebuild(boolean forceBuild)
Set the field of forceRebuild
|
void |
transformXMLDocument(java.lang.String doc,
java.lang.String sourceType,
java.lang.String targetType,
java.lang.String qformat,
java.io.Writer w,
java.util.Hashtable<java.lang.String,java.lang.String[]> param,
java.lang.String sessionid)
Transform an XML document using the stylesheet reference from the db
|
public DBTransform()
throws java.io.IOException,
java.sql.SQLException,
java.lang.ClassNotFoundException,
edu.ucsb.nceas.utilities.PropertyNotFoundException
conn - the database connection from which to lookup the public idsjava.io.IOExceptionjava.sql.SQLExceptionjava.lang.ClassNotFoundExceptionedu.ucsb.nceas.utilities.PropertyNotFoundExceptionprotected static javax.xml.transform.Transformer getTransformer(java.lang.String xslSystemId)
throws javax.xml.transform.TransformerConfigurationException
xslSystemId - - the URL for the stylesheetforceRebuild - - if true, forces reload of the stylesheet from the system, else use the existing one, if therejavax.xml.transform.TransformerConfigurationExceptionpublic void transformXMLDocument(java.lang.String doc,
java.lang.String sourceType,
java.lang.String targetType,
java.lang.String qformat,
java.io.Writer w,
java.util.Hashtable<java.lang.String,java.lang.String[]> param,
java.lang.String sessionid)
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 printedparams - some parameters for eml2 transformationprotected void doTransform(javax.xml.transform.stream.StreamSource xml,
javax.xml.transform.stream.StreamResult resultOutput,
java.lang.String xslSystemId,
java.util.Hashtable<java.lang.String,java.lang.String[]> param,
java.lang.String qformat,
java.lang.String sessionid)
throws edu.ucsb.nceas.utilities.PropertyNotFoundException,
javax.xml.transform.TransformerException
edu.ucsb.nceas.utilities.PropertyNotFoundExceptionjavax.xml.transform.TransformerExceptionpublic 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 static void setForceRebuild(boolean forceBuild)
forceRebuild - Copyright © 2020 Regents of the University of California. All Rights Reserved.