[QVTo] Reuse Strategies (inherits, merges, disjuncts) [message #696689] |
Thu, 14 July 2011 15:27 |
|
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 |
Ed Willink 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
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03266 seconds