Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [TCS] two-step reference
[TCS] two-step reference [message #487018] Mon, 21 September 2009 13:56
Eclipse UserFriend
Originally posted by: ivanomalavolta.gmail.com

Hello everybody, I m having problems to get elements reltaed by a
two-stpe reference.

This is an examplary metamodel in km3:

package pack {
class A {
attribute name : String;
reference r1[*] container : B oppositeOf r2;
}
class B {
reference r2[1-1] : A oppositeOf r1;
reference r3[*] container : C oppositeOf r4;
}
class C {
reference r4[1-1] : B oppositeOf r3;
}
}

----
in TCS I want to refer the name attribute of A while matching
instances of the C metaclass, like this:

template A
: ...
;

template B
: ...
;

template C
: r4.r2{refersTo = name, autoCreate = never}
;

I know that this is not syntactically correct, but my question is:
is it possible to do something like that??

An alternative could be to access the "owner" of an element, like for
example using something like refImmediateComposite() in ATL... is there
something similar in TCS?

Best regards,
Ivano
Previous Topic:[QVTO] Accessing Ecore Feature Maps
Next Topic:[QVTO] Black Box questions
Goto Forum:
  


Current Time: Thu Jan 23 21:47:44 GMT 2025

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

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

Back to the top