Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [QVTO] Accessing Ecore Feature Maps
[QVTO] Accessing Ecore Feature Maps [message #486208] Wed, 16 September 2009 14:31 Go to next message
Alex Mising name is currently offline Alex Mising name
Messages: 50
Registered: August 2009
Member
Is there a built-in way to access Ecore Feature Maps from QVT? (Short of providing black-box forwarding to something like FeatureMap.Entry.getValue) If not, should there be one? Feature Maps are quite common in Ecore models imported from XSD ...

Alex
Re: [QVTO] Accessing Ecore Feature Maps [message #486218 is a reply to message #486208] Wed, 16 September 2009 15:03 Go to previous messageGo to next message
Eclipse User
Originally posted by: dvorak.radek.gmail.com

Hi Alex,

No built-in way for that and following the QVT OMG spec, there can hardly
be one.
What we could do is to provide some 'out of the box' black-box ;-) support
for this and
potentially couple of other cases which are QVT non-standard but fairly
practical.
Some sort of EcoreUtil library.

Regards,
/Radek


On Wed, 16 Sep 2009 20:31:38 +0200, Alex <alex.leites@gmail.com> wrote:

> Is there a built-in way to access Ecore Feature Maps from QVT? (Short of
> providing black-box forwarding to something like
> FeatureMap.Entry.getValue) If not, should there be one? Feature Maps are
> quite common in Ecore models imported from XSD ...
>
> Alex
Re: [QVTO] Accessing Ecore Feature Maps [message #486912 is a reply to message #486218] Sun, 20 September 2009 18:25 Go to previous messageGo to next message
Derek Palma is currently offline Derek Palma
Messages: 141
Registered: July 2009
Senior Member
I asked a similar question recently about OCL in the OCL newsgroup and got a
similar reply, but specific to OCL. At that point I thought I was the only
one caring about accessing FeatureMaps even though they seem to be used
pervastively in Ecore.
( http://www.eclipse.org/forums/index.php?t=msg&th=152170& amp;start=0&S=c9fa82fd5def1e0d5ff2dc8504c24f33)
so I decided to just use java to read FeatureMaps once I navigate to them or
EMFXPath which does understand FeatureMaps.

In my case I need to actually be able to update the FeatureMap. I admit I
backed off of using OCL for this due to this reason and also assumed QVT
would not have this support for a similar reason. I am just curious if
getting write access to featureMaps is much more work. I guess it is just a
custom function implemented in a java method which takes the right params
and does the right thing to the featuremap, right? Maybe this is not so
hard?

Because OCL and QVT languages were not designed to handle all Ecore's
constructs it is not surprising the default implementations don't have this.
However, it seems all Ecore constructs should be supported somehow to enable
full manipulation of Ecore models. I wonder if there are any other Ecore
constructs which can't be dealt with either. Maybe I should post this
question back on the OCL list.

Derek

"radek dvorak" <dvorak.radek@gmail.com> wrote in message
news:op.u0c5vitx12y5f2@kliste.local...
> Hi Alex,
>
> No built-in way for that and following the QVT OMG spec, there can hardly
> be one.
> What we could do is to provide some 'out of the box' black-box ;-) support
> for this and
> potentially couple of other cases which are QVT non-standard but fairly
> practical.
> Some sort of EcoreUtil library.
>
> Regards,
> /Radek
>
>
> On Wed, 16 Sep 2009 20:31:38 +0200, Alex <alex.leites@gmail.com> wrote:
>
>> Is there a built-in way to access Ecore Feature Maps from QVT? (Short of
>> providing black-box forwarding to something like
>> FeatureMap.Entry.getValue) If not, should there be one? Feature Maps are
>> quite common in Ecore models imported from XSD ...
>>
>> Alex
Re: [QVTO] Accessing Ecore Feature Maps [message #486979 is a reply to message #486912] Mon, 21 September 2009 07:19 Go to previous message
Eclipse User
Originally posted by: dvorak.radek.gmail.com

Hi Derek,

I think it would be reasonable if such a functionality arrives in OCL,
as it's useful for working with Ecore models in general and would
be great if all OCL extenders get a unified solution.
Another aspect is how fast can MDT OCL be in providing of this feature,
if the team agrees.

Technically, QVTO can enable write access to FeatureMaps, it's just
sort of non standard practice. The OMG spec states that only mapping
operation should
create and modify model objects.
Also, if an EObject get's modified from blackbox, the QVT Engine
loses the chance for interception.
All I wanted to say is that it would just put more responsibility on the
user ;-).

Perhaps, it would be a good idea if QVTO comes up with a blackbox
example of 'ecore.util' library useful in both understanding black-boxing
and
accessing Ecore models in ecore specific fashion.

Regards,
/Radek



On Mon, 21 Sep 2009 00:25:56 +0200, Derek Palma <derek.palma@gmail.com>
wrote:

> I asked a similar question recently about OCL in the OCL newsgroup and
> got a similar reply, but specific to OCL. At that point I thought I was
> the only one caring about accessing FeatureMaps even though they seem to
> be used pervastively in Ecore.
> ( http://www.eclipse.org/forums/index.php?t=msg&th=152170& amp;start=0&S=c9fa82fd5def1e0d5ff2dc8504c24f33)
> so I decided to just use java to read FeatureMaps once I navigate to
> them or EMFXPath which does understand FeatureMaps.
>
> In my case I need to actually be able to update the FeatureMap. I admit
> I backed off of using OCL for this due to this reason and also assumed
> QVT would not have this support for a similar reason. I am just curious
> if getting write access to featureMaps is much more work. I guess it is
> just a custom function implemented in a java method which takes the
> right params and does the right thing to the featuremap, right? Maybe
> this is not so hard?
>
> Because OCL and QVT languages were not designed to handle all Ecore's
> constructs it is not surprising the default implementations don't have
> this. However, it seems all Ecore constructs should be supported somehow
> to enable full manipulation of Ecore models. I wonder if there are any
> other Ecore constructs which can't be dealt with either. Maybe I should
> post this question back on the OCL list.
>
> Derek
>
> "radek dvorak" <dvorak.radek@gmail.com> wrote in message
> news:op.u0c5vitx12y5f2@kliste.local...
>> Hi Alex,
>>
>> No built-in way for that and following the QVT OMG spec, there can
>> hardly be one.
>> What we could do is to provide some 'out of the box' black-box ;-)
>> support for this and
>> potentially couple of other cases which are QVT non-standard but fairly
>> practical.
>> Some sort of EcoreUtil library.
>>
>> Regards,
>> /Radek
>>
>>
>> On Wed, 16 Sep 2009 20:31:38 +0200, Alex <alex.leites@gmail.com> wrote:
>>
>>> Is there a built-in way to access Ecore Feature Maps from QVT? (Short
>>> of providing black-box forwarding to something like
>>> FeatureMap.Entry.getValue) If not, should there be one? Feature Maps
>>> are quite common in Ecore models imported from XSD ...
>>>
>>> Alex
>
Previous Topic:[QVTO] OCL and QVTO
Next Topic:[TCS] two-step reference
Goto Forum:
  


Current Time: Thu Aug 28 01:37:36 EDT 2014

Powered by FUDForum. Page generated in 0.02176 seconds