Table of Contents
If you are running on Windows, to start DODS generator, you should use batch files in
<DODS_HOME>/bin directory, for independent DODS, or
<ENHYDRA_HOME>/bin directory, for DODS within Enhydra 5.1 or 6.0
where <ENHYDRA_HOME> is home (root) directory of Enhydra 5.1 or 6.0
At the command window, change directory to the /bin directory.
For example,
for independent DODS:
cd /usr/local/<DODS_HOME>/bin
if you installed DODS in /usr/local/<DODS_HOME> directory
for DODS within Enhydra 5.1 or 6.0:
cd /usr/local/<ENHYDRA_HOME>/bin
if you installed Enhydra 5.1 or 6.0 in /usr/local/<ENHYDRA_HOME> directory
The dods generator start batch file is located in this bin directory. So, to start the dods generator, enter:
dods
If you are running Linux, you can use start scripts in the same directory. So to start the dods generator on Linux, enter:
./dods
Note:
<DODS_HOME>/bin directory should be added in system path. Then, DODS can be started from any directory (by typing dods).
You will see DODS Generator Wizard displayed in the output window.
Figure 1: DODS Generator Wizard
You must choose project root and path to the doml file.
Config directory field contains path to custom configuration folder (which contains dodsConf.xml file). It is used to generate java source code and SQL scripts. If the path is set to any other path than default (offered), in the application's configuration file shoud be set parameter
DatabaseManager.ConfigurationDir
to new path of the custom configuration folder.
There are four options on the Generator Wizard:
SQL generate
SQL Splitter
Java generate
Compile Java
At least one of the Generate fields must be checked.
There are two combo boxes on the Generator Wizard. Template set combo box contains possible template sets:
standard
<user_defined_templates>
DB vendor combo box contains list of database vendors. If one of these vendors is selected, this database will overwrite database declared in DOML file.
There is a possibility on the Generator Wizard for generating the following types of documentation:
HTML
XMI
PTL
On the Generator Wizard, there is also a check box:
overwrite
for code generating (java and sql), no matter if the code already existed.
You can manually start dods generator without using wizard by typing dods with additional parameters:
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 is full path to output directory that will be used.
domlfile is 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 them. SQL files will be divided into separate files using SQLSplitter .
dods:sqlsplit - to create only sql files and separate them 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.
dods:generatorOff - to disable generating and compiling of java source code, for generating documentation only (you stil need to set documentation property: html, pdf, ptl, xmi).
[-t templateset] - template set for generating java and sql code:
standard - generate standard java code (default).
<user defined> - 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.