Build date: 3-November-2010
$Date: 2009-02-05 16:22:33 $
Abstract
This document presents the Ecore Model Development Kit (MDK) for Kermeta.
Table of Contents
In this document we will focus on the Ecore MDK. This MDK applies to Ecore metamodel.
Important | |
---|---|
Kermeta and its MDKs are evolving softwares and despite that we put a lot of attention to this document, it may contain errors (more likely in the code samples). If you find any error or have some information that improves this document, please send it to us using the bug tracker in the forge: http://gforge.inria.fr/tracker/?group_id=32 or using the developer mailing list (kermeta-developers@lists.gforge.inria.fr) Last check: v1.2.1 |
Tip | |
---|---|
The most update version of this document is available on line from http://www.kermeta.org . |
The Model Development Kit for Kermeta contains various kind of codes that work with Ecore models: some helper classes and some transformations.
Tip | |
---|---|
To use them you simply have to add the corresponding require statement to your kermeta code. Then, the outline and the KermetaDoc views should help you to use its content. |
Ecore MDK available files
Currently, the MDK provides the following files :
require "http://www.eclipse.org/emf/2002/Ecore"
require "platform:/plugin/fr.irisa.triskell.kermeta.ecore/src/kermeta/ecore_behavior.kmt"
require "platform:/plugin/fr.irisa.triskell.kermeta.ecore/src/kermeta/helpers/EcoreHelper.kmt"
require "platform:/plugin/fr.irisa.triskell.kermeta.ecore/src/kermeta/helpers/EPackageHelper.kmt"
require "platform:/plugin/fr.irisa.triskell.kermeta.ecore/src/kermeta/transformations/Patterns4Ecore.kmt"
require "platform:/plugin/fr.irisa.triskell.kermeta.ecore/src/kermeta/transformations/ContainmentBasedActionPerformerGenerator.kmt"
require "platform:/plugin/fr.irisa.triskell.kermeta.ecore/src/kermeta/transformations/CleanEcoreKMAnnotations.kmt"
require "platform:/plugin/fr.irisa.triskell.kermeta.ecore/src/kermeta/ecore2dot/ecore2dot.kmt"
require "platform:/plugin/fr.irisa.triskell.kermeta.ecore/src/kermeta/persistence/EcoreResource.kmt"
Kermeta Ecore MDK main part consist of the implementation of Ecore behavior in kermeta. Almost all operations and derived properties are available.
To use it, you simply have to add this require statement to your kermeta code :
require "platform:/plugin/fr.irisa.triskell.kermeta.ecore/src/kermeta/ecore_behavior.kmt"
Note | |
---|---|
In the current implementation of the derived properties with a multiplicity greater than 1, you'll get a new collection with the desired content. However, even if you can modify the elements themselves, these collections aren't the real container of the elements, if you modify it (adding or removing elements) the real attributes (from which the derived properties are calculated) won't be changed. |
This chapter presents the Metamodel and some considerations about how to use it.
Important | |
---|---|
Ecore metamodel use a lot of calculated properties. (In red in our figures) If you need to use them,
make sure to require their kermeta implementation (require |