Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Compare » Semantic comparison
Semantic comparison [message #1439505] Tue, 07 October 2014 08:13 Go to next message
Philippot Sébastien is currently offline Philippot SébastienFriend
Messages: 10
Registered: May 2014
Junior Member
Hi

I have to compare two models :
Model A
<concept1 xmi:id="xmi_ID_concept1" call="xmi_ID_concept2" name="nameOfConcept1"/>
<concept2 xmi:id=xmi_ID_concept2" calledby="xmi_ID_concept1" name=nameOfConcept2"/>


Model B:
<concept1 xmi:id="another_xmi_ID_concept1" call="another_xmi_ID_concept2" name="another_nameOfConcept1"/>
<concept2 xmi:id=another_xmi_ID_concept2" calledby="another_xmi_ID_concept1" name=nameOfConcept2"/>


Concept1 is equals when attribute "call" refer to the same concept2 attribute "name" is not important. Concept2 is equals when attribute "name" is equals. In this case, modelA equals modelB and EMF COMPARE must return 0 differences.

How can I do that ?
Do I need to override match engine ? Diff engine ?

I will appreciate any help !

Thanks in advance
Re: Semantic comparison [message #1440335 is a reply to message #1439505] Wed, 08 October 2014 08:23 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
Hi,

if "name" (for concept2) and "call" (for concept1) are the only attributes that matter to match your objects, then you can simply make it so that these attributes are considered as identifiers of your objects. See "Definining custom identifiers" in the documentation.

Otherwise, ignoring the identifiers should be enough (how to do so through code is explained in the doc, but you can also change the preferences (Window > Preferences > EMF Compare > ...) globally from the user interface).

Laurent Goubet
Obeo
Previous Topic:Loader Constraint violation for EMF Compare
Next Topic:Comparing UML models using a UMLPostProcessor
Goto Forum:
  


Current Time: Tue Mar 19 05:39:20 GMT 2024

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

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

Back to the top