Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [QVTo] Reuse Strategies (inherits, merges, disjuncts)(What are some of the reuse strategies people are using?)
[QVTo] Reuse Strategies (inherits, merges, disjuncts) [message #696689] Thu, 14 July 2011 15:27 Go to next message
Mark Sluser is currently offline Mark SluserFriend
Messages: 15
Registered: June 2011
Location: Calgary
Junior Member
I have a model where

Class A
Class B inherits from A
Class C inherits from A

Class D inherits from B and C
Class E inherits from C



I am trying to create a corresponding QVTO mapping hierarchy, but the basic requirement is that the signatures must match if a mapping inherits from another. I believe this to be on all reuse strategies (inherits, merges and disjuncts). There is one variance, in that the parameter types in the mapping signatures can be Kindof relationships, that is an super(inherited from)-mapping can have parameter types that are the supertypes of the the sub(inheriting)-mapping parameter types.

This works well for me except at this point I it seems that some of my inheriting mappings need more parameters to do a proper mapping. So my inheritance reuse is now broken.

I thought of a couple of ways of getting around this including:

1. expand the signature of the inherited mapping to match the inheriting mappings, even though some of the parameters won't be used.

2. reduce the signature of the inheriting mapping to match the inherited mapping, and find another way to get the parameter information, such as query or resolve.

3. not inherit.


Any thoughts?

-Mark


Re: [QVTo] Reuse Strategies (inherits, merges, disjuncts) [message #696711 is a reply to message #696689] Thu, 14 July 2011 16:11 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

1) sounds good to me. Perhaps you could put the 'extra' parameters in a
Dict.

Regards

Ed Willink

On 14/07/2011 16:27, Mark Sluser wrote:
> I have a model where
>
> Class A
> Class B inherits from A
> Class C inherits from A
>
> Class D inherits from B and C
> Class E inherits from C
>
>
>
> I am trying to create a corresponding QVTO mapping hierarchy, but the
> basic requirement is that the signatures must match if a mapping
> inherits from another. I believe this to be on all reuse strategies
> (inherits, merges and disjuncts). There is one variance, in that the
> parameter types in the mapping signatures can be Kindof relationships,
> that is an super(inherited from)-mapping can have parameter types that
> are the supertypes of the the sub(inheriting)-mapping parameter types.
>
> This works well for me except at this point I it seems that some of my
> inheriting mappings need more parameters to do a proper mapping. So my
> inheritance reuse is now broken.
>
> I thought of a couple of ways of getting around this including:
>
> 1. expand the signature of the inherited mapping to match the
> inheriting mappings, even though some of the parameters won't be used.
>
> 2. reduce the signature of the inheriting mapping to match the
> inherited mapping, and find another way to get the parameter
> information, such as query or resolve.
>
> 3. not inherit.
>
>
> Any thoughts?
>
> -Mark
>
>
>
Previous Topic:Use Instance Type of EDataType
Next Topic:[QVTo] Using model elements having as name a QVTo keyword
Goto Forum:
  


Current Time: Sat Apr 20 06:19:16 GMT 2024

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

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

Back to the top