Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [QVTO] inter-model references
[QVTO] inter-model references [message #100087] Tue, 17 February 2009 11:19 Go to next message
Matt Fomr is currently offline Matt FomrFriend
Messages: 8
Registered: July 2009
Junior Member
Hi

Does qvto support inter-model references?
I saw atl does with advanced option set, but theres no such option for
qvto.

I need to add elementImport do my out uml model, this import need to
contain importedElement whitch in xmi looks like this:

<elementImport xmi:id="_TaIowPIZEd2zKrm3YU0q7A">
<importedElement xmi:type="uml:PrimitiveType"
href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolea n"/>
</elementImport>

This sample:

mapping Package::pckg2pckg() : Package
{
elementImport+=object ElementImport
{
importedElement:=someProfile.rootObjects()![Package].allInst ances(DataType).oclAsType(DataType)- >any(true);
};
...
}

results in output:
<xmi.....
<elementImport xmi:id="_yayTwfyVEd2dR5YFKN-vGw"
importedElement="_yayTyvyVEd2dR5YFKN-vGw"/>
..........
<uml:DataType xmi:id="_yayTyvyVEd2dR5YFKN-vGw"/>
</xmi:XMI>

so importedElement gets copied to ouput model (without name).

How can i reference importedElement by href (inter-model reference)?

Thanks for any help.
Matt
Re: [QVTO] inter-model references [message #100101 is a reply to message #100087] Tue, 17 February 2009 11:48 Go to previous messageGo to next message
Matt Fomr is currently offline Matt FomrFriend
Messages: 8
Registered: July 2009
Junior Member
Nevermind,

it works, I've had a bug in code, looks like inter-model references are
supported.

Sorry for bugging :)
Re: [QVTO] inter-model references [message #100320 is a reply to message #100101] Thu, 19 February 2009 11:13 Go to previous message
Radomil Dvorak is currently offline Radomil DvorakFriend
Messages: 249
Registered: July 2009
Senior Member
Hi Matt,

Inter-model references work automatically in standard QVT as long as they
are
references from your in/inout models.

In other cases, when you need let's say an access to a model at a
well-known uri,
like the library of UML primitive types, you would have to add it as an
extra input to your transformation.
One may argue that it's not a real input to your transf and is constant in
time,
but at the moment there is no standard way of resolving this.

Sure, it could be realized by using a blackbox operation written in Java
(bringing some other issues),
or we could think about more straightforward support and add an optional
extension into QVT Stdlib.

Regards,
/Radek


On Tue, 17 Feb 2009 12:48:50 +0100, Matt Fomr <matt.fomr@gmail.com> wrote:

> Nevermind, it works, I've had a bug in code, looks like inter-model
> references are supported.
>
> Sorry for bugging :)
>
>
Previous Topic:[QVTO] Getting Started.
Next Topic:Transformation from IRL to PRR
Goto Forum:
  


Current Time: Sun Jun 30 12:46:00 GMT 2024

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

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

Back to the top