|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.kernow.Kernow
public class Kernow
A high level API for running transforms, XQueries and XML Schema validation.
To use Kernow's GUI use net.sf.kernow.GUI
.
Constructor Summary | |
---|---|
Kernow()
Creates a new instance of Kernow |
Method Summary | |
---|---|
boolean |
directoryTransform(java.lang.String inputDir,
java.lang.String stylesheet,
java.lang.String outputDir)
Runs a directory transformation. |
boolean |
directoryTransform(java.lang.String inputDir,
java.lang.String stylesheet,
java.lang.String outputDir,
java.util.HashMap<java.lang.String,java.lang.Object> params)
Runs a directory transformation with parameters |
Config |
getConfig()
Returns Kernow's configuration object. |
boolean |
runDirectoryTransform(java.lang.String inputDir,
java.lang.String stylesheet,
java.lang.String outputDir)
Runs a directory transformation. |
boolean |
runDirectoryTransform(java.lang.String inputDir,
java.lang.String stylesheet,
java.lang.String outputDir,
java.util.HashMap<java.lang.String,java.lang.Object> params)
Runs a directory transformation with parameters |
boolean |
runSingleFileTransform(java.lang.String inputXML,
java.lang.String stylesheet,
java.lang.String outputFile)
Runs a standard transformation without parameters |
boolean |
runSingleFileTransform(java.lang.String inputXML,
java.lang.String stylesheet,
java.lang.String outputFile,
java.util.HashMap<java.lang.String,java.lang.Object> params)
Runs a standard transformation with parameters |
boolean |
runStandaloneTransform(java.lang.String stylesheet,
java.lang.String initialTemplate,
java.lang.String outputFile)
Runs a standalone transformation. |
boolean |
runStandaloneTransform(java.lang.String stylesheet,
java.lang.String initialTemplate,
java.lang.String outputFile,
java.util.HashMap<java.lang.String,java.lang.Object> params)
Runs a standalone transformation with parameters. |
boolean |
singleFileTransform(javax.xml.transform.Source inputXML,
javax.xml.transform.Source stylesheet,
javax.xml.transform.Result result)
Runs a standard transformation without parameters |
boolean |
singleFileTransform(javax.xml.transform.Source inputXML,
javax.xml.transform.Source stylesheet,
javax.xml.transform.Result result,
java.util.HashMap<java.lang.String,java.lang.Object> params)
Runs a standard transformation with parameters |
boolean |
standaloneTransform(javax.xml.transform.Source stylesheet,
java.lang.String initialTemplate,
javax.xml.transform.Result result)
Runs a standalone transformation. |
boolean |
standaloneTransform(javax.xml.transform.Source stylesheet,
java.lang.String initialTemplate,
javax.xml.transform.Result result,
java.util.HashMap<java.lang.String,java.lang.Object> params)
Runs a standalone transformation with parameters. |
boolean |
standaloneXQuery(java.lang.String xquery,
javax.xml.transform.Result result)
Runs a standalone XQuery (one with no input) and sends the result to the Result. |
boolean |
validateDirectory(java.io.File directory,
javax.xml.transform.Source schema)
Validate all files in a directory |
boolean |
validateFile(javax.xml.transform.Source xml,
javax.xml.transform.Source schema)
Validates the XML with the schema |
boolean |
validateSchema(javax.xml.transform.Source schema)
Checks that schema compiles |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Kernow()
Method Detail |
---|
public Config getConfig()
public boolean singleFileTransform(javax.xml.transform.Source inputXML, javax.xml.transform.Source stylesheet, javax.xml.transform.Result result, java.util.HashMap<java.lang.String,java.lang.Object> params)
inputXML
- The input XML filestylesheet
- The XSLT to useresult
- The Result
of the transformparams
- A HashMap of name value pairs to use as parameters
public boolean singleFileTransform(javax.xml.transform.Source inputXML, javax.xml.transform.Source stylesheet, javax.xml.transform.Result result)
inputXML
- The XML input to transformstylesheet
- The XSLT to useresult
- The Result
of the transform
public boolean directoryTransform(java.lang.String inputDir, java.lang.String stylesheet, java.lang.String outputDir, java.util.HashMap<java.lang.String,java.lang.Object> params) throws java.net.URISyntaxException
inputDir
- The input directorystylesheet
- The XSLT to useoutputDir
- The output directoryparams
- A HashMap of name value pairs to use as parameters
java.net.URISyntaxException
public boolean directoryTransform(java.lang.String inputDir, java.lang.String stylesheet, java.lang.String outputDir) throws java.net.URISyntaxException
inputDir
- The input directorystylesheet
- The XSLT to useoutputDir
- The output directory
java.net.URISyntaxException
public boolean standaloneTransform(javax.xml.transform.Source stylesheet, java.lang.String initialTemplate, javax.xml.transform.Result result, java.util.HashMap<java.lang.String,java.lang.Object> params)
stylesheet
- The XSLT to useinitialTemplate
- The name of the template where processing should startresult
- The Result
of the transformparams
- A HashMap of name value pairs to use as parameters
public boolean standaloneTransform(javax.xml.transform.Source stylesheet, java.lang.String initialTemplate, javax.xml.transform.Result result)
stylesheet
- The XSLT to useinitialTemplate
- The name of the template where processing should start
The Result
of the transform
public boolean standaloneXQuery(java.lang.String xquery, javax.xml.transform.Result result)
xquery
- The XQuery to execute
The Result
of the XQuerypublic boolean validateSchema(javax.xml.transform.Source schema)
schema
- The schema to compile
true
if the schema compiles successfullypublic boolean validateFile(javax.xml.transform.Source xml, javax.xml.transform.Source schema)
xml
- The XML to validateschema
- The schema to validate the XML with
true
if the XML is valid according to the schemapublic boolean validateDirectory(java.io.File directory, javax.xml.transform.Source schema)
directory
- The directory to validateschema
- The schema to validate the directory with
true
if all files in the directory are valid, false
if any fail validation or there's an errorpublic boolean runSingleFileTransform(java.lang.String inputXML, java.lang.String stylesheet, java.lang.String outputFile, java.util.HashMap<java.lang.String,java.lang.Object> params) throws java.net.URISyntaxException
inputXML
- The input XML filestylesheet
- The XSLT to useoutputFile
- The output fileparams
- A HashMap of name value pairs to use as parameters
java.net.URISyntaxException
public boolean runSingleFileTransform(java.lang.String inputXML, java.lang.String stylesheet, java.lang.String outputFile)
inputXML
- The input XML filestylesheet
- The XSLT to useoutputFile
- The output file
public boolean runDirectoryTransform(java.lang.String inputDir, java.lang.String stylesheet, java.lang.String outputDir, java.util.HashMap<java.lang.String,java.lang.Object> params) throws java.net.URISyntaxException
inputDir
- The input directorystylesheet
- The XSLT to useoutputDir
- The output directoryparams
- A HashMap of name value pairs to use as parameters
java.net.URISyntaxException
public boolean runDirectoryTransform(java.lang.String inputDir, java.lang.String stylesheet, java.lang.String outputDir) throws java.net.URISyntaxException
inputDir
- The input directorystylesheet
- The XSLT to useoutputDir
- The output directory
java.net.URISyntaxException
public boolean runStandaloneTransform(java.lang.String stylesheet, java.lang.String initialTemplate, java.lang.String outputFile, java.util.HashMap<java.lang.String,java.lang.Object> params) throws java.net.URISyntaxException
stylesheet
- The XSLT to useinitialTemplate
- The name of the template where processing should startoutputFile
- The primary output fileparams
- A HashMap of name value pairs to use as parameters
java.net.URISyntaxException
public boolean runStandaloneTransform(java.lang.String stylesheet, java.lang.String initialTemplate, java.lang.String outputFile)
stylesheet
- The XSLT to useinitialTemplate
- The name of the template where processing should startoutputFile
- The primary output file
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |