[QVTO] inter-model references [message #100087] |
Tue, 17 February 2009 06:19  |
Eclipse User |
|
|
|
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 #100320 is a reply to message #100101] |
Thu, 19 February 2009 06:13  |
Eclipse User |
|
|
|
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 :)
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04236 seconds