Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » ETL - Reuse trace model from one phase as source model in another phase
ETL - Reuse trace model from one phase as source model in another phase [message #1773205] Sun, 24 September 2017 01:56 Go to next message
Bas Har is currently offline Bas HarFriend
Messages: 18
Registered: May 2017
Junior Member
Hello,

I am using ETL to transform a SysML model into another ecore model generating with it a trace model similar to the example:
https://eclipse.org/epsilon/examples/index.php?example=org.eclipse.epsilon.examples.oo2db

In a later step, I want to use the generated trace model and the ecore model from the previous transformation along with the same SysML model as source models, so that, when encountering an element in the SysML model, I can get its equivalent in the ecore model by matching the element with as a source in the trace model and get its targets.

My problem is: ETL and EOL engines do not see the elements from SysML model as equal to the elements in the trace model, even though, the
href 
in the trace model file composed of the
file name
# 
xmi:id
matches the values in the SysML model.

Appreciate your assistance.

Thank you.
Re: ETL - Reuse trace model from one phase as source model in another phase [message #1773473 is a reply to message #1773205] Thu, 28 September 2017 12:15 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2165
Registered: July 2009
Location: York, UK
Senior Member

Hi,

I'm not sure I fully understand what you're trying to achieve. Could you please share a concrete minimal example [1]?

Cheers,
Dimitris

[1] https://www.eclipse.org/epsilon/doc/articles/minimal-examples/
Re: ETL - Reuse trace model from one phase as source model in another phase [message #1775510 is a reply to message #1773473] Tue, 31 October 2017 08:13 Go to previous message
Horacio Hoyos is currently offline Horacio HoyosFriend
Messages: 242
Registered: October 2009
Location: Mexico
Senior Member

Hi,

A simple "equals" (i.e. sysmlElement == traceElement.sysmlref) will not see them as equal as each is loaded into a separate memory space and core (emf) equals implementation just calls the equals() method on java.lang.Object and that compares memory addresses. If the elements in the SysML model have a unique id (i.e. an attribute that is marked as isId) then you can use that value to find matching elements in the trace model. Something in the lines of:
var sysmlElement = sysml!Block.all.select(b | b.name == "myBlock");
var traceElement = trace!TraceElement.all.selectOne(te | te.sysmlref.id == sysmlElement.id);
var ecoreElement = traceElement.ecoreref;

Cheers,


Horacio Hoyos Rodriguez
Kinori Tech
Need professional support for Epsilon, EMF?
Go to: https://kinori.tech
Previous Topic:Register EPackage on startup
Next Topic:[Epsilon - EOL]
Goto Forum:
  


Current Time: Sat Apr 27 01:54:45 GMT 2024

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

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

Back to the top