if (expandedWithDefiningAxioms.contains(ax)) {
// Skip if already done
continue;
}
// Collect the entities that have been used in the axiom
OWLEntityCollector collector = new OWLEntityCollector();
ax.accept(collector);
for (OWLEntity curObj : collector.getObjects()) {
if (!objectsExpandedWithDefiningAxioms.contains(curObj)) {
int added = expandWithDefiningAxioms(curObj, remainingSpace);
axiomsAdded += added;
remainingSpace = remainingSpace - added;
if (remainingSpace == 0) {
expansionLimit *= expansionFactor;
return axiomsAdded;
}
// Flag that we have completely expanded all defining axioms
// for this particular entity
objectsExpandedWithDefiningAxioms.add(curObj);
}
}
// Flag that we've completely expanded this particular axiom
expandedWithDefiningAxioms.add(ax);
}
if (axiomsAdded > 0) {
return axiomsAdded;
}
// No axioms added at this point. Start adding axioms that reference
// entities contained in the current set of debugging axioms
for (OWLAxiom ax : new HashSet<OWLAxiom>(debuggingAxioms)) {
if (expandedWithReferencingAxioms.contains(ax)) {
// Skip - already done this one
continue;
}
OWLEntityCollector collector = new OWLEntityCollector();
ax.accept(collector);
// Keep track of the number of axioms that have been added
for (OWLEntity curObj : collector.getObjects()) {
if (!objectsExpandedWithReferencingAxioms.contains(curObj)) {
int added = expandWithReferencingAxioms(curObj, expansionLimit);
axiomsAdded += added;
remainingSpace -= added;
if (remainingSpace == 0) {