Skip to main content



      Home
Home » Archived » M2M (model-to-model transformation) » [ATL] How can I navigate to find a container or parent of a object?
[ATL] How can I navigate to find a container or parent of a object? [message #91558] Tue, 07 October 2008 14:49 Go to next message
Eclipse UserFriend
Originally posted by: guo.mci.sdu.dk

I have two metamodels building in Ecore, and am doing the transformation
using ATL.

How can I navigate to find a container or parent of a object?
For example, in the source metamodel, I have a object called
"Container", it has a sub object called "Child". The relation between
them is aggregation called "getChild", but from the "Child" there has NO
way to get the "Container".

There is another object "ExternalClass", which is associated to the
"Child" object by relation "link".

The question is: How can I get the "Container" from the "ExternalClass"?

By using "ExternalClass.link", I could get the object "Child". How to
get the "Container" next?

Best Regards,
Yu Guo
Re: [ATL] How can I navigate to find a container or parent of a object? [message #91574 is a reply to message #91558] Tue, 07 October 2008 18:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: freddy.allilaire.univ-nantes.fr

This is a multi-part message in MIME format.
--------------070402000209010606070401
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi Yu Guo,

If there is no reference "child to parent" in your metamodel, you could
use refImmediateComposite() operation. refImmediateComposite() is a
reflective operation that returns the immediate composite (e.g. the
immediate container).

You will find an example here:
http://www.eclipse.org/m2m/atl/basicExamples_Patterns/articl e.php?file=Port/index.html
in the last section.

HTH

Regards,
Freddy.

Yu Guo a
Re: [ATL] How can I navigate to find a container or parent of a object? [message #91930 is a reply to message #91574] Thu, 09 October 2008 15:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jbocanegra.uniamazonia.edu.co

Hi Freddy.

Is there some opcion like refImmediateComposite() for QVTO???

Jos
Re: [QVTO] How can I navigate to find a container or parent of a object? [message #92007 is a reply to message #91930] Fri, 10 October 2008 07:08 Go to previous messageGo to next message
Eclipse UserFriend
This is a multi-part message in MIME format.
--------------020901040301010809090904
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi Jos
Re: [ATL] How can I navigate to find a container or parent of a object? [message #92121 is a reply to message #91930] Sun, 12 October 2008 14:15 Go to previous message
Eclipse UserFriend
Hi Jos
Previous Topic:[QVTO][ATL] expert in models transformation Job
Next Topic:[ATL] Turning off warnings in the ATL console
Goto Forum:
  


Current Time: Sat May 10 01:46:56 EDT 2025

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

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

Back to the top