Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » QVT-OML » Passing a profile instance to a QVTo transform(I'm trying to pass a SysML profile instance to a QVTo transform as an additional transformation parameter, but I always get "Failed to resolve metamodel")
Passing a profile instance to a QVTo transform [message #893521] Wed, 04 July 2012 12:43 Go to next message
Matteo M. is currently offline Matteo M.Friend
Messages: 28
Registered: May 2012
Junior 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
Re: Passing a profile instance to a QVTo transform [message #988196 is a reply to message #893521] Wed, 28 November 2012 18:39 Go to previous messageGo to next message
Claudio Persico is currently offline Claudio PersicoFriend
Messages: 24
Registered: November 2012
Junior Member
Did you finally get on it?
Re: Passing a profile instance to a QVTo transform [message #988199 is a reply to message #893521] Wed, 28 November 2012 18:40 Go to previous messageGo to next message
Claudio Persico is currently offline Claudio PersicoFriend
Messages: 24
Registered: November 2012
Junior Member
Did you finally get on it?
Re: Passing a profile instance to a QVTo transform [message #988322 is a reply to message #893521] Thu, 29 November 2012 12:00 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 4188
Registered: July 2009
Senior Member
Hi

A profile is just a UML model with a particular purpose and so a
different mix of typical content, but it's still just a UML model.

So I would expect to treat a profile instance in the same way as any
other UML model instance. pass them as input models not parameters.

Regards

Ed Willink

On 04/07/2012 13:43, Matteo M. wrote:
>
> 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
Previous Topic:Higher-order model transformations with QVTo
Next Topic:Debugging: model definition for transformation vs. input
Goto Forum:
  


Current Time: Sat Dec 20 13:08:34 GMT 2014

Powered by FUDForum. Page generated in 0.01541 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software