Chapter 5. Transformations of KerMeta meta models

Several transformations are available. This will allow you to choose the representation of your meta model from one format to another. For example, if you prefer coding, then you will probably prefer the kmt format (KerMeta text). Otherwise you will design with the reflexive editor and the km files (serialized files).

So transformations give you the ability to adapt the meta model to your preferred point of view : coding view or graphical view.

List of formats related to metamodels

*.ecore

This is the format from EMF metamodel: it contains only the structural part of the metamodel. It is used as a reference for the serialisation of models. Other information may be stored as EAnnotations (but in this case they are specific to a tool.

*.kmt

This is the textual form of kermeta metamodels.

*.km

This is the model form (ie. XMI) of kermeta metamodels. Ie.

*.ecorediag

This is the class diagram information on top of a ecore model. (ie. position , shape, ... information in the diagram)

*.kmdi

This is the class diagram information on top of a km model. (ie. position , shape, ... information in the diagram)

*.uml

For uml models. There are some ways to transform part of it into ecore or kermeta (class diagram part and stereotype definiton part)

*.ocl

For OCL constraints in a textual format. OCL invariants can be transformed into Kermeta invariants.

Yopu can usually relate/transform these formats using a right click on the input file. More information about the options provided by these transformation is provided in the UserInteface guide. http://www.kermeta.org/documents/ui_user_guide/

List of available transformations (not exhaustive)

ecore to km

Transform an ecore model into a km model.

ecore to kmt

Transform an ecore model into a kmt text file.

km to ecore

Transform a km model into an ecore model. Kermeta specific information are stored into EAnnotations (see Kermeta reference manual). Roundtrip is supported

kmt to ecore

Transform a kmt text file into an ecore model. Kermeta specific information are stored into EAnnotations (see Kermeta reference manual). Roundtrip is supported

uml class to ecore

Transform the uml classes into ecore classes.

uml profile to ecore

Transform the profile definitions into ecore classes to be used for loading uml model using such stereotypes.

ocl to kermeta

Transform the ocl invariants into kermeta invariants.