EVL and xmi:ids [message #1692036] |
Sun, 12 April 2015 15:02 |
Leila S Messages: 36 Registered: January 2015 |
Member |
|
|
Hi,
Hope you doing well.
These days I'm working on EVL. I use my program( in EVL) as a transformer and synchronizer between two models (I don't want to use ETL because it is required to synchronize two models). To reach my goal, I use a third model as a trace model. My trace meta-model is so simple. It contains some one to one trace links; A trace link in the trace model has two EReferences, one for referring to a source element and the other for a target element.
Consider the below code be a part of the source model(the source model is created in an Exeed editor manually)
<?xml version="1.0" encoding="ASCII"?>
<Families:Family xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:Families="Families" xmi:id="_XugEAOAbEeSVFNN4w4US8g" lastName="Smith">
<father xmi:id="_tG1nwOEREeSLGIKoSSThBQ" firstName="Tom"/>
<mother xmi:id="_xLIjoOEREeSLGIKoSSThBQ" firstName="Sue"/>
<sons xmi:id="_hecHgOAwEeSVFNN4w4US8g" firstName="John"/>
</Families:Family>
And its corresponding target model is created automatically by EVL program:
<?xml version="1.0" encoding="ASCII"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:Persons="Persons">
<Persons:Male fullName="John Smith"/>
<Persons:Female fullName="Sue Smith"/>
<Persons:Male fullName="Tom Smith"/>
</xmi:XMI>
The trace model that is created automatically by my EVL program is:
<EVLTrace:OneToOne eqField="John">
<source href="source.model#_hecHgOAwEeSVFNN4w4US8g"/>
<target href="target.model#/0"/>
</EVLTrace:OneToOne>
<EVLTrace:OneToOne eqField="Sue">
<source href="source.model#_xLIjoOEREeSLGIKoSSThBQ"/>
<target href="target.model#/1"/>
</EVLTrace:OneToOne>
<EVLTrace:OneToOne eqField="Tom">
<source href="source.model#_tG1nwOEREeSLGIKoSSThBQ"/>
<target href="target.model#/2"/>
</EVLTrace:OneToOne>
Now consider I want to delete "Persons:Female Sue Smith" from the target model, so my trace model will be confused. because by deleting "Sue Smith" from target model, the OneToOne trace link "Sue" refers to "target.model#/1" that is now "Tom Smith" in the target model, and the OneToOne trace link "Tom" refers to an empty EObject.
I research about it, and I know it is because of xmi:ids which are not appeared in the target model (I'm not sure!!). To be appeared them I used the command (my all models).resource.useXmiIds= true; in a pre block in the first part of my EVL program, however, this below error is happened:
Property 'useXmiIds' not found in object org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl@f9a665
I don't know what I should do:(
Bests,
Leila
|
|
|
|
Re: EVL and xmi:ids [message #1692373 is a reply to message #1692280] |
Wed, 15 April 2015 11:38 |
|
Hi Leila,
A few months ago we cleaned up the EMF-related Epsilon code so that Epsilon would become a better EMF citizen and it looks like the .useXmiIds feature did not survive the clean-up. I've restored this feature for XMI models with a .model extension in the Git repo [1, 2] and will roll out a new interim version shortly. Apologies for any inconvenience caused.
Cheers,
Dimitris
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04054 seconds