|
|
Re: model instances (.xmi) [message #1799933 is a reply to message #1799911] |
Mon, 17 December 2018 16:14 |
Marzieh ghorbani Messages: 33 Registered: September 2017 |
Member |
|
|
Hi Dimitris
I Compare each individual model's element of "Targetv1.xmi"with each element of model "Targetv2.xmi". If there is no element in the "Targetv2.xmi" model, add that element to the "Targetv2.xmi" model. I using the "Resource" and "ResourceSet".[1]
But the problem is that the element has not been added correctly and other elements have been deleted. please see pictures.[1]
2) An other work do:
I use Transform() method and execute "SingelValue2Attribute" rule for "Attribute phone". Then I save the transformation's output in to "Targetv2.xmi" by using "store()" method. But as the picture shows, the column "phone" and the Table "Student" have been duplicated. please see minimal Example.[2]
Best Regards
Marzieh
[Updated on: Tue, 18 December 2018 15:39] Report message to a moderator
|
|
|
Re: model instances (.xmi) [message #1799989 is a reply to message #1799933] |
Tue, 18 December 2018 14:19 |
|
Hi Marzieh,
Your minimal example has grown to over 500 lines of code and running EtlStandaloneExample produces no errors so I'm having trouble understanding the problem you're facing. Could I please also ask you to upload zip instead of rar archives in the future as Eclipse provides a built-in facility for importing zipped projects.
Taking a step back and considering all the issues you've had with Epsilon recently - many of which are related to the nature of your use-case (essentially incremental transformation) - I'm wondering if Epsilon is the right tool for the job or if you'd be better off either using an existing incremental M2M language instead (e.g. ATL) or even just the EMF API and Java for manipulating your models.
Cheers,
Dimitris
|
|
|
|
Re: model instances (.xmi) [message #1800011 is a reply to message #1799991] |
Wed, 19 December 2018 00:23 |
Sina Madani Messages: 160 Registered: November 2015 Location: York, UK |
Senior Member |
|
|
Hi Marzieh,
If I understand your initial question correctly perhaps the following may be a useful starting point if you are to use EOL:
var sourceColumn = selectOne(c : Targetv1!Column | c.name == "phone");
transaction {
var targetTable = selectOne(t : Targetv2!Table | t.name == "Student");
targetTable.add(sourceColumn);
}
I haven't tested the above code as I do not have a minimal example to work with. As I do not know in what context this problem fits, I cannot advise on suitable alternatives; though for such a fine-grained task it seems Epsilon may not be the best tool.
Thanks,
Sina
|
|
|
Powered by
FUDForum. Page generated in 0.03617 seconds