Skip to main content



      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 11:27 Go to next message
Eclipse UserFriend
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 12:11 Go to previous message
Eclipse UserFriend
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: Tue Jul 22 18:47:31 EDT 2025

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

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

Back to the top