Defining a Java profile implementation

 

Creating a Java profile implementation

Profile implementations, which are specific packages dedicated to implementing a profile or metamodel, can be created in Java by clicking on the  icon from the “Behavior profiles” folder of a Java MDA component.

A Java profile implementation must be linked to a reference metamodel. The current version of the MDA Modeler tool provides the Objecteering metamodel, which supports version 2.0 of UML.

To create a new Java profile implementation, simply carry out the steps:

1.      In the explorer, select the “Behavior profiles” folder.

2.      Click on the  icon. The “Java profile implementation” window then appears.

3.      Name your Java profile implementation.

4.      Click on “OK” to confirm.

 

After confirmation of the information entered, the following elements are created:

·         a package stereotyped “java_profile_implementation” with the name entered in the “Name” field of the “Java profile implementation” dialog box

·         a dependency stereotyped “referencedMetamodel, linking the Java profile implementation and the Objecteering metamodel

·         a dependency linking the profile and the “ObjecteeringTypes” package, so as to have access to the types necessary to the definition of parameters

·         a static diagram named “Overview of Xxxx” linked to the Java profile implementation

 

 

The “Java profile implementation” dialog box

 

Figure 102. The “Java profile implementation” dialog box

 

Key:

·         Name”: This field is used to enter the name of the Java profile implementation you are about to create.

 

Implementing a profile

By default, a newly created Java profile implementation only implements the metamodel it references. To implement a specific profile, a dependency stereotyped “realize” must be created between the Java profile implementation and the profile.

 

Steps:

1.      Select the Java profile implementation in the explorer.

2.      Click on the  icon. The “Profile realization” dialog box then appears.

3.      In the “Profile realization dialog box, select a profile. Confirm creation of this new realization link by clicking on “OK. You can double-click directly on the profile without clicking on the button OK.

 

Updating diagrams

If the “Create/update MDA diagrams automatically” MDAC option is activated and if you use the MDA icons to create MDA element, all diagrams concerning the MDA component are automatically created or updated.

 

Otherwise, the  button allows you to force the creation or update of the MDA diagrams.