|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.tools.ant.taskdefs.MatchingTask
org.apache.tools.dvsl.DVSLTask
A Task to process via DVSL a set of XML documents. This is useful for building views of XML based documentation. arguments:
Of these arguments, the sourcedir and destdir are required, or, in and out are required.
Following are the supported nested elements:
This task will recursively scan the sourcedir and destdir looking for XML documents to process via DVSL.
This task was adapted from Ant's <style> task (XSLTProcess class) from the 1.4.1 release.
Nested Class Summary | |
class |
DVSLTask.Tool
|
class |
DVSLTask.VelocityConfig
|
Field Summary | |
private java.io.File |
baseDir
|
private java.lang.ClassLoader |
classLoader
|
private org.apache.tools.ant.types.Path |
classpath
|
private java.io.File |
destDir
|
private DVSL |
dvsl
|
private boolean |
force
|
private java.io.File |
inFile
|
static java.lang.String |
INFILENAME
Supported app values |
private java.io.File |
logFile
|
private java.io.File |
outFile
|
static java.lang.String |
OUTFILENAME
|
private java.lang.String |
outputEncoding
|
private java.io.File |
stylesheet
|
private java.lang.String |
targetExtension
|
private java.util.Vector |
toolAttr
|
private java.io.File |
toolboxFile
|
private java.util.Properties |
toolboxProps
|
private boolean |
validatingParser
|
private java.util.Vector |
velConfigAttr
|
private java.lang.String |
velConfigClass
|
private java.util.Map |
velConfigMap
|
Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask |
fileset |
Fields inherited from class org.apache.tools.ant.Task |
description, location, target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
project |
Constructor Summary | |
DVSLTask()
Creates a new DVSLTask Task. |
Method Summary | |
org.apache.tools.ant.types.Path |
createClasspath()
Set the classpath to load the Processor through (nested element). |
DVSLTask.Tool |
createTool()
support for <tool> nested element |
DVSLTask.VelocityConfig |
createVelConfig()
support for <velconfig> nested element |
private void |
ensureDirectoryFor(java.io.File targetFile)
|
void |
execute()
Executes the task. |
private void |
process(java.io.File inFile,
java.io.File outFile,
java.io.File stylesheet)
|
private void |
process(java.io.File baseDir,
java.lang.String xmlFile,
java.io.File destDir,
java.io.File stylesheet)
Processes the given input XML file and stores the result in the given resultFile. |
void |
putAppValue(java.lang.String name,
java.lang.Object o)
Sets an application value from outside of the DVSL task |
void |
setBasedir(java.io.File dir)
Set the base directory. |
void |
setClasspath(org.apache.tools.ant.types.Path classpath)
Set the classpath to load the Processor through (attribute). |
void |
setClasspathRef(org.apache.tools.ant.types.Reference r)
Set the classpath to load the Processor through via reference (attribute). |
void |
setDestdir(java.io.File dir)
Set the destination directory where the generated files should be directed. |
void |
setExtension(java.lang.String name)
Set the desired file extension to be used for the target files. |
void |
setForce(boolean force)
Set whether to check dependencies, or always generate. |
void |
setIn(java.io.File inFile)
Sets an input xml file to be styled |
void |
setLogFile(java.io.File logFile)
Sets the file to use for logging. |
void |
setOut(java.io.File outFile)
Sets an output file |
void |
setOutputEncoding(java.lang.String encoding)
Sets the character encoding for output files. |
void |
setStyle(java.io.File dvslFile)
Sets the file to use for stylesheet. |
void |
setToolbox(java.lang.String toolboxFile)
Deprecated. use setToolboxFile instead |
void |
setToolboxFile(java.io.File toolboxFile)
Sets the Toolbox properties file to use. |
void |
setValidatingParser(boolean validating)
Sets the flag to have DVSL use a validating parser for the input documents |
void |
setVelocityConfigClass(java.lang.String classname)
Allows the user to specify a class that implements Properties that will have user properties
to be used when setting up DVSL. |
private long |
transform(java.io.File inFile,
java.io.File outFile)
Does the actual transform |
Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTask |
add, addAnd, addContains, addContainsRegexp, addCustom, addDate, addDepend, addDepth, addDifferent, addFilename, addMajority, addModified, addNone, addNot, addOr, addPresent, addSelector, addSize, addType, appendSelector, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, getDirectoryScanner, getImplicitFileSet, getSelectors, hasSelectors, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setExcludes, setExcludesfile, setFollowSymlinks, setIncludes, setIncludesfile, setProject, XsetIgnore, XsetItems |
Methods inherited from class org.apache.tools.ant.Task |
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
getProject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String INFILENAME
public static final java.lang.String OUTFILENAME
private DVSL dvsl
private java.io.File destDir
private java.io.File baseDir
private java.io.File stylesheet
private java.io.File inFile
private java.io.File outFile
private java.io.File logFile
private java.lang.String targetExtension
private java.lang.String outputEncoding
private org.apache.tools.ant.types.Path classpath
private java.lang.ClassLoader classLoader
private boolean force
private java.util.Vector toolAttr
private java.io.File toolboxFile
private java.util.Properties toolboxProps
private java.lang.String velConfigClass
private java.util.Map velConfigMap
private java.util.Vector velConfigAttr
private boolean validatingParser
Constructor Detail |
public DVSLTask()
Method Detail |
public void execute() throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildException
public void setForce(boolean force)
force
- false to check dependencies, true to always generatepublic void setBasedir(java.io.File dir)
dir
- name of the base directorypublic void setDestdir(java.io.File dir)
dir
- name of the destination directorypublic void setExtension(java.lang.String name)
.html
" is used.
name
- the extension to usepublic void setStyle(java.io.File dvslFile)
dvslFile
- stylesheet filenamepublic void setLogFile(java.io.File logFile)
logFile
- logging filenamepublic void setToolbox(java.lang.String toolboxFile)
toolboxFile
- properties file of toolspublic void setToolboxFile(java.io.File toolboxFile)
toolboxFile
- properties file of toolspublic void setVelocityConfigClass(java.lang.String classname)
Properties
that will have user properties
to be used when setting up DVSL.
classname
- Velocity configuration class to loadpublic void setOut(java.io.File outFile)
outFile
- output filepublic void setIn(java.io.File inFile)
inFile
- input filepublic void setOutputEncoding(java.lang.String encoding)
encoding
- Output encodingpublic void setClasspath(org.apache.tools.ant.types.Path classpath)
classpath
- classpath to setpublic org.apache.tools.ant.types.Path createClasspath()
public void setClasspathRef(org.apache.tools.ant.types.Reference r)
r
- reference to classpathpublic void setValidatingParser(boolean validating)
public void putAppValue(java.lang.String name, java.lang.Object o)
private void process(java.io.File baseDir, java.lang.String xmlFile, java.io.File destDir, java.io.File stylesheet) throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildException
private void process(java.io.File inFile, java.io.File outFile, java.io.File stylesheet) throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildException
private long transform(java.io.File inFile, java.io.File outFile) throws java.lang.Exception
Does the actual transform
inFile
- XML document sourceoutFile
- File for transformed input
java.lang.Exception
private void ensureDirectoryFor(java.io.File targetFile) throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildException
public DVSLTask.Tool createTool()
public DVSLTask.VelocityConfig createVelConfig()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |