Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [QVTo] runtime operation resolution ([QVTo] runtime polymorphism while invoking operations)
[QVTo] runtime operation resolution [message #487295] Tue, 22 September 2009 17:04 Go to next message
Dhiraj  is currently offline Dhiraj Friend
Messages: 18
Registered: July 2009
Junior Member
I have started using QVTo in our application and I wasn't able
to understand if QVTo supported runtime polymorphism for
operations, the way Java does.
Basically I have inheritance in my model and I want to define
a mappning operation on the base type and also the subtype.
I want that at the time of executing the transformation, QVTo
should decide the correct operation to execute depending
on the type of the model object.
Also is it possible that I contribute the mapping operation
of the sub-type in another transformation, that is contributed
through the QVTo transformation extension point, and QVTo
will still be able to resolve this?
Re: [QVTo] runtime operation resolution [message #487323 is a reply to message #487295] Tue, 22 September 2009 18:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dvorak.radek.gmail.com

Hi dhiraj,

See comments in-lined bellow.

Regards,
/Radek


On Tue, 22 Sep 2009 19:04:24 +0200, Dhiraj <dhiraj@gmail.com> wrote:
> I have started using QVTo in our application and I wasn't able
> to understand if QVTo supported runtime polymorphism for
> operations, the way Java does.
> Basically I have inheritance in my model and I want to define
> a mappning operation on the base type and also the subtype.
> I want that at the time of executing the transformation, QVTo should
> decide the correct operation to execute depending
> on the type of the model object.


Yes, QVTO supports this. The OMG specification refers to this as virtual
invocation
semantics. See section '8.2.1.15 MappingOperation' for details,
specifically
the paragraph 'Executing a mapping operation'.


> Also is it possible that I contribute the mapping operation
> of the sub-type in another transformation, that is contributed
> through the QVTo transformation extension point, and QVTo will still be
> able to resolve this?

Yes, you can do it with QVTO, if you extend the transformation where you
want
to contribute a mapping for a specific type.
See OMG specification, section '8.2.1.1 OperationalTransformation', there
are examples
about extending imported transformation at the end of the section.
Beware of signature compatibility of the extending and extended
transformations.

Note, it generally works for any imported transformation (the extension
point just publishes
a qvto compilation unit (file) under a known qualified name, which can be
imported).
Re: [QVTo] runtime operation resolution [message #487449 is a reply to message #487323] Wed, 23 September 2009 10:02 Go to previous messageGo to next message
Dhiraj  is currently offline Dhiraj Friend
Messages: 18
Registered: July 2009
Junior Member
Hi Radek,

Thanks for the detailed information.
But is this available in QVTO 1.0? I tried writing a transformation which extends another transformation, and the QVTO editor shows a warning saying 'Transformation model usages not supported'.
Does this mean that the QVTO 1.0 runtime does not support this facility?
Re: [QVTo] runtime operation resolution [message #487457 is a reply to message #487449] Wed, 23 September 2009 10:28 Go to previous message
Eclipse UserFriend
Originally posted by: dvorak.radek.gmail.com

Hi dhiraj,

- virtual invocation is supported since 1.0.0
- extending transformation is supported since 2.0.0

I recommend to switch to the latest 2.0.0 release as we have made a
significant
step forward.

Regards,
/Radek


On Wed, 23 Sep 2009 12:02:19 +0200, Dhiraj <dhiraj@gmail.com> wrote:

> Hi Radek,
>
> Thanks for the detailed information. But is this available in QVTO 1.0?
> I tried writing a transformation which extends another transformation,
> and the QVTO editor shows a warning saying 'Transformation model usages
> not supported'.
> Does this mean that the QVTO 1.0 runtime does not support this facility?
Previous Topic:[Announce] A Proposal and Prototype for an Eclipse Model Registry
Next Topic:[QVTO] Passing calling context to BlockBox methods
Goto Forum:
  


Current Time: Tue Apr 23 09:51:07 GMT 2024

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

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

Back to the top