Passing a profile instance to a QVTo transform [message #893521] |
Wed, 04 July 2012 12:43 |
Matteo M. Messages: 40 Registered: May 2012 |
Member |
|
|
Dear all,
I created a SysML profile with Papyrus (model.profile), and I see the following piece of text when I open the corresponding uml file (model.profile.uml) with a text editor (note that, since I'm not allowed to use links, I changed http to hxxp):
...
<uml:Profile xmi:version="2.1" xmlns:xmi="hxxp://schema.omg.org/spec/XMI/2.1" xmlns:ecore="hxxp://www.eclipse.org/emf/2002/Ecore" xmlns:uml="hxxp://www.eclipse.org/uml2/3.0.0/UML" xmi:id="_ewBk4cXIEeGdMYY2bxmSkw" name="profile">
<eAnnotations xmi:id="_wdZwIMXJEeGdMYY2bxmSkw" source="hxxp://www.eclipse.org/uml2/2.0.0/UML">
<contents xmi:type="ecore:EPackage" xmi:id="_wdZwIcXJEeGdMYY2bxmSkw" name="profile" nsURI="hxxp:///schemas/profile/_wdWFwMXJEeGdMYY2bxmSkw/0" nsPrefix="profile">
<eAnnotations xmi:id="_wdfPsMXJEeGdMYY2bxmSkw" source="PapyrusVersion">
<details xmi:id="_wdfPscXJEeGdMYY2bxmSkw" key="Version" value="0.0.1"/>
<details xmi:id="_wdfPssXJEeGdMYY2bxmSkw" key="Comment" value=""/>
<details xmi:id="_wdfPs8XJEeGdMYY2bxmSkw" key="Copyright" value=""/>
<details xmi:id="_wdfPtMXJEeGdMYY2bxmSkw" key="Date" value="2012-07-04"/>
<details xmi:id="_wdfPtcXJEeGdMYY2bxmSkw" key="Author" value=""/>
</eAnnotations>
<eClassifiers xmi:type="ecore:EClass" xmi:id="_wdZwIsXJEeGdMYY2bxmSkw" name="myBlock">
<eAnnotations xmi:id="_wdZwI8XJEeGdMYY2bxmSkw" source="hxxp://www.eclipse.org/uml2/2.0.0/UML" references="_6aHtYMXIEeGdMYY2bxmSkw"/>
<eSuperTypes href="#_wdZwKMXJEeGdMYY2bxmSkw"/>
<eSuperTypes href="hxxp://www.eclipse.org/papyrus/0.7.0/SysML#//blocks/Block"/>
<eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_wddagMXJEeGdMYY2bxmSkw" name="property1" ordered="false" lowerBound="1" eType="_wddagsXJEeGdMYY2bxmSkw"/>
</eClassifiers>
...
</contents>
</eAnnotations>
...
I also applied the profile above to a "dummy" Papyrus model, statically. This is what I get when I open the corresponding uml file with a text editor:
...
<xmi:XMI xmi:version="2.1" xmlns:xmi="hxxp://schema.omg.org/spec/XMI/2.1" xmlns:xsi="hxxp://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="hxxp://www.eclipse.org/emf/2002/Ecore" xmlns:profile="hxxp:///schemas/profile/_wdWFwMXJEeGdMYY2bxmSkw/0" xmlns:uml="hxxp://www.eclipse.org/uml2/3.0.0/UML" xsi:schemaLocation="hxxp:///schemas/profile/_wdWFwMXJEeGdMYY2bxmSkw/0 ../myProfile/model.profile.uml#_wdZwIcXJEeGdMYY2bxmSkw">
...
<profileApplication xmi:id="_Izw9YMXSEeGdMYY2bxmSkw">
<eAnnotations xmi:id="_I0YBYMXSEeGdMYY2bxmSkw" source="hxxp://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="ecore:EPackage" href="../myProfile/model.profile.uml#_wdZwIcXJEeGdMYY2bxmSkw"/>
</eAnnotations>
<appliedProfile href="../myProfile/model.profile.uml#_ewBk4cXIEeGdMYY2bxmSkw"/>
</profileApplication>
...
What I'm trying to do is to pass a profile instance to a QVTo transform as an additional transformation parameter. The problem is that I can't understand how its corresponding modeltype should look like. My first attempt was
modeltype myProfile uses "hxxp:///schemas/profile/_wdWFwMXJEeGdMYY2bxmSkw/0"; // i.e. the nsURI in model.profile.uml
but Eclipse shows the following error: "Failed to resolve metamodel 'hxxp:///schemas/profile/_wdWFwMXJEeGdMYY2bxmSkw/0'"
I also tried several different combinations with the values extracted from the piece of texts above, without success.
I finally tried the procedure described here: hxxp://www.eclipse.org/forums/index.php/mv/msg/32162/104417/#msg_104417, which is very close to what I'm trying to achieve. Again, no success. I always get the "Failed to resolve metamodel" error message.
How am I supposed to pass an instance of a custom SysML (or UML) profile to a QVTo transform as an additional transformation parameter?
Thanks for your help,
--
Matteo
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03746 seconds