net.sf.xframe.xsddoc
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 bynet.sf.xframe.xsddoc.Task
All Implemented Interfaces:
org.apache.tools.ant.types.selectors.SelectorContainer

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

Adapter for xsddoc processor to Apache Ant.

Generates XML Schema documentation using the xsddoc tool.

Parameters

AttributeDescriptionRequired
schemaLoactiondeprecated, see file parameter 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&
titledeprecated, see doctitle parameterNo
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 xsddoc is doing. (yes | no). Default is yesNo
quietBe quiet about what xsddoc is doing. (yes | no). Default is noNo
debugOutput internal messages about what xsddoc is doing. (yes | no). Default is noNo
hideSubTypeshide sub types references. (yes | no). Default is noNo
hideLocalUsagehide local usage references. (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

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 xsddoc task.
-->
<taskdef name="xsddoc" classname="net.sf.xframe.xsddoc.Task"/>

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

Author:
Kurt Riede

Nested Class Summary
static class Task.Html
          An HTML fragment in a nested element of the xsddoc task.
 
Field Summary
 
Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask
fileset, useDefaultExcludes
 
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
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 xsddoc 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 setHidelocalusage(boolean hideLocalUsage)
          Setter method for hideLocalUsage property.
 void setHidesubtypes(boolean hideSubTypes)
          Setter method for hideSubTypes 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 setSchemalocation(java.lang.String schemaLocation)
          Deprecated. use setFile(java.lang.String) instead
 void setTitle(java.lang.String title)
          Deprecated. use setDoctitle(java.lang.String) instead
 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
addAnd, addContains, addCustom, addDate, addDepend, addDepth, addFilename, addMajority, addNone, addNot, addOr, addPresent, addSelector, addSize, 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, handleErrorFlush, handleErrorOutput, handleFlush, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName
 
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
 

Constructor Detail

Task

public Task()
Default constructor.

Method Detail

execute

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

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

setDebug

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

Parameters:
isDebug - output debug information or not

setOut

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

Parameters:
out - output folder to use

setSchemalocation

public void setSchemalocation(java.lang.String schemaLocation)
Deprecated. use setFile(java.lang.String) instead

Setter method for schemaLocation property.

Parameters:
schemaLocation - location of XML schema to use
See Also:
setFile(java.lang.String)

setFile

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

Parameters:
theFile - location of XML schema

setDir

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

Parameters:
theDir - folder to search for schemas

setTitle

public void setTitle(java.lang.String title)
Deprecated. use setDoctitle(java.lang.String) instead

Setter method for title property.

Parameters:
title - title to use
See Also:
setDoctitle(java.lang.String)

setCss

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

Parameters:
css - location of XML schema

setVerbose

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

Parameters:
isVerbose - be verbose or not

setQuiet

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

Parameters:
isQuiet - be quiet or not

setHidelocalusage

public void setHidelocalusage(boolean hideLocalUsage)
Setter method for hideLocalUsage property.

Parameters:
hideLocalUsage - if local usage should be hidden or not

setHidesubtypes

public void setHidesubtypes(boolean hideSubTypes)
Setter method for hideSubTypes property.

Parameters:
hideSubTypes - if sub types should be hidden or not

setHidetypes

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

Parameters:
hideTypes - if types should be hidden or not

setHideattributes

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

Parameters:
hideAttributes - if attributes should be hidden or not

setHidegroups

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

Parameters:
hideGroups - if groups should be hidden or not

setXml

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

Parameters:
isXml - boolean

setFailonerror

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

Parameters:
isFailonerror - if should fail on error or not

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

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.

setDoctitle

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

Parameters:
theDoctitle - the Document title.

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

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

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.

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.

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.

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.


Copyright © 2004-2005 xframe. All Rights Reserved.