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

Invoke 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
 outdir     - Target for generated classes, expressed as a directory path. Required = Yes
 force      - Force DODS to always be regenerated source files. Required = No
task - Name of Ant task from generate.xml. Required = No without parameters - to create all sql files and java classes and to compile it. 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.
Examples
 <dods doml="${basedir}/discRack.doml"
        outdir="${basedir}/src"/>


Inner Class Summary
 class Dods.ErrorReader
           
 
Field Summary
protected  java.io.File domlfile
           
protected  boolean force
           
protected  java.io.File outdir
           
protected  java.lang.String task
           
 
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 invoke DODS Generator, and then compile the generated files
 void setDomlfile(java.lang.String domlfile)
          Sets the doml descriptor file.
 void setForce(java.lang.String force)
          Force DODS to always be regenerated source files
 void setOutdir(java.lang.String out)
          The destination directory into which the generated sources are written
 void setTask(java.lang.String task)
          Task parameter
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorOutput, handleOutput, init, isInvalid, log, log, markInvalid, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
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.io.File domlfile

outdir

protected java.io.File outdir

task

protected java.lang.String task

force

protected boolean force
Constructor Detail

Dods

public Dods()
Method Detail

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Simply invoke DODS Generator, and then compile 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 descriptor file.
Parameters:
domlfile - - The doml input file describing data object mapping

setOutdir

public void setOutdir(java.lang.String out)
The destination directory into which the generated sources are written
Parameters:
sourceout - - Target for generated classes, expressed as a directory path

setTask

public void setTask(java.lang.String task)
Task parameter
Parameters:
task - - calling ant task

setForce

public void setForce(java.lang.String force)
Force DODS to always be regenerated source files
Parameters:
force - - Set to "true" or "false"