Creating Java MDA components
Creating a Java MDA component
Java MDA components are MDA Modeler deployment units, which can reference one or several profiles, profile implementations and/or patterns.
Java MDA components, which can only
be created from the root folder in the MDA framework, are created by clicking
on the
icon from the root folder in the
MDA framework.
Steps:
1. Select the root folder of the MDA framework.
2.
Click on the
icon. The “Java
MDA Component” window then
appears.
3. In the “Java MDA Component” window, enter the characteristics of the MDA component you are about to create and confirm.
The “Java MDA Component” dialog box

Figure 173. The "Java MDA Component" dialog box
Key:
· "Name": This field defines the name of the MDA component as seen by the end-user. Typically, this name is displayed in the GUI (for example, in context menus) and every time a description of the Java MDA component is necessary. The form of this name is free, and you can use white chars, for example. You can subsequently change this name without any consequences, as it is never used for technical reasons or features. It does not have to be unique for each MDA component, although from a practical standpoint it is always easier to use unique values for each different MDA component.
· “Version”: This field is used to indicate the version number of the MDA component. The complete MDA component version number is defined by the three consecutive fields. All three fields must be composed of numbers. The third and final field (which represents the release number) must be composed of two digits.
· "Identifier": This field defines the MDA component's internal identification name. This value should be unique for each MDA component, since the behavior and certain technical features of the MDA component rely it. For example, this name is used to name the main Java packages in the MDA Component UML model or certain classes in the MDA component implementation, or as a key to access peer MDA components in a project. Naming rules apply to this name, meaning that the value when in lowercase must be usable as a Java package name.
· "Company namespace": This field is optional and can be used to prefix the MDA component packages with the company namespace conventional prefix (for example, com.softeam.objecteering).
· "Workspace": This field is used to indicate a specific working directory for the MDA component. MDA Modeler will use this directory to store some internally managed files. Do not choose a directory whose contents are automatically reset or cleaned, such as a windows temporary directory, for example.
Structure of your new MDA component
When an MDA component is created, a certain number of operations are carried out automatically.
The following elements are automatically created:
· a package stereotyped “JavaMDAComponent”, whose name is the value entered in the "Name" field of the "MDA component" dialog box (see Figure 173)
· a static diagram named “Overview of MDAComponent”. This diagram presents the overview of the MDA component. An example is shown in Figure 174 below.

Figure 174. Example of the static diagram automatically created for a new MDA component
· a “ElementImport” link stereotyped “referencedMetamodel” between the new MDA component and the reference metamodel
· a set of folders, used to contain the elements modeled within an MDA component (as shown in Figure 175 below)

Figure 175. The set of MDA folders automatically created for an MDA component
Key:
· “Profiles”: This folder is used to store the profiles that you wish to model.
· “Behavior profiles”: This folder is used to store the profile implementations that you want to model.
· “Patterns”: This folder contains the patterns you have modeled. Please note that patterns are written in J and not Java. For more information on patterns, please see "Overview of patterns".
· “GUI extensions”: This folder is used to define the commands which users of the Java MDA component will be able to use.
· “Parameters”: This folder is used to structure and define values for the parameters defined in the different profiles of the Java MDA component.
· “Test project”: This folder is used to define the test project which will allow the models used to test the Java MDA component to be built.
· “First steps”: This folder is used to develop the model which will be packaged with the Java MDA component. This model can be used to facilitate the initial use of the Java MDA component in question.
· “Resources”: This folder contains the external resources which will be packaged with the Java MDA component.
Updating diagrams
If the “Create/update MDA diagrams automatically” MDAC option is activated and if you use the MDA icons to create MDA elements, all diagrams concerning the element in question are automatically created or updated.
Otherwise, the
button lets you force the creation or update
of the MDA diagrams.
Toolbar
The icons appearing in the “MDA” tab of the auxiliary window can be used to run the following commands:
|
Icon |
Description |
|
|
This icon is used to open this page. |
|
|
This icon is used to create/update diagrams, even if the “Create/update MDA diagrams automatically” option is desactivated. |
|
|
This icon is used to generate documentation of the MDA component. |
|
|
This icon is used to view the generated documentation. |
|
|
This icon is used to check that the MDA component has been correctly modeled. |
|
|
This icon is used to compile the MDA component. |
|
|
This icon is used to package the MDA component. |
Icons
The icons defined in the different profiles used by the Java MDA component are automatically copied into the workspace during the compilation phase.