DODS 7.1 API

org.enhydra.dods.generator
Class DODSGenerator

java.lang.Object
  extended by org.enhydra.dods.generator.DODSGenerator

public class DODSGenerator
extends java.lang.Object

This class is used for generating DODS code and DODS documentation.


Field Summary
protected  java.lang.String action
          Action that will be performed.
protected static int ACTION_PARAMETER
           
protected static java.util.HashSet actions
           
protected  java.lang.String configDir
          Template set that will be used.
protected static int CONFIGURATION_DIR_PARAMETER
           
protected  java.lang.String database
          Database vendor.
static java.lang.String DATABASE_NOT_SET
           
protected static int DATABASE_PARAMETER
           
protected  java.lang.String doml
          Doml that will be used.
protected  java.lang.String force
          Indicator for force (overwrite) option.
protected static int FORCE_PARAMETER
           
protected static boolean help
           
protected static java.lang.String HELP_MESSAGE
           
protected static int HELP_PARAMETER
           
protected  boolean html
          Indicator for html option.
protected static int HTML_PARAMETER
           
protected static java.lang.String INVALID_ACTION_PARAMETER_MESSAGE
           
protected static java.lang.String INVALID_CONF_DIR_MESSAGE
           
protected static java.lang.String INVALID_DOML_FILE
           
protected static java.lang.String INVALID_NUMBER_OF_PARAMETER_MESSAGE
           
protected static java.lang.String INVALID_PARAMETER_MESSAGE
           
protected static java.lang.String INVALID_TEMPLATE_SET_PARAMETER_MESSAGE
           
protected  boolean invoke
          Indicator whether dods generator should be involved during project ant rebuild.
protected  boolean kelp
          Indicator for using kelp.
protected static java.lang.String NONEXISTING_DOML_FILE
           
protected  java.lang.String outputDir
          Output directory that will be used.
protected static java.util.HashMap parameters
           
protected  boolean pdf
          Indicator for pdf option.
protected static int PDF_PARAMETER
           
protected  boolean ptl
          Indicator for ptl option.
protected static int PTL_PARAMETER
           
protected static int TEMPLATE_SET_PARAMETER
           
protected  java.lang.String templateSet
          Template set that will be used.
protected static java.util.HashSet templateSets
           
protected  DODSWizard wizard
          Wizard that will be used.
protected  boolean xmi
          Indicator for xmi option.
protected static int XMI_PARAMETER
           
 
Constructor Summary
DODSGenerator()
          Default constructor.
 
Method Summary
 int generateAll()
          Generation of DODS code means generation of ant-build, sql, java files, html, pdf, xmi and ptl.
 java.lang.Process generateAll(boolean ownErrorReader)
          Generation of DODS code means generation of ant-build, sql, java files, html, pdf, xmi and ptl.
static int generateAll(java.lang.String outputDir, java.lang.String domlFile, java.lang.String genAction, java.lang.String templateSet, java.lang.String forceBuild, java.lang.String database, boolean genHtml, boolean genPdf, boolean genXmi, boolean genPtl)
          Generation of DODS code means generation of ant-build, sql, java files, html, pdf, xmi and ptl.
static java.lang.Process generateAll(java.lang.String outputDir, java.lang.String domlFile, java.lang.String genAction, java.lang.String templateSet, java.lang.String forceBuild, java.lang.String database, boolean genHtml, boolean genPdf, boolean genXmi, boolean genPtl, boolean ownErrorReader)
          Generation of DODS code means generation of ant-build, sql, java files, html, pdf, xmi and ptl.
static java.lang.Process generateAll(java.lang.String outputDir, java.lang.String domlFile, java.lang.String genAction, java.lang.String configDir, java.lang.String templateSet, java.lang.String forceBuild, java.lang.String database, boolean genHtml, boolean genPdf, boolean genXmi, boolean genPtl, boolean ownErrorReader)
          Generation of DODS code means generation of ant-build, sql, java files, html, pdf, xmi and ptl.
static int generateAll(java.lang.String outputDir, java.lang.String domlFile, java.lang.String genAction, java.lang.String configDir, java.lang.String templateDir, java.lang.String templateSet, java.lang.String forceBuild, java.lang.String database, boolean genHtml, boolean genPdf, boolean genXmi, boolean genPtl)
          Generation of DODS code means generation of ant-build, sql, java files, html, pdf, xmi and ptl.
 java.lang.Process generateCode(boolean ownErrorReader)
          Generation of DODS code means generation of ant-build, sql and java files.
static java.lang.Process generateCode(java.lang.String outputDir, java.lang.String domlFile, java.lang.String action, java.lang.String templateSet, java.lang.String forceBuild, java.lang.String database, boolean ownErrorReader)
          Generation of DODS code means generation of ant-build, sql and java files.
 java.lang.Process generateHTML(boolean ownErrorReader)
          Generates DODS html documentation from .doml file.
static java.lang.Process generateHTML(java.lang.String outputDir, java.lang.String domlFile, java.lang.String htmlFile, java.lang.String forceBuild, boolean ownErrorReader)
          Generates DODS html documentation from .doml file.
 java.lang.Process generatePDF(boolean ownErrorReader)
          Generates DODS pdf documentation from .doml file.
static java.lang.Process generatePDF(java.lang.String outputDir, java.lang.String domlFile, java.lang.String pdfFile, java.lang.String forceBuild, boolean ownErrorReader)
          Generates DODS pdf documentation from .doml file.
 java.lang.Process generatePTL(boolean ownErrorReader)
          Generates DODS ptl documentation from .doml file.
static java.lang.Process generatePTL(java.lang.String outputDir, java.lang.String domlFile, java.lang.String ptlFile, java.lang.String forceBuild, boolean ownErrorReader)
          Generates DODS ptl (Rational Rose) documentation from .doml file.
 java.lang.Process generateXMI(boolean ownErrorReader)
          Generates DODS xmi documentation from .doml file.
static java.lang.Process generateXMI(java.lang.String outputDir, java.lang.String domlFile, java.lang.String xmiFile, java.lang.String forceBuild, boolean ownErrorReader)
          Generates DODS xmi documentation from .doml file.
 java.lang.String getAction()
          Method gets action that is performed.
 java.lang.String getConfigDir()
           
 java.lang.String getDatabase()
          Method gets database vendor for generating sql.
 java.lang.String getDoml()
          Method gets doml file that is used.
 java.lang.String getForce()
          Method gets indicator for force (overwrite) option.
 boolean getHtml()
          Method gets indicator for html option.
 boolean getInvoke()
          Method gets invoke indicator.
 boolean getKelp()
          Method gets indicator for kelp option.
 java.lang.String getOutputDir()
          Method gets output directory that is used.
 boolean getPdf()
          Method gets indicator for pdf option.
 boolean getPtl()
          Method gets indicator for ptl option.
 java.lang.String getTemplateSet()
          Method gets template set that is used.
 DODSWizard getWizard()
          Method returns used wizard.
 boolean getXmi()
          Method gets indicator for xmi option.
static void help()
          Generates Command line help.
static void main(java.lang.String[] args)
          Generates DODS.
 java.lang.String parse(java.lang.String[] args)
          Parses input parameters.
 void postGenerate()
          This method is called by wizard after generate action.
 void preCancel()
          This method is called after wizard closing.
 void preClose()
          This method is called before wizard closing.
 void preGenerate()
          This method is called by wizard before generate action.
 void runWizard()
          Method runs wizard's GUI .
 void setAction(java.lang.String action)
          Method sets action that will be performed.
 void setConfigDir(java.lang.String conDir)
           
 void setDatabase(java.lang.String database)
          Method sets database vendor for generating sql.
 void setDoml(java.lang.String doml)
          Method sets doml file that will be used.
 void setForce(java.lang.String force)
          Method sets indicator for force (overwrite) option.
 void setHtml(boolean html)
          Method sets indicator for html option.
 void setInvoke(boolean invoke)
          Method sets invoke indicator.
 void setKelp(boolean kelp)
          Method sets indicator for kelp option.
 void setOutputDir(java.lang.String outputDir)
          Method sets output directory that will be used.
 void setPdf(boolean pdf)
          Method sets indicator for pdf option.
 void setPtl(boolean ptl)
          Method sets indicator for ptl option.
 void setTemplateSet(java.lang.String templateSet)
          Method sets template set that will be used.
 void setWizard(DODSWizard wizard)
          Method sets wizard that will be used.
 void setXmi(boolean xmi)
          Method sets indicator for xmi option.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HELP_PARAMETER

protected static final int HELP_PARAMETER
See Also:
Constant Field Values

ACTION_PARAMETER

protected static final int ACTION_PARAMETER
See Also:
Constant Field Values

TEMPLATE_SET_PARAMETER

protected static final int TEMPLATE_SET_PARAMETER
See Also:
Constant Field Values

FORCE_PARAMETER

protected static final int FORCE_PARAMETER
See Also:
Constant Field Values

DATABASE_PARAMETER

protected static final int DATABASE_PARAMETER
See Also:
Constant Field Values

CONFIGURATION_DIR_PARAMETER

protected static final int CONFIGURATION_DIR_PARAMETER
See Also:
Constant Field Values

HTML_PARAMETER

protected static final int HTML_PARAMETER
See Also:
Constant Field Values

PDF_PARAMETER

protected static final int PDF_PARAMETER
See Also:
Constant Field Values

XMI_PARAMETER

protected static final int XMI_PARAMETER
See Also:
Constant Field Values

PTL_PARAMETER

protected static final int PTL_PARAMETER
See Also:
Constant Field Values

HELP_MESSAGE

protected static final java.lang.String HELP_MESSAGE
See Also:
Constant Field Values

INVALID_NUMBER_OF_PARAMETER_MESSAGE

protected static final java.lang.String INVALID_NUMBER_OF_PARAMETER_MESSAGE
See Also:
Constant Field Values

INVALID_PARAMETER_MESSAGE

protected static final java.lang.String INVALID_PARAMETER_MESSAGE
See Also:
Constant Field Values

INVALID_ACTION_PARAMETER_MESSAGE

protected static final java.lang.String INVALID_ACTION_PARAMETER_MESSAGE
See Also:
Constant Field Values

INVALID_TEMPLATE_SET_PARAMETER_MESSAGE

protected static final java.lang.String INVALID_TEMPLATE_SET_PARAMETER_MESSAGE
See Also:
Constant Field Values

INVALID_DOML_FILE

protected static final java.lang.String INVALID_DOML_FILE
See Also:
Constant Field Values

NONEXISTING_DOML_FILE

protected static final java.lang.String NONEXISTING_DOML_FILE
See Also:
Constant Field Values

INVALID_CONF_DIR_MESSAGE

protected static final java.lang.String INVALID_CONF_DIR_MESSAGE
See Also:
Constant Field Values

DATABASE_NOT_SET

public static final java.lang.String DATABASE_NOT_SET
See Also:
Constant Field Values

wizard

protected DODSWizard wizard
Wizard that will be used.


doml

protected java.lang.String doml
Doml that will be used.


outputDir

protected java.lang.String outputDir
Output directory that will be used.


action

protected java.lang.String action
Action that will be performed.


templateSet

protected java.lang.String templateSet
Template set that will be used.


configDir

protected java.lang.String configDir
Template set that will be used.


force

protected java.lang.String force
Indicator for force (overwrite) option.


database

protected java.lang.String database
Database vendor.


html

protected boolean html
Indicator for html option.


pdf

protected boolean pdf
Indicator for pdf option.


xmi

protected boolean xmi
Indicator for xmi option.


ptl

protected boolean ptl
Indicator for ptl option.


invoke

protected boolean invoke
Indicator whether dods generator should be involved during project ant rebuild.


kelp

protected boolean kelp
Indicator for using kelp.


help

protected static boolean help

parameters

protected static java.util.HashMap parameters

actions

protected static java.util.HashSet actions

templateSets

protected static java.util.HashSet templateSets
Constructor Detail

DODSGenerator

public DODSGenerator()
Default constructor.

Method Detail

getWizard

public DODSWizard getWizard()
Method returns used wizard.

Returns:
used wizard.

setWizard

public void setWizard(DODSWizard wizard)
Method sets wizard that will be used.

Parameters:
wizard - wizard that will be used.

getDoml

public java.lang.String getDoml()
Method gets doml file that is used.

Returns:
doml file that is used.

setDoml

public void setDoml(java.lang.String doml)
Method sets doml file that will be used.

Parameters:
doml - doml file that will be used.

getOutputDir

public java.lang.String getOutputDir()
Method gets output directory that is used.

Returns:
output directory that is used.

setOutputDir

public void setOutputDir(java.lang.String outputDir)
Method sets output directory that will be used.

Parameters:
outputDir - output directory that will be used.

getAction

public java.lang.String getAction()
Method gets action that is performed.

Returns:
action that is performed.

setAction

public void setAction(java.lang.String action)
Method sets action that will be performed.

Parameters:
action - that will be performed.

getTemplateSet

public java.lang.String getTemplateSet()
Method gets template set that is used.

Returns:
template set that is used.

setTemplateSet

public void setTemplateSet(java.lang.String templateSet)
Method sets template set that will be used.

Parameters:
templateSet - template set that will be used.

getForce

public java.lang.String getForce()
Method gets indicator for force (overwrite) option.

Returns:
indicator for force (overwrite) option.

setForce

public void setForce(java.lang.String force)
Method sets indicator for force (overwrite) option.

Parameters:
force - indicator for force (overwrite) option.

getDatabase

public java.lang.String getDatabase()
Method gets database vendor for generating sql.

Returns:
database vendor for generating sql.

setDatabase

public void setDatabase(java.lang.String database)
Method sets database vendor for generating sql.

Parameters:
database - database vendor for generating sql.

getHtml

public boolean getHtml()
Method gets indicator for html option.

Returns:
indicator for html option.

setHtml

public void setHtml(boolean html)
Method sets indicator for html option.

Parameters:
html - indicator for html option.

getPdf

public boolean getPdf()
Method gets indicator for pdf option.

Returns:
indicator for pdf option.

setPdf

public void setPdf(boolean pdf)
Method sets indicator for pdf option.

Parameters:
pdf - indicator for pdf option.

getXmi

public boolean getXmi()
Method gets indicator for xmi option.

Returns:
indicator for xmi option.

setXmi

public void setXmi(boolean xmi)
Method sets indicator for xmi option.

Parameters:
xmi - indicator for xmi option.

getPtl

public boolean getPtl()
Method gets indicator for ptl option.

Returns:
indicator for ptl option.

setPtl

public void setPtl(boolean ptl)
Method sets indicator for ptl option.

Parameters:
ptl - indicator for ptl option.

getInvoke

public boolean getInvoke()
Method gets invoke indicator.

Returns:
invoke indicator.

setInvoke

public void setInvoke(boolean invoke)
Method sets invoke indicator.

Parameters:
invoke - invoke indicator.

getKelp

public boolean getKelp()
Method gets indicator for kelp option.

Returns:
indicator for kelp option.

setKelp

public void setKelp(boolean kelp)
Method sets indicator for kelp option.

Parameters:
kelp - indicator for kelp option.

runWizard

public void runWizard()
Method runs wizard's GUI .


preGenerate

public void preGenerate()
This method is called by wizard before generate action. User should override this method to involve any pre-generating action.


postGenerate

public void postGenerate()
This method is called by wizard after generate action. User should override this method to involve any post-generating action.


preClose

public void preClose()
This method is called before wizard closing. User should override this method to involve any pre-closing action.


preCancel

public void preCancel()
This method is called after wizard closing. User should override this method to involve any post-closing action.


generateCode

public static java.lang.Process generateCode(java.lang.String outputDir,
                                             java.lang.String domlFile,
                                             java.lang.String action,
                                             java.lang.String templateSet,
                                             java.lang.String forceBuild,
                                             java.lang.String database,
                                             boolean ownErrorReader)
                                      throws DODSGenerateException
Generation of DODS code means generation of ant-build, sql and java files. Method produces Procces which will generate code.

Parameters:
outputDir - full path to output directory that will be used.
domlFile - full path to .doml file for generating code.
action - type of generation.
templateSet - template set which will be used for generating java code.
forceBuild - "true" if code will be always generated, otherwise only changes will be regenerated.
database - database vendor for generating sql files.
ownErrorReader - true if user needs to make its own ErrorReader, otherwise (false) method will make ErrorReader.
Returns:
procces which will generate code.
Throws:
DODSGenerateException - if any error occurs.

Example:

 String s;
 Process p = DODSGenerator.generateCode(outputDir,doml,action,template,force,false);
 BufferedReader buffer = new BufferedReader(new InputStreamReader(p.getInputStream()));
 while((s = buffer.readLine()) != null) {
         System.out.println(s);
 }
 

generateCode

public java.lang.Process generateCode(boolean ownErrorReader)
                               throws DODSGenerateException
Generation of DODS code means generation of ant-build, sql and java files. Method produces Procces which will generate code.

Parameters:
ownErrorReader - true if user needs to make its own ErrorReader, otherwise (false) method will make ErrorReader.
Returns:
procces which will generate code.
Throws:
DODSGenerateException - if any error occurs.

Example:

 String s;
 Process p = DODSGenerator.generateCode(false);
 BufferedReader buffer = new BufferedReader(new InputStreamReader(p.getInputStream()));
 while((s = buffer.readLine()) != null) {
         System.out.println(s);
 }]
 

generateHTML

public static java.lang.Process generateHTML(java.lang.String outputDir,
                                             java.lang.String domlFile,
                                             java.lang.String htmlFile,
                                             java.lang.String forceBuild,
                                             boolean ownErrorReader)
                                      throws DODSGenerateException
Generates DODS html documentation from .doml file. Method produces Procces which will generate documentation.

Parameters:
outputDir - full path to output directory that will be used.
domlFile - full path to .doml file for generating code.
htmlFile - output html file.
forceBuild - "true" if code will be always generated, otherwise only changes will be regenerated.
ownErrorReader - true if user needs to make its own ErrorReader, otherwise (false) method will make ErrorReader.
Returns:
procces which will generate code.
Throws:
DODSGenerateException - if any error occurs.
See Also:
generateCode(String, String, String, String, String, String, boolean)

generateHTML

public java.lang.Process generateHTML(boolean ownErrorReader)
                               throws DODSGenerateException
Generates DODS html documentation from .doml file. Method produces Procces which will generate documentation.

Parameters:
ownErrorReader - true if user needs to make its own ErrorReader, otherwise (false) method will make ErrorReader.
Returns:
procces which will generate code.
Throws:
DODSGenerateException - if any error occurs.
See Also:
generateCode(String, String, String, String, String, String, boolean)

generatePDF

public static java.lang.Process generatePDF(java.lang.String outputDir,
                                            java.lang.String domlFile,
                                            java.lang.String pdfFile,
                                            java.lang.String forceBuild,
                                            boolean ownErrorReader)
                                     throws DODSGenerateException
Generates DODS pdf documentation from .doml file. Method produces Procces which will generate documentation.

Parameters:
outputDir - full path to output directory that will be used.
domlFile - full path to .doml file for generating code.
pdfFile - output pdf file.
forceBuild - "true" if code will be always generated, otherwise only changes will be regenerated.
ownErrorReader - true if user needs to make its own ErrorReader, otherwise (false) method will make ErrorReader.
Returns:
procces which will generate code.
Throws:
DODSGenerateException - if any error occurs.
See Also:
generateCode(String, String, String, String, String, String, boolean)

generatePDF

public java.lang.Process generatePDF(boolean ownErrorReader)
                              throws DODSGenerateException
Generates DODS pdf documentation from .doml file. Method produces Procces which will generate documentation.

Parameters:
ownErrorReader - true if user needs to make its own ErrorReader, otherwise (false) method will make ErrorReader.
Returns:
procces which will generate code.
Throws:
DODSGenerateException - if any error occurs.
See Also:
generateCode(String, String, String, String, String, String, boolean)

generateXMI

public static java.lang.Process generateXMI(java.lang.String outputDir,
                                            java.lang.String domlFile,
                                            java.lang.String xmiFile,
                                            java.lang.String forceBuild,
                                            boolean ownErrorReader)
                                     throws DODSGenerateException
Generates DODS xmi documentation from .doml file. Method produces Procces which will generate documentation.

Parameters:
outputDir - full path to output directory that will be used.
domlFile - full path to .doml file for generating code.
xmiFile - output xmi file.
forceBuild - "true" if code will be always generated, otherwise only changes will be regenerated.
ownErrorReader - true if user needs to make its own ErrorReader, otherwise (false) method will make ErrorReader.
Returns:
procces which will generate code.
Throws:
DODSGenerateException - if any error occurs.
See Also:
generateCode(String, String, String, String, String, String, boolean)

generateXMI

public java.lang.Process generateXMI(boolean ownErrorReader)
                              throws DODSGenerateException
Generates DODS xmi documentation from .doml file. Method produces Procces which will generate documentation.

Parameters:
ownErrorReader - true if user needs to make its own ErrorReader, otherwise (false) method will make ErrorReader.
Returns:
procces which will generate code.
Throws:
DODSGenerateException - if any error occurs.
See Also:
generateCode(String, String, String, String, String, String, boolean)

generatePTL

public static java.lang.Process generatePTL(java.lang.String outputDir,
                                            java.lang.String domlFile,
                                            java.lang.String ptlFile,
                                            java.lang.String forceBuild,
                                            boolean ownErrorReader)
                                     throws DODSGenerateException
Generates DODS ptl (Rational Rose) documentation from .doml file. Method produces Procces which will generate documentation.

Parameters:
outputDir - full path to output directory that will be used.
domlFile - full path to .doml file for generating code.
ptlFile - output ptl file.
forceBuild - "true" if code will be always generated, otherwise only changes will be regenerated.
ownErrorReader - true if user needs to make its own ErrorReader, otherwise (false) method will make ErrorReader.
Returns:
procces which will generate code.
Throws:
DODSGenerateException - if any error occurs.
See Also:
generateCode(String, String, String, String, String, String, boolean)

generatePTL

public java.lang.Process generatePTL(boolean ownErrorReader)
                              throws DODSGenerateException
Generates DODS ptl documentation from .doml file. Method produces Procces which will generate documentation.

Parameters:
ownErrorReader - true if user needs to make its own ErrorReader, otherwise (false) method will make ErrorReader.
Returns:
procces which will generate code.
Throws:
DODSGenerateException - if any error occurs.
See Also:
generateCode(String, String, String, String, String, String, boolean)

generateAll

public static int generateAll(java.lang.String outputDir,
                              java.lang.String domlFile,
                              java.lang.String genAction,
                              java.lang.String templateSet,
                              java.lang.String forceBuild,
                              java.lang.String database,
                              boolean genHtml,
                              boolean genPdf,
                              boolean genXmi,
                              boolean genPtl)
                       throws DODSGenerateException
Generation of DODS code means generation of ant-build, sql, java files, html, pdf, xmi and ptl. Method produces Procces which will generate code.

Parameters:
outputDir - full path to output directory that will be used.
domlFile - full path to .doml file for generating code.
genAction - type of generation.
templateSet - template set which will be used for generating java code.
database - database vendor for generating sql files.
genHtml - if true generates DODS html documentation from .doml file.
genPdf - if true generates DODS pdf documentation from .doml file.
genXmi - if true generates DODS xmi documentation from .doml file.
genPtl - if true generates DODS ptl documentation from .doml file.
Returns:
error code of executing process.
Throws:
DODSGenerateException - if any error occurs.

generateAll

public static int generateAll(java.lang.String outputDir,
                              java.lang.String domlFile,
                              java.lang.String genAction,
                              java.lang.String configDir,
                              java.lang.String templateDir,
                              java.lang.String templateSet,
                              java.lang.String forceBuild,
                              java.lang.String database,
                              boolean genHtml,
                              boolean genPdf,
                              boolean genXmi,
                              boolean genPtl)
                       throws DODSGenerateException
Generation of DODS code means generation of ant-build, sql, java files, html, pdf, xmi and ptl. Method produces Procces which will generate code.

Parameters:
outputDir - full path to output directory that will be used.
domlFile - full path to .doml file for generating code.
genAction - type of generation.
templateDir - template directory.
templateSet - template set which will be used for generating java code.
database - database vendor for generating sql files.
genHtml - if true generates DODS html documentation from .doml file.
genPdf - if true generates DODS pdf documentation from .doml file.
genXmi - if true generates DODS xmi documentation from .doml file.
genPtl - if true generates DODS ptl documentation from .doml file.
Returns:
error code of executing process.
Throws:
DODSGenerateException - if any error occurs.

generateAll

public int generateAll()
                throws DODSGenerateException
Generation of DODS code means generation of ant-build, sql, java files, html, pdf, xmi and ptl. Method produces Procces which will generate code.

Returns:
error code of executing process.
Throws:
DODSGenerateException - if any error occurs.

generateAll

public static java.lang.Process generateAll(java.lang.String outputDir,
                                            java.lang.String domlFile,
                                            java.lang.String genAction,
                                            java.lang.String configDir,
                                            java.lang.String templateSet,
                                            java.lang.String forceBuild,
                                            java.lang.String database,
                                            boolean genHtml,
                                            boolean genPdf,
                                            boolean genXmi,
                                            boolean genPtl,
                                            boolean ownErrorReader)
                                     throws DODSGenerateException
Generation of DODS code means generation of ant-build, sql, java files, html, pdf, xmi and ptl. Method produces Procces which will generate code. This method call (dods.bat/dods) with all parameters.

Parameters:
outputDir - full path to output directory that will be used.
domlFile - full path to .doml file for generating code.
genAction - type of generation.
configDir - path to configuration directory
templateSet - template set which will be used for generating java code.
forceBuild - "true" if code will be always generated, otherwise only changes will be regenerated.
database - database vendor for generating sql files.
genHtml - if true generates DODS html documentation from .doml file.
genPdf - if true generates DODS pdf documentation from .doml file.
genXmi - if true generates DODS xmi documentation from .doml file.
genPtl - if true generates DODS ptl documentation from .doml file.
ownErrorReader - true if user needs to make its own ErrorReader, otherwise (false) method will make ErrorReader.
Returns:
procces which will generate code.
Throws:
DODSGenerateException - if any error occurs.

generateAll

public static java.lang.Process generateAll(java.lang.String outputDir,
                                            java.lang.String domlFile,
                                            java.lang.String genAction,
                                            java.lang.String templateSet,
                                            java.lang.String forceBuild,
                                            java.lang.String database,
                                            boolean genHtml,
                                            boolean genPdf,
                                            boolean genXmi,
                                            boolean genPtl,
                                            boolean ownErrorReader)
                                     throws DODSGenerateException
Generation of DODS code means generation of ant-build, sql, java files, html, pdf, xmi and ptl. Method produces Procces which will generate code. This method call (dods.bat/dods) with all parameters.

Parameters:
outputDir - full path to output directory that will be used.
domlFile - full path to .doml file for generating code.
genAction - type of generation.
templateSet - template set which will be used for generating java code.
forceBuild - "true" if code will be always generated, otherwise only changes will be regenerated.
database - database vendor for generating sql files.
genHtml - if true generates DODS html documentation from .doml file.
genPdf - if true generates DODS pdf documentation from .doml file.
genXmi - if true generates DODS xmi documentation from .doml file.
genPtl - if true generates DODS ptl documentation from .doml file.
ownErrorReader - true if user needs to make its own ErrorReader, otherwise (false) method will make ErrorReader.
Returns:
procces which will generate code.
Throws:
DODSGenerateException - if any error occurs.

generateAll

public java.lang.Process generateAll(boolean ownErrorReader)
                              throws DODSGenerateException
Generation of DODS code means generation of ant-build, sql, java files, html, pdf, xmi and ptl. Method produces Procces which will generate code. This method call (dods.bat/dods) with all parameters.

Parameters:
ownErrorReader - true if user needs to make its own ErrorReader, otherwise (false) method will make ErrorReader.
Returns:
procces which will generate code.
Throws:
DODSGenerateException - if any error occurs.

help

public static void help()
Generates Command line help.


parse

public java.lang.String parse(java.lang.String[] args)
Parses input parameters.

Parameters:
args - array of input command line parameters.
Returns:
error message, null if parsing was OK.

main

public static void main(java.lang.String[] args)
Generates DODS. Method parses command line parameters and, depending on that, calls wizard or generates DODS.
 Command line:
 dods [-?/help] [-a action] [-t templateset] [-b/-database]  [-c confPath]
      [-f/force] [-h/html] [-p/pdf] [-x/xmi] [-r/ptl] domlfile outputdir

  where:

   outputdir   full path to output directory that will be used.

   domlfile      full path to .doml file for generating code.

  options:

   [-? -help]    shows help.

   [-a action]   ant task parameter for code generation:
         dods:build_all       - to create all sql files and java classes (default).
         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.

   [-t templateset]  template set for generating java and sql code:
              standard         - generate standard java code (default).
            - any user defined template set.

   [-b/-database] sets database vendor for generating sql.

   [-c confPath]  sets folder with dodsConf.xml file.

   [-f/-force]  with this switch, code will be always generated, without it, only changes
                will be regenerated.

   [-h/-html]    generates DODS html documentation from .doml file.

   [-p/-pdf]     generates DODS pdf documentation from .doml file.

   [-x/-xmi]     generates DODS xmi documentation from .doml file.

   [-r/-ptl]     generates DODS ptl (Rational Rose) documentation from .doml file.

 

Example: DODSGenerator -a dods:java -t standard -f -pdf -x discrack.doml /test/discRack


setConfigDir

public void setConfigDir(java.lang.String conDir)
Parameters:
conDir - Sets configuration directory

getConfigDir

public java.lang.String getConfigDir()
Returns:
actual config dir

DODS 7.1 API