Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » QVT-OML » metamodel declaration & UML profile
metamodel declaration & UML profile [message #1116955] Wed, 25 September 2013 21:25 Go to next message
Naif Mokhayesh is currently offline Naif Mokhayesh
Messages: 28
Registered: November 2011
Junior Member
Hi,

I need to do model transformation from UML activity digram to Petri net, but I extend UML activity digram by creating new UML profile to be used as meta-model for the source model. For the target model (Petri Net) I create ecore model. My question as follow:

Is it possible to use UML profile in metamodel declaration (modeltype <name> uses <uri>) or I have to convert UML profile to ecore model ?

In case we can use UML profile without converting to ecore what would be the URI ? note that I create the profile in MagicDraw !

If it is required to convert UML profile to ecore model? how to do that ? is their any specialized tool or it can be done in EMF? and how ?

please advice

thanks for your help in advance Smile
Re: metamodel declaration & UML profile [message #1118307 is a reply to message #1116955] Fri, 27 September 2013 05:17 Go to previous messageGo to next message
BaiChuan Nie is currently offline BaiChuan Nie
Messages: 5
Registered: September 2013
Junior Member
Quote:
Is it possible to use UML profile in metamodel declaration (modeltype <name> uses <uri>) or I have to convert UML profile to ecore model ?


I saw one person declare profile as metamodel in thie forum, I followed it, but failed.

In my sample,the source model is a UML model with profile,and the destined model is also a UML model with other profiles.And the source model is modoled with Magicdraw.

In QVT0,for the source model with profile,You needn't do anything for profile.
In QVTo A element applied by stereotype isn't recogonized as instance of a new metaclass,but as a instance of primitive element applied by your stereotype.

you can get the element like the following code:

Element.allInstance().select(el|el.getAppliedStereotypes()->exists(name='xxx'))
Re: metamodel declaration & UML profile [message #1118783 is a reply to message #1118307] Fri, 27 September 2013 15:40 Go to previous messageGo to next message
Naif Mokhayesh is currently offline Naif Mokhayesh
Messages: 28
Registered: November 2011
Junior Member
Hi,

According to your description I'm wondering what was the URI of the metamodel decrelation (modeltype ... uses ... URI; ) in your case?

since you says this -> "In QVTo A element applied by stereotype isn't recogonized as instance of a new metaclass"
I think QVTO should have the metamodel of the source model in order to recognize model element.

Anyway, in my opinion we have to generate the ecore file from the UML profile from EMF generator model and then use it in metamodel decrelation (modeltype ... uses ... URI; ) ?

I'm working now on a little experiment example on a transformation that use profiles as metamodel for the source and target models.

I will keep you updated

Anyone had this experience before? please your support and hint Smile

thanks
Re: metamodel declaration & UML profile [message #1136965 is a reply to message #1118783] Mon, 14 October 2013 03:14 Go to previous message
BaiChuan Nie is currently offline BaiChuan Nie
Messages: 5
Registered: September 2013
Junior Member
the URI is "http://www.eclipse.org/uml2/2.0.0/UML"
Previous Topic:Creating objects in secondary extents
Next Topic:one input model and variable number of output models
Goto Forum:
  


Current Time: Fri Apr 18 01:49:55 EDT 2014

Powered by FUDForum. Page generated in 0.01552 seconds