|Using ETL transform models which are based on UML Profiles [message #593519]
||Wed, 08 September 2010 09:41
Registered: September 2010
has anybody experience by using ETL to transform models which are based on UML Profiles?
What do I want to do?
I have a model which is based on UML and several specific UML Profiles. I try to transform this model in another model which also based on UML and a UML Profile (in this case the UML Testing Profile (UTP)). I have built me Ecore meta models for both models which should contain all necessary information.
But at the moment I only able to transform things like packages, ...
Has anybody done something like this before? Or does anybody have some experience by transforming a UML model into a UTP model?
|Re: Using ETL transform models which are based on UML Profiles [message #857669 is a reply to message #593538]
||Thu, 26 April 2012 15:05
|| Horacio Hoyos
Registered: October 2009
I have worked with transformations from SysML (an UML profile) models to other models. I have worked with TopCased and Papyrus SysML models. In both cases, I had access to the SysML metamodel provided by the tools. Having the metamodel any m2m or m2t transformation can be easily implemented.
In the case of Papyrus, when you apply your own profile to a UML/SysML model, two things happen. 1. A profileApplication attribute is added to your model, as in:
<eAnnotations xmi:id="_OL7wwGbvEeGL2_MC6R8Gvg" source="http://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="ecore:EPackage" href="../../co.edu.uniandes.hiles.sysml/src/co/edu/uniandes/hiles/sysml/model/HiLeS.profile.uml#_6MuSEGxZEeGiq_VG-MNlIg"/>
2. When you apply a stereotype to an element in your model a new element is added to it. The elements's type is of the applied stereotype and, in Papyrus, this element has a reference to the element to which te stereotype was applied:
<packagedElement xmi:type="uml:Class" xmi:id="_MAmskAp0EeGpeNcMa-nVxQ" name="Level Calculator">
<MyProfile:FunctionalBlock xmi:id="_bxb-AG1OEeGIv-9deNiXoQ" base_Class="_MAmskAp0EeGpeNcMa-nVxQ"/>
in the example above I applied the FunctionalBock stereotype to the LevelCalculator class. You can see that the FunctionalBlock element has a base_Class attribute that points to the LevelCalculator class.
The papyrus metamodel can be found in the org.eclipse.papyrus.sysml plugin. You can import this plugin to your workspace to have access to it or access the Papyrus repository.
For different type of editors you would need to know/have the metamodel used to describe the models generated by the editor.
As a final word, for example in Papyrus a "Model Explorer" view is provided to see a tree representation of the model we are defining in the editors. When coding your transformations use ths view as a guide because it is that, a view. The correct relations and relation names come from the metamodel.
Horacio Hoyos Rodriguez
University Of York
Powered by FUDForum
. Page generated in 0.01579 seconds