[ATL] Link transformed objects with existing objects [message #107231] |
Thu, 25 June 2009 12:34  |
Eclipse User |
|
|
|
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 03:25   |
Eclipse User |
|
|
|
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 09:56  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.23717 seconds