Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Link transformed objects with existing objects
[ATL] Link transformed objects with existing objects [message #107231] Thu, 25 June 2009 16:34 Go to next message
Olivier BERNARD is currently offline Olivier BERNARDFriend
Messages: 12
Registered: July 2009
Junior Member
Hi,

I have the following problem:

Considering source model M1 and target model M2, I need to apply
transformation on M1 objects to get M2 objects and set references of these
newly created M2 objects to existing M2 objects.

How can I do this ? Is there a way to load M2 existing objects prior to
apply transformation (is this the role of "add target model" in the ATL
run configuration ?).

I would expect to get an output file with
- M2 newly created objects from M1 transformation
- M2 existing objects

reference of M2 newly created objects set to existing M2 objects.

I was thinking of using "refining" mode but I would need to say
- refine for M2 (to import existing objects)
- from for M1 (to create new objects)

I don't think this works ...

Thanks !

-- Olivier
Re: [ATL] Link transformed objects with existing objects [message #107941 is a reply to message #107231] Mon, 06 July 2009 15:37 Go to previous messageGo to next message
Helko Glathe is currently offline Helko GlatheFriend
Messages: 55
Registered: July 2009
Member
Hi Olivier,

I also have the same problem...

Have you any news on this or found a solution?

I think both your M1 and M2 models are source models with the additional
corresponding source meta models MM1 for M1 and MM2 for M2. But the target
model (M2') is completely new and have the same corresponding meta model
as M2 ... MM2.

Then M2 will be refined into M2'. Refined in a way that:
- copies all M2 (without references to M1->M2' elements considered at next
step) elements to M2' elements
- Transform all M1 elements into completely new M2' elements
- copies all M2 elements with references to M1->M2' elements to M2'
elements and establish the corresponding references

But I have no idea, if such a scenario is possible with ATL refining mode?
Perhaps someone else can set us on the right track?

Regards, Helko

Olivier BERNARD wrote:

> Hi,

> I have the following problem:

> Considering source model M1 and target model M2, I need to apply
> transformation on M1 objects to get M2 objects and set references of these
> newly created M2 objects to existing M2 objects.

> How can I do this ? Is there a way to load M2 existing objects prior to
> apply transformation (is this the role of "add target model" in the ATL
> run configuration ?).

> I would expect to get an output file with
> - M2 newly created objects from M1 transformation
> - M2 existing objects

> reference of M2 newly created objects set to existing M2 objects.

> I was thinking of using "refining" mode but I would need to say
> - refine for M2 (to import existing objects)
> - from for M1 (to create new objects)

> I don't think this works ...

> Thanks !

> -- Olivier
Re: [ATL] Link transformed objects with existing objects [message #107955 is a reply to message #107941] Tue, 07 July 2009 07:25 Go to previous messageGo to next message
Olivier BERNARD is currently offline Olivier BERNARDFriend
Messages: 12
Registered: July 2009
Junior Member
Helko, this is indeed what I need to do. But let me try to explain it in
another way, closer to the application functionalities.

What I want to do is simply to create some objects using "import"
functionality:
I need to manage a set of objects, some of them are created "by hand",
i.e. either through a simple EMF editor or through a GUI (using GMF). Some
others can be created from data provided by external means. These data are
formatted using XML and I can thus define an ecore model which
serialization corresponds to the required XML format.

So, basically the scenario is:
- create objects from the GUI
- create other objects using "import" feature
- possibly re-create objects from the GUI
- possibly re-create objects using "import"
- etc ...

Of course objects created through "import" may have relationships with
objects created from the GUI. In this case, the relationship could be
established from information such as an attribute representing an id or a
name.

Something like:
referencedSignal <- Signals.allInstances()->select(s | s.name = name)

If I take my previous article into account:
- M1 corresponds to the model which defines the data I need to import
- M2 corresponds to the objects in which new objects need to be created


I would have expected this "use case" a perfect subject to demonstrate M2M
!

I tried several solution, including refining, but could not get something
correct (it seems that with refining, "resolveTemp" function does not
work).

So now I'm thinking of using Kermeta which is
"yet-another-fancy-m2m-language" ... but maybe I will simply use Java +
EMF APIs !

-- Olivier
Re: [ATL] Link transformed objects with existing objects [message #107994 is a reply to message #107955] Tue, 07 July 2009 13:56 Go to previous message
Helko Glathe is currently offline Helko GlatheFriend
Messages: 55
Registered: July 2009
Member
Hi Olivier,

I will continue to find a solution. Perhaps someone of this mailing list /
newsgroup have any hints to set us on the right track.

When i will find something new that is usefull to our demands, I will let
you know.

Regards, Helko

Olivier BERNARD wrote:

> Helko, this is indeed what I need to do. But let me try to explain it in
> another way, closer to the application functionalities.

> What I want to do is simply to create some objects using "import"
> functionality:
> I need to manage a set of objects, some of them are created "by hand",
> i.e. either through a simple EMF editor or through a GUI (using GMF). Some
> others can be created from data provided by external means. These data are
> formatted using XML and I can thus define an ecore model which
> serialization corresponds to the required XML format.

> So, basically the scenario is:
> - create objects from the GUI
> - create other objects using "import" feature
> - possibly re-create objects from the GUI
> - possibly re-create objects using "import"
> - etc ...

> Of course objects created through "import" may have relationships with
> objects created from the GUI. In this case, the relationship could be
> established from information such as an attribute representing an id or a
> name.

> Something like:
> referencedSignal <- Signals.allInstances()->select(s | s.name = name)

> If I take my previous article into account:
> - M1 corresponds to the model which defines the data I need to import
> - M2 corresponds to the objects in which new objects need to be created


> I would have expected this "use case" a perfect subject to demonstrate M2M
> !

> I tried several solution, including refining, but could not get something
> correct (it seems that with refining, "resolveTemp" function does not
> work).

> So now I'm thinking of using Kermeta which is
> "yet-another-fancy-m2m-language" ... but maybe I will simply use Java +
> EMF APIs !

> -- Olivier
Previous Topic:Multiple models with a common set of references
Next Topic:[QVTR]First Implementation
Goto Forum:
  


Current Time: Fri Apr 19 21:13:41 GMT 2024

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

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

Back to the top