public void visit(OWLEquivalentClassesAxiom axiom) {
isLocal = true;
Iterator<OWLDescription> eqs = axiom.getDescriptions().iterator();
OWLDescription first = eqs.next();
// axiom is local if it contains a single class description
if (!eqs.hasNext())
return;
// axiom is local iff either all class descriptions evaluate to TOP
// or all evaluate to BOTTOM
// check if first class descr. is BOTTOM
boolean isBottom = bottomEvaluator.isBottomEquivalent(first, signature, localityCls);
// if not BOTTOM or not TOP then this axiom is non-local
if (!isBottom && !topEvaluator.isTopEquivalent(first, signature, localityCls))
isLocal = false;
// // unless we find a non-locality, process all the class descriptions
// while (isLocal && eqs.hasNext()) {
// OWLDescription next = eqs.next();
//
// if (isBottom) {
// // other concepts were BOTTOM so this one should be BOTTOM
// // too
// if (!bottomEvaluator.isBottomEquivalent(next, signature, localityCls)) {
// isLocal = false;
// }
// }
// else {
// // other concepts were TOP so this one should be TOP too
// if (!topEvaluator.isTopEquivalent(next, signature, localityCls)) {
// isLocal = false;
// }
// }
// }
if (isBottom) {
// unless we find a non-locality, process all the class descriptions
while (isLocal && eqs.hasNext()) {
OWLDescription next = eqs.next();
// first class descr. was BOTTOM, so this one should be BOTTOM too
if (!bottomEvaluator.isBottomEquivalent(next, signature, localityCls)) {
isLocal = false;
}
}
}
else {
// unless we find a non-locality, process all the class descriptions
while (isLocal && eqs.hasNext()) {
OWLDescription next = eqs.next();
// first class descr. was TOP, so this one should be TOP too
if (!topEvaluator.isTopEquivalent(next, signature, localityCls)) {
isLocal = false;
}
}