Revision History | ||
---|---|---|
Revision v1.2 | October 8, 2003 | Kors van Beem |
First public release |
Table of Contents
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.
After installation of UML2MMBase has been completed, the following steps can be followed for a quick start:
Install java 1.4. Tested with JDK1.4.1_02.
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.
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).
Drag the classes on the left side of the screen in Poseidon into the empty diagram. The relations between the objects will appear automatically.
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.
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.
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 target | first parameter | second parameter |
mmbase2uml.singleapp | single.app.dir | mmbase2uml.output.dir |
mmbase2uml.multiapp | multi.app.dir | mmbase2uml.output.dir |
mmbase2uml.remote | remote.app.dir | mmbase2uml.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
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 :
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.
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:
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:
AndroMDA: http://www.andromda.org
Jakarta Ant: http://ant.apache.org
PoseidonUML: http://www.gentleware.com/products/index.php3
MagicDraw: http://www.magicdraw.com
Together Control Center: http://www.togethersoft.com
UML1.4 specification: http://www.omg.org/docs/formal/01-09-67.pdf
MOF specification: http://www.omg.org/docs/formal/00-04-03.pdf
JMI Implementations: http://java.sun.com/products/jmi/implementations.html
JMI specification: http://java.sun.com/products/jmi/download.html