Tutorial 1 Overview

To get some hands-on experience with iQgen we recommend to run the tutorial that comes with the iQgen distribution. You will find the templates in the directory samples/getting_started/tutorial_1/templates and the XML models in XMI format in directory samples/getting_started/tutorial_1/model.

UML Profile

The UML profile for Tutorial 1 is extremely simple - essentially, it doesn't use any stereotypes or tagged values at all.

Model

Tutorial 1 uses the model depicted in the figure below. It will not result in a complete application, but in the end you will have source code which can be compiled and you will have obtained a deeper knowledge of how to develop templates.

Figure 2.1. Tutorial 1 packages

Tutorial 1 packages

Figure 2.2. Tutorial 1 dependencies class diagram

Tutorial 1 dependencies class diagram

Tutorial Files

To give you an overview of the templates in Tutorial 1, here's an overview table with some short comments.

Table 2.1. Files in Tutorial 1

DirectoryFileComment
./build.xmlAnt script for generation
modelTutorial_1.xmlXMI v1.0 model file
modelTutorial_1.mdlRational Rose model file
templatesmain.jspModel element to template mapping
templatesinterface.jspSimple example that demonstrates how to generate a Java interface
templatesclass.jspMore complex example that generates Java class files. Uses other templates like associations, attributes, and operations
templatesattributes.jspUsed by class.jsp. Generates attribute declarations, getter and setter methods.
templatesoperations.jspUsed by class.jsp. Generates methods.
templatesassociations.jspUsed by class.jsp
templatesbuild.jspPostProcessTemplates example
templatescopyright.jspCopyright text
templatesdrop_and_create.jspSimple SQL script
templatesparams.jspUtility JSP that is included by other templates.
templatesutilities.jspUtility JSP that is included by other templates.