org.objectweb.jorm.util.lib
Class AntJorm

java.lang.Object
  extended byorg.apache.tools.ant.ProjectComponent
      extended byorg.apache.tools.ant.Task
          extended byorg.apache.tools.ant.taskdefs.MatchingTask
              extended byorg.objectweb.jorm.util.lib.AntJorm
All Implemented Interfaces:
org.apache.tools.ant.types.selectors.SelectorContainer

public class AntJorm
extends org.apache.tools.ant.taskdefs.MatchingTask

The JORM ant task.


Field Summary
 
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
AntJorm()
           
 
Method Summary
 org.apache.tools.ant.types.DTDLocation createDTD()
          Create a DTD location record.
 void execute()
          execute method of the Ant task
 void generates(java.lang.String[] pdFileNames)
           
 void setBindingAbstract(boolean bindingAbstract)
          It assigns the boolean value which indictes if the generated Binding must be declared abstract.
 void setBindingInheritance(java.lang.String s)
          It assigns the class name which the generated PBinding classes must extend.
 void setGeneratePDFiles(boolean val)
           
 void setJavac(boolean l)
          The assigned boolean value indicates if the generated must be compiled.
 void setJormConf(java.lang.String s)
          It assigns the jorm configuration file.
 void setKeepsrc(boolean keepsrc)
          It assigns a boolean to indicate if the generated .java file must be kept.
 void setLogConf(java.lang.String s)
          It assigns the jorm configuration file.
 void setMapperNames(java.lang.String mapperNames)
          Defines the list of mappers to be used for compilation.
 void setMappingInheritance(java.lang.String s)
          It assigns the class name which the generated PBinding classes must extend.
 void setOtherPdFiles(org.apache.tools.ant.types.Path cp)
          It assigns the classpath where jorm can load .pd files which are needed (the dependecies).
 void setOtherPdFilesRef(org.apache.tools.ant.types.Reference r)
           
 void setOutput(java.lang.String s)
          The ouput name is the directory name where the generated files will be created.
 void setPdDir(java.io.File d)
          It assigns the directory name where the include and exclude clause has been based.
 void setProjectName(java.lang.String s)
          It assigns the project name which must be used.
 void setVerbose(boolean verbose)
          It assigns the verbose mode to the jorm generator.
 
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
 

Constructor Detail

AntJorm

public AntJorm()
Method Detail

setPdDir

public void setPdDir(java.io.File d)
It assigns the directory name where the include and exclude clause has been based. (REQUIRED)


createDTD

public org.apache.tools.ant.types.DTDLocation createDTD()
Create a DTD location record. This stores the location of a DTD. The DTD is identified by its public Id. The location may either be a file location or a resource location.

Returns:
the DTD location object to be configured by Ant

setJavac

public void setJavac(boolean l)
The assigned boolean value indicates if the generated must be compiled. The compilation is done after the generation of all classes. true=> no compilation / false=> the classes will be compiled This parameter can be override for a class if you use a local jorm configuration file which defines also the property. (OPTIONAL: default value is false)


setMapperNames

public void setMapperNames(java.lang.String mapperNames)
Defines the list of mappers to be used for compilation. This list is in the form of "m1.sm1,m1.sm2,m2.sm1" where full mapper names are composed of a mapper name (e.g., rdb) followed by a "." followed by a sub-mapper name (e.g., mysql). Full mapper names are separated by ",".

Parameters:
mapperNames -

setOtherPdFiles

public void setOtherPdFiles(org.apache.tools.ant.types.Path cp)
It assigns the classpath where jorm can load .pd files which are needed (the dependecies). (OPTIONAL: default value is the PdDir)


setOtherPdFilesRef

public void setOtherPdFilesRef(org.apache.tools.ant.types.Reference r)

setOutput

public void setOutput(java.lang.String s)
The ouput name is the directory name where the generated files will be created. Futhermmore the classes will be compiled in this directory. (REQUIRED)

Parameters:
s - the string representation of the output directory

setJormConf

public void setJormConf(java.lang.String s)
It assigns the jorm configuration file. (REQUIRED)

Parameters:
s - the string representation of the configuration file.

setLogConf

public void setLogConf(java.lang.String s)
It assigns the jorm configuration file. (REQUIRED)

Parameters:
s - the string representation of the configuration file.

setProjectName

public void setProjectName(java.lang.String s)
It assigns the project name which must be used. This parameter can be override for a class if you use a local jorm configuration file which defines also the property. (OPTIONAL default value = "" empty string)


setBindingInheritance

public void setBindingInheritance(java.lang.String s)
It assigns the class name which the generated PBinding classes must extend. This parameter can be override for a class if you use a local jorm configuration file which defines also the property. (OPTIONAL default value is "")


setMappingInheritance

public void setMappingInheritance(java.lang.String s)
It assigns the class name which the generated PBinding classes must extend. This parameter can be override for a class if you use a local jorm configuration file which defines also the property. (OPTIONAL default value is "")


setVerbose

public void setVerbose(boolean verbose)
It assigns the verbose mode to the jorm generator. This parameter can be override for a class if you use a local jorm configuration file which defines also the property. (OPTIONAL the default value is false)


setKeepsrc

public void setKeepsrc(boolean keepsrc)
It assigns a boolean to indicate if the generated .java file must be kept. This parameter can be override for a class if you use a local jorm configuration file which defines also the property. (OPTIONAL the default value is true)


setBindingAbstract

public void setBindingAbstract(boolean bindingAbstract)
It assigns the boolean value which indictes if the generated Binding must be declared abstract. This parameter can be override for a class if you use a local jorm configuration file which defines also the property. This parameter must be defined in the task or in the jorm configuration file.


setGeneratePDFiles

public void setGeneratePDFiles(boolean val)

execute

public void execute()
             throws org.apache.tools.ant.BuildException
execute method of the Ant task

Throws:
org.apache.tools.ant.BuildException

generates

public void generates(java.lang.String[] pdFileNames)
               throws org.apache.tools.ant.BuildException
Throws:
org.apache.tools.ant.BuildException