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 ?
BaiChuan Nie Messages: 3 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.
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