]> gerrit.simantics Code Review - simantics/interop.git/blobdiff - org.simantics.interop/src/org/simantics/interop/test/ObjectComparator.java
Allow defining matching resources (Comparing models with structural components)
[simantics/interop.git] / org.simantics.interop / src / org / simantics / interop / test / ObjectComparator.java
index 0484def04797098c47e0f7253ca5ce4bd7fb5e15..059d4f8d9f64696bb2e298665e307232ce76776d 100644 (file)
@@ -9,7 +9,17 @@ import org.simantics.db.exception.DatabaseException;
  * @author Marko Luukkainen <marko.luukkainen@vtt.fi>\r
  *\r
  */\r
-public interface ObjectComparator {\r
+public abstract class ObjectComparator {\r
+       \r
+       private GraphComparator comparator;\r
+       \r
+       void setComparator(GraphComparator comparator) {\r
+               this.comparator = comparator;\r
+       }\r
+       \r
+       public GraphComparator getComparator() {\r
+               return comparator;\r
+       }\r
        \r
        /**\r
         * Compares two resources and returns numeric value of differences. Result value is Integer.MAX_VALUE if objects are not comparable. \r
@@ -19,6 +29,6 @@ public interface ObjectComparator {
         * @return\r
         * @throws DatabaseException\r
         */\r
-       public int compare(ReadGraph g, Resource o1, Resource o2) throws DatabaseException;\r
+       public abstract int compare(ReadGraph g, Resource o1, Resource o2) throws DatabaseException;\r
 \r
 }\r