Mapping Function Generator

The last version of the mapping function generator tool is available through the MappingFunction.jar file of the folder MappingFunctionGenerator, in the StateMachine project of the execution contract workspace archive.

To launch the tool, simply execute this JAR file. The tool offers three features throug three tabs.

picture of the mapping function generator

Generate Code

This feature allows the generation of mapping functions. Clik on "Load MetaModel" for loading an Ecore meta-model. The list of elements of the meta-model will appear on the left. When selecting one element, a tree containing its attributes and references to other elements is available on the right part. Select the attribute and reference you want and click on:

Modify meta-model

This features allows the modification of a meta-model by adding on it the meta-elements for contract management.

Once the modification executed, there are two manual actions to realize:

  1. Edit the modified Ecore meta-model and for the main package, modify the NsURI property for having a standard reference such as platform:/resource/StateMachine/metaModels/StateMachineContract.ecore
  2. Starting from the modified Ecore meta-model, generate its "genmodel" version and then the "model code" for the meta-model.

Our tool is still under development, these actions will be automatized in next versions.

Merge Models

This feature allows the concatenation of two models (a source and a target one) into a third global one. Please note that all three models must conformed to the modified version of the meta-model and that the model code must have been generated for this meta-model.

Transforming a model conformed to a given meta-model into a meta-model conformed to its modified meta-model version is easy. One simply has to edit the model (the XMI file) and to modify, on the first line, the tag containing the "platform:/resource/..." value to reference the modified version of the Ecore file.