[ETL] Generated model can't be read or modified [message #1065509] |
Wed, 26 June 2013 08:54 |
Gaëtan Pruvost Messages: 19 Registered: June 2013 |
Junior Member |
|
|
Hi,
I am currently experimenting with epsilon, so excuse me if this is a noob question...
I have a toy project in which I have two meta-models called MMA and MMB.
MMB is designed to provide additionnal data to MMA without subclassing existing concepts (for performance reasons we want to avoid copying the input model).
The basic approach is to have concept B from MMB thats relate to a concept A from MMA by a "ref" property. I've created an ETL module that creates B instances to wrap every A instances.
Now the problem is: when I open the generated model file (with either exeed or emf editor), the cross-reference is empty. When I open the file as text, the cross-reference is here (it seems valid XMI) but the editor fails to show it or even modify it...
I've been strugling on that for a couple of days, I can find workarounds to not have this design but no real solution to the problem... Am I doing anything wrong in the meta-model definition or in the rules?
I attached the zip containing a simplified minimal version of my problem. ma.xmi is the source model and mb is the generated one.
Thanks in advance
[EDIT] My eclipse version is Eclipse modelling "Juno Service Release 2". In fact is the one downloaded from the epsilon website.
-
Attachment: tests.zip
(Size: 3.10KB, Downloaded 114 times)
[Updated on: Wed, 26 June 2013 08:57] Report message to a moderator
|
|
|
|
|
|
Re: [ETL] Generated model can't be read or modified [message #1065528 is a reply to message #1065518] |
Wed, 26 June 2013 11:16 |
|
Hi Gaëtan,
Please see comments below.
> - About the "Register EPackages":
> Does it keep ecore files inside my workspace project registered after a reboot?
Yes
> Do I need to re-register after a change in the model (it looks like not but just to be sure)?
No
> Can I un-register an EPackage? How?
Yes. You can do this through Preferences->Epsilon->EMF Registry (you may need to restart your Eclipse after removing an Ecore model from the list)
> - About XMI serialization:
> I see that Epsilon serialization relies heavily on XPath elements referencing (instead of xmi:id). While this is
> perfectly valid, it seems to be discouraged (see link below, point 7):
> <kttp://>java.dzone.com/articles/10-common-emf-mistakes
> I'm no EMF expert so I don't know what's the best thing to do, certainly having Ids everywhere will pollute the
> model (especially when using HUTN).
It really depends on the use case.
> But in the cases where it would be usefull, is there any way to force Epsilon using Ids when saving a model?
Yes. If the name of your model in the launch configuration is X, the following line should do the trick
X.resource.useXmiIds = true;
Cheers,
Dimitris
|
|
|
|
Powered by
FUDForum. Page generated in 0.03132 seconds