MMBase2UML User's Guide

A UML Model generator for MMBase applications

Kors van Beem

Finalist IT Group

Stationsplein 45, 3013 AK Rotterdam, The Netherlands, Phone: +31 10 217 08 00, Fax: +31 10 280 96 20, Email:

Revision History
Revision v1.2October 8, 2003Kors van Beem

First public release


Table of Contents

1. What is MMBase2UML?
2. Quick start
3. Using MMBase2UML
3.1. Mapping of MMBase onto UML
3.2. MMBase2UML using the script
3.3. MMBase2UML using the ANT build file
3.4. Running MMBase2UML
3.5. Using the model
A. References

1. What is MMBase2UML?

MMBase2UML is a reversed engineering tool to analyse an existing MMBase application and create a representative UML model with. The application can read either one application, several applications or a remote cloud. For every MMBase application a XMI file is created. The created XMI file can be read by a modelling tool like Poseidon. MMBase2UML creates UML Class diagrams based on the UML 1.4 definition.

2. Quick start

After installation of UML2MMBase has been completed, the following steps can be followed for a quick start:

  1. Install java 1.4. Tested with JDK1.4.1_02.

  2. run the "mmbase2uml.bat" script and pass the directory name of an mmbase application. For example:

    mmbase2uml.bat /tomcat/webapps/mmbase/WEB-INF/config/applications/APPLICATION. Make sure there is no backup data or testdata in the application direcytory.

  3. Start Poseidon and open the newly created XMI file. This file can be found in the directory where MMBase2UML was run and has the name name_of_application.xmi. (E.g. APPLICATION.xmi).

  4. Drag the classes on the left side of the screen in Poseidon into the empty diagram. The relations between the objects will appear automatically.

3. Using MMBase2UML

3.1. Mapping of MMBase onto UML

The UML model is build of information from the MMBase application. The mapping of the information from the application to the UML model elements is the same as in UML2MMBase. For more information about this mapping is therefore referenced to the UML2MMBase documentation.

3.2. MMBase2UML using the script

MMBase2UML is provided with a simple script that can be used to start the application: mmbase2uml.bat. The script is used to generate a UML model of one MMBase application or to process all application in a MMBase configuration. The script expect one parameter as argument which is the path to an MMBase application or application configuration directory. The generated UML model(s) will be stored in the current working directory in XMI format.

3.3. MMBase2UML using the ANT build file

MMBase2UML is run with one or two parameters. The standard ant targets pass two parameters. The first one points to one or more mmbase application. The second one specifies the output path where the XMI file should be written to. The following ant targets exist:

Table 1. The ant targets and the passed properties

ant targetfirst parametersecond parameter
mmbase2uml.singleappsingle.app.dirmmbase2uml.output.dir
mmbase2uml.multiappmulti.app.dirmmbase2uml.output.dir
mmbase2uml.remoteremote.app.dirmmbase2uml.output.dir

The single.app.dir property in the buildfile may point to a single application. The directory where the application resides should contain a directory that contains the builders and an XML file with the application definition. For example:

/tomcat/webapps/mmbase/WEB-INF/config/applications/APPLICATION

Figure 1. A single application reference

A single application reference

The multi.app.dir in the buildfile may point to a directory that contains more than one applications. The directory should contain one ore more combinations of application definitions and directories containing the builders of this definition. For example:

/tomcat/webapps/mmbase/WEB-INF/config/applications :

Figure 2. Multiple applications references

Multiple applications references

The remote.app.url property in the buildfile specifies an remote application. This url should look like rmi://host:port/context .

The mmbase2uml.output.dir property in the buildfile specifies the directory where the XMI files should be written to.

3.4. Running MMBase2UML

When the parameters are set properly the application can be run using one of the three ant targets. This will result in something like this:

Figure 3. Running MMBase2UML

Running MMBase2UML

3.5. Using the model

After the XMI file is created the model can be opened in an UML modelling tool like Poseidon. Initially the Diagram in Poseidon will be empty. To make the classes and the associations visible, the classes can be dragged from the left side of the screen on to the diagram. The generalizations and associations will appear automatically:

Figure 4. Visualization of the UML model

Visualization of the UML model

A. References