Class EMFModelComparator

  • All Implemented Interfaces:
    IModelComparator

    public class EMFModelComparator
    extends java.lang.Object
    implements IModelComparator
    Model comparator for EMF models, using EMF Compare 2.x.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean canCompare​(IModel m1, IModel m2)
      Checks if the comparator can compare these two models.
      java.lang.Object compare​(IModel m1, IModel m2)
      Returns an object with the differences between this model and otherModel.
      void configure​(java.util.Map<java.lang.String,​java.lang.Object> options)
      Configures the model comparator with the specified options.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EMFModelComparator

        public EMFModelComparator()
    • Method Detail

      • compare

        public java.lang.Object compare​(IModel m1,
                                        IModel m2)
                                 throws java.lang.Exception
        Description copied from interface: IModelComparator
        Returns an object with the differences between this model and otherModel. If there are no differences, returns null. The exact configuration of the comparison depends on the model. For instance, unique identifiers (such as XMI IDs) may be ignored if the main object of these comparisons is to test model transformations. These tend to produce different unique identifiers each time they are run.
        Specified by:
        compare in interface IModelComparator
        Throws:
        java.lang.IllegalArgumentException - The models cannot be compared: for instance, they use incompatible drivers.
        java.lang.Exception - There was some other kind of problem when performing the comparison.
      • configure

        public void configure​(java.util.Map<java.lang.String,​java.lang.Object> options)
        Description copied from interface: IModelComparator
        Configures the model comparator with the specified options.
        Specified by:
        configure in interface IModelComparator