DODS Generator Wizard is a graphical tool that helps you to easily generate Java and SQL files. It is recommended for the first time users.
When you start dods.bat you will get window like on Figure 2.
Figure 2: DODS Generator Wizard
In the Output directory field you should input directory with full path of output directory that will be used.
DOML file field should be used for entering your 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.
example:
DatabaseManager.ConfigurationDir=C:\configurations\dods
There are four options on the Generator Wizard:
Generate SQL:
This field should be checked if you want to generate: SQL files for each table separately, one cumulutave SQL file for creating all tables (SQLcreate.sql), and one file for deleting those tables (SQLdrop.sql).
SQL Splitter:
It is used for creating separated cumulative SQL files (for creating tables, for adding foreign keys, primary keys and for deleting tables). This option enables creating tables without cross references, and after their creation, adding needed references.
SQL Splitter copies all SQL commands from all SQL files which are situated in the working directory and all its subdirectories into SQL files.
Original SQL files are created by DODS.
All SQL commands are copied into file separateCreate.sql except sql commands which reference to foreign and primary key columns.
In the separateIntegrity.sql file class puts ALTER TABLE sql commands with adding foreign key references.
In the separatePrimary.sql file class puts ALTER TABLE sql commands with adding primary keys.
In the separateDropTable.sql file class puts DROP TABLE sql commands for all tables which were created by create table SQL statements in the first file (separateCreate.sql).
In the separateIndex.sql file class puts CREATE INDEX sql commands for all tables which were created by create table SQL statements in the first file(separateCreate.sql).
In the separateDropIntegrity.sql file class puts DROP foreign key sql commands for all tables which were created by create table SQL statements in the first file (separateCreate.sql).
In the separateDropPrimary.sql file class puts DROP primary sql commands for all tables which created by create table SQL statements in the first file (separateCreate.sql).
In the separateDropIndex.sql file class puts DROP IDEX sql commands for all tables which created by create table SQL statements in the first file (separateCreate.sql).
All others Sql commands class puts into separate file.
Unless Generate SQL field is checked, this field can not be checked. If this option is checked, Generator Wizard doesn't create cumulative SQL files.
Generate Java:
This field should be checked if you want to generate Java files (DO, Query, DOI and DataStruct objects).
Compile Java:
It is used for compiling generated java files. Compiled files will be located in folder <output_directory>/classes. Unless Generate Java field is checked, this field can not be checked.
If you do not need both Java and SQL generation, you can choose one of them instead of both.
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:
If this template set is chosen, DODS generates standard code.
<user_defined_templates>:
Users can define their own tempate sets.
Selected template set depends on <template_set> tag in doml file. If this tag is not set, defaut template set is "standard". If this tag is set, the value of this tag will be selected in template set combo box.
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. Possible database vendors are:
MSQL
Oracle
Informix
Sybase
MySQL
PostgreSQL
MckoiSQL
Standard
DB2
QED
HypersonicSQL
InstantDB
There is a possibility on the Generator Wizard for generating the following types of documentation:
HTML:
If you check this field, doml file will be converted into html file.
PDF:
If you check this field, doml file will be converted into pdf file.
XMI:
If you check this field, doml file will be converted into xmi file.
PTL:
If you check this field, doml file will be converted into ptl (Rational Rose) file.
On the Generator Wizard, there is also a check box:
overwrite
for code generating (java and sql), no matter if the code already existed.