buldocs Ltd.
xnsdoc 1.2.1 Java API

com.xnsdoc
Class Task

java.lang.Object
  extended byorg.apache.tools.ant.ProjectComponent
      extended byorg.apache.tools.ant.Task
          extended byorg.apache.tools.ant.taskdefs.MatchingTask
              extended bycom.xnsdoc.Task
All Implemented Interfaces:
org.apache.tools.ant.types.selectors.SelectorContainer

public final class Task
extends org.apache.tools.ant.taskdefs.MatchingTask

Adapter of the Processor to Apache Ant.

Generates XML Schema documentation using the xnsdoc tool.

Parameters

AttributeDescriptionRequired
Exactly one of the these or nested <fileset>
fileshortcut for specifying a single file fileset
dirshortcut for specifying a single folder fileset
outdestination directory for output filesYes
xmlIf output should be XML instead of HTML. (yes | no). Default is noNo
cssprovide external CSS file&
doctitleInclude title for the package index(first) page (html-code)No
headerInclude header text for each page (html-code)No
footerInclude footer text for each page (html-code)No
bottomInclude bottom text for each page (html-code)No
failonerrorLog a warning message, but do not stop the build, when the file to copy does not exist or one of the nested filesets points to a directory that doesn't exist or an error occurs while copying. (yes | no). Default is noNo
verboseOutput messages about what xnsdoc is doing. (yes | no). Default is yesNo
quietBe quiet about what xnsdoc is doing. (yes | no). Default is noNo
debugOutput internal messages about what xnsdoc is doing. (yes | no). Default is noNo
hideTypeshide types in overview pages. (yes | no). Default is noNo
hideGroupshide groups in overview pages. (yes | no). Default is noNo
hideAttributeshide attributes in overview pages. (yes | no). Default is noNo
hideNotationshide notations in overview pages. (yes | no). Default is noNo

Parameters specified as nested elements

fileset

FileSets are used to select sets of files to process. To use a fileset, the todir attribute must be set.

doctitle

Same as the doctitle attribute, but you can nest text inside the element this way.

header

Similar to <doctitle>.

footer

Similar to <doctitle>.

bottom

Similar to <doctitle>.

Usage in Apache Ant build files:
<!--
  Define xnsdoc task.
-->
<taskdef name="xnsdoc" classname="com.xnsdoc.Task"/>

<!--
  Use xnsdoc task.
-->
<xnsdoc file="myschema.xsd"
         out="doc/schema/myschema">
  <doctitle><![CDATA[XML Schema for XML Schema]]></doctitle>
</xnsdoc>
 


Nested Class Summary
static class Task.Html
          An HTML fragment in a nested element of the task.
 
Constructor Summary
Task()
          Default constructor.
 
Method Summary
 void addBottom(Task.Html theBottom)
          Set the text to be placed at the bottom of each output file.
 void addDoctitle(Task.Html text)
          Add a document title to use for the overview page.
 void addFileset(org.apache.tools.ant.types.FileSet set)
          Adds a set of files to be deleted.
 void addFooter(Task.Html text)
          Set the footer text to be placed at the bottom of each output file.
 void addHeader(Task.Html theHeader)
          Set the header text to be placed at the top of each output file.
 void execute()
          Execute the task.
 void setBottom(java.lang.String theBottom)
          Set the text to be placed at the bottom of each output file.
 void setCss(java.lang.String css)
          Setter method for css property.
 void setDebug(boolean isDebug)
          Setter method for debug property.
 void setDir(java.lang.String theDir)
          Setter method for dir property.
 void setDoctitle(java.lang.String theDoctitle)
          Set the title of the generated overview page.
 void setFailonerror(boolean isFailonerror)
          Setter method for failonerror attribute.
 void setFile(java.lang.String theFile)
          Setter method for file property.
 void setFooter(java.lang.String theFooter)
          Set the footer text to be placed at the bottom of each output file.
 void setHeader(java.lang.String theHeader)
          Set the header text to be placed at the top of each output file.
 void setHideattributes(boolean hideAttributes)
          Setter method for hideAttributes property.
 void setHidegroups(boolean hideGroups)
          Setter method for hideGroups property.
 void setHidetypes(boolean hideTypes)
          Setter method for hideTypes property.
 void setOut(java.lang.String out)
          Setter method for out property.
 void setQuiet(boolean isQuiet)
          Setter method for quiet property.
 void setVerbose(boolean isVerbose)
          Setter method for verbose property.
 void setXml(boolean isXml)
          Setter method for xml attribute.
 
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, 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, init, 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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Task

public Task()
Default constructor.

Method Detail

addBottom

public void addBottom(Task.Html theBottom)
Set the text to be placed at the bottom of each output file.

Parameters:
theBottom - the bottom text.
See Also:
Processor.setBottom(String)

addDoctitle

public void addDoctitle(Task.Html text)
Add a document title to use for the overview page.

Parameters:
text - the HTML element containing the document title.
See Also:
Processor.setDoctitle(String)

addFileset

public void addFileset(org.apache.tools.ant.types.FileSet set)
Adds a set of files to be deleted.

Parameters:
set - the set of files to be deleted

addFooter

public void addFooter(Task.Html text)
Set the footer text to be placed at the bottom of each output file.

Parameters:
text - the footer text.
See Also:
Processor.setFooter(String)

addHeader

public void addHeader(Task.Html theHeader)
Set the header text to be placed at the top of each output file.

Parameters:
theHeader - the header text
See Also:
Processor.setHeader(String)

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Execute the task.

Throws:
org.apache.tools.ant.BuildException - if execution of the task failed

setBottom

public void setBottom(java.lang.String theBottom)
Set the text to be placed at the bottom of each output file.

Parameters:
theBottom - the bottom text.
See Also:
Processor.setBottom(String)

setCss

public void setCss(java.lang.String css)
Setter method for css property.

Parameters:
css - location of XML schema
See Also:
Processor.setCss(String)

setDebug

public void setDebug(boolean isDebug)
Setter method for debug property.

Parameters:
isDebug - output debug information or not

setDir

public void setDir(java.lang.String theDir)
Setter method for dir property.

Parameters:
theDir - folder to search for schemas
See Also:
Processor.setOut(String)

setDoctitle

public void setDoctitle(java.lang.String theDoctitle)
Set the title of the generated overview page.

Parameters:
theDoctitle - the Document title.
See Also:
Processor.setDoctitle(String)

setFailonerror

public void setFailonerror(boolean isFailonerror)
Setter method for failonerror attribute.

Parameters:
isFailonerror - if should fail on error or not

setFile

public void setFile(java.lang.String theFile)
Setter method for file property.

Parameters:
theFile - location of XML schema
See Also:
Processor.setSchemaLocation(String)

setFooter

public void setFooter(java.lang.String theFooter)
Set the footer text to be placed at the bottom of each output file.

Parameters:
theFooter - the footer text.
See Also:
Processor.setFooter(String)

setHeader

public void setHeader(java.lang.String theHeader)
Set the header text to be placed at the top of each output file.

Parameters:
theHeader - the header text
See Also:
Processor.setHeader(String)

setHideattributes

public void setHideattributes(boolean hideAttributes)
Setter method for hideAttributes property.

Parameters:
hideAttributes - if attributes should be hidden or not
See Also:
Processor.setHideAttributes(boolean)

setHidegroups

public void setHidegroups(boolean hideGroups)
Setter method for hideGroups property.

Parameters:
hideGroups - if groups should be hidden or not
See Also:
Processor.setHideGroups(boolean)

setHidetypes

public void setHidetypes(boolean hideTypes)
Setter method for hideTypes property.

Parameters:
hideTypes - if types should be hidden or not
See Also:
Processor.setHideTypes(boolean)

setOut

public void setOut(java.lang.String out)
Setter method for out property.

Parameters:
out - output folder to use

setQuiet

public void setQuiet(boolean isQuiet)
Setter method for quiet property.

Parameters:
isQuiet - be quiet or not

setVerbose

public void setVerbose(boolean isVerbose)
Setter method for verbose property.

Parameters:
isVerbose - be verbose or not

setXml

public void setXml(boolean isXml)
Setter method for xml attribute.

Parameters:
isXml - boolean
See Also:
Processor.setXml(boolean)

buldocs Ltd.
xnsdoc 1.2.1 Java API

Copyright 2005 buldocs Ltd. All rights reserved.
Use is subject to license terms.