if (leftPath.getLength() != rightPath.getLength())
continue;
if (comparableResources.contains(leftPath.getEnd(), rightPath.getEnd())) {
- boolean preds = true;
+ boolean match = true;
for (int i = 0; i < leftPath.getLength(); i++) {
Statement sl = leftPath.getStatements().get(i);
Statement sr = rightPath.getStatements().get(i);
if (!sl.getPredicate().equals(sr.getPredicate()) && !comparableResources.contains(sl.getPredicate(), sr.getPredicate())) {
- preds = false;
+ match = false;
+ break;
+ }
+ if ((getComparableResources().containsLeft(sl.getObject()) || getComparableResources().containsRight(sr.getObject())) && !getComparableResources().contains(sl.getObject(), sr.getObject())) {
+ match = false;
break;
}
}
- if (preds) {
+ if (match) {
map.map(leftPath, rightPath);
break;
}