|
|
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 |
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.02793 seconds