Skip to main content



      Home
Home » Modeling » Compare » Semantic comparison
Semantic comparison [message #1439505] Tue, 07 October 2014 04:13 Go to next message
Eclipse UserFriend
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 04:23 Go to previous message
Eclipse UserFriend
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: Sun Aug 31 09:54:33 EDT 2025

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

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

Back to the top