import org.simantics.db.Resource;
import org.simantics.db.Statement;
import org.simantics.db.exception.DatabaseException;
-import org.simantics.db.exception.DoesNotContainValueException;
-import org.simantics.db.exception.ManyObjectsForFunctionalRelationException;
-import org.simantics.db.exception.ServiceException;
-import org.simantics.db.exception.ValidationException;
import org.simantics.layer0.Layer0;
/**
@Override
public int compare(ReadGraph g, Resource o1, Resource o2, boolean local) throws DatabaseException {
- if (local)
- return new TypeComparator().compare(g, o1, o2);
- else
- return compare(g, o1, o2);
+ if (o1.equals(o2)) {
+ return EXACT_MATCH;
+ }
+ return compare(g, o1, o2);
}
@Override
public int compare(ReadGraph g, Resource o1, Resource o2) throws DatabaseException{
if (!compareType(g,o1, o2)) {
- return (Integer.MAX_VALUE);
+ return NO_MATCH;
}
return propsDiffCount(g,o1, o2);
}