DODS 5.1 API

org.enhydra.ant.taskdefs
Class Dods

java.lang.Object
  |
  +--org.apache.tools.ant.ProjectComponent
        |
        +--org.apache.tools.ant.Task
              |
              +--org.enhydra.ant.taskdefs.Dods

public class Dods
extends org.apache.tools.ant.Task

Invokes DODS to generate a set of java classes from a doml file.
The files will only be regenerated/compiled if the date on the doml file is newer than at least one of the generated files.
This taskdef extends Ant's task; refer to that documentation for parameters that affect compilation.
Typically made visible to an Ant build file with the following declaration:

  <taskdef name="dods" classname="org.enhydra.ant.taskdefs.Dods"/>
Parameters

 doml        - The doml input file describing data object mapping. Required = Yes.
 outputDir   - Target for generated classes, expressed as a directory path. Required = Yes.
 force       - Forces DODS always to regenerate source files. 
               Possible values: ("true", "false"(default)). Required = No.
 action      - Name of Ant task from generate.xml. Required = No.
 templateSet - Template template set for generating java code. Required = No.
 database    - sets database vendor for generating sql. Required = No. 
 html        - Indicates DODS to generate html documentation from .doml file
               Possible values: ("true", "false"(default)). Required = No. 
 pdf         - Indicates DODS to generate pdf documentation from .doml file
               Possible values: ("true", "false"(default)). Required = No.
 xmi         - Indicates DODS to generate xmi documentation from .doml file
               Possible values: ("true", "false"(default)). Required = No.
 ptl         - Indicates DODS to generate ptl (Rational Rose) documentation from .doml file. 
               Possible values: ("true", "false"(default)). Required = No. 
 without parameters - to create all sql files and java classes and to compile it. 

 action parameters:
      dods:build_all - to create all sql files and java classes.
      dods:sql - to create only sql files. 
      dods:java -to create only java files and to compile them. 
      dods:javaNoCompile -To create only java files and not to compile them. 
      dods:noCompile -To create SQL files and java files and not to compile them.
	   	dods:build_all_split - to create all sql files and java classes and to compile it. SQL files will be divided into separate files using SQLSplitter 
		dods:sqlsplit - to create only sql files and separate in different files using SQLSplitter.
		dods:noCompileSplit - To create SQL files and separate sql commands using SQLSplitter and java files and not to compile them.

 templateset parameters:
      standard         - generate standard java code.
      multidb          - generate java code with multi database support.
      webdocwf         - generate java code with WebDocWF support.
	    multidb_webdocwf - generate java code with multi database and WebDocWF support.	
     (user defined)    - any user defined template set.	

Examples
 <dods doml="${basedir}/discRack.doml"
        outputDir="${basedir}/src"
		  templateset="multidb"/>


Field Summary
protected  java.lang.String action
           
protected  java.lang.String database
           
protected  java.lang.String domlfile
           
protected  java.lang.String force
           
protected  boolean html
           
protected  java.lang.String outputDir
           
protected  boolean pdf
           
protected  boolean ptl
           
protected  java.lang.String templateSet
           
protected  boolean xmi
           
 
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
Dods()
           
 
Method Summary
 void execute()
          Simply invokes DODS Generator, and then compiles the generated files.
 void setAction(java.lang.String action)
          Sets action parameter.
 void setDatabase(java.lang.String database)
          Set the database vendor for creating sql
 void setDomlfile(java.lang.String domlfile)
          Sets the doml file.
 void setForce(java.lang.String force)
          Forces DODS always to regenerate source files.
 void setHtml(java.lang.String html)
          Indicates DODS to generate html documentation from .doml file.
 void setOutputDir(java.lang.String outdir)
          The destination directory in which the generated sources are written to.
 void setPdf(java.lang.String pdf)
          Indicates DODS to generate pdf documentation from .doml file.
 void setPtl(java.lang.String ptl)
          Indicates DODS to generate ptl (Rational Rose) documentation from .doml file.
 void setTemplateSet(java.lang.String template)
          Sets template set parameter.
 void setXmi(java.lang.String xmi)
          Indicates DODS to generate xmi documentation from .doml file.
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorOutput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

domlfile

protected java.lang.String domlfile

outputDir

protected java.lang.String outputDir

action

protected java.lang.String action

templateSet

protected java.lang.String templateSet

force

protected java.lang.String force

database

protected java.lang.String database

html

protected boolean html

pdf

protected boolean pdf

xmi

protected boolean xmi

ptl

protected boolean ptl
Constructor Detail

Dods

public Dods()
Method Detail

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Simply invokes DODS Generator, and then compiles the generated files.

Overrides:
execute in class org.apache.tools.ant.Task
Throws:
org.apache.tools.ant.BuildException

setDomlfile

public void setDomlfile(java.lang.String domlfile)
Sets the doml file.

Parameters:
domlfile - the doml input file describing data object mapping.

setOutputDir

public void setOutputDir(java.lang.String outdir)
The destination directory in which the generated sources are written to.

Parameters:
outdir - target for generated classes, expressed as a directory path.

setAction

public void setAction(java.lang.String action)
Sets action parameter.

Parameters:
action - value of action parameter.

setTemplateSet

public void setTemplateSet(java.lang.String template)
Sets template set parameter.

Parameters:
template - value of template set.

setDatabase

public void setDatabase(java.lang.String database)
Set the database vendor for creating sql

Parameters:
database - database vendor for creating sql

setForce

public void setForce(java.lang.String force)
Forces DODS always to regenerate source files.

Parameters:
force - "true" if source files shoult be regenerated, otherwise "false".

setHtml

public void setHtml(java.lang.String html)
Indicates DODS to generate html documentation from .doml file.

Parameters:
html - "true" if html documentation shoult be generated, otherwise "false".

setPdf

public void setPdf(java.lang.String pdf)
Indicates DODS to generate pdf documentation from .doml file.

Parameters:
pdf - "true" if pdf documentation shoult be generated, otherwise "false".

setXmi

public void setXmi(java.lang.String xmi)
Indicates DODS to generate xmi documentation from .doml file.

Parameters:
xmi - "true" if xmi documentation shoult be generated, otherwise "false".

setPtl

public void setPtl(java.lang.String ptl)
Indicates DODS to generate ptl (Rational Rose) documentation from .doml file.

Parameters:
ptl - "true" if ptl documentation shoult be generated, otherwise "false".

DODS 5.1 API