@Override public String toString() { StringBuilder sb = new StringBuilder(); if (justification.isEmpty()) { return "Explanation: <Empty>\n"; } sb.append("Explanation <"); sb.append(entailment); sb.append(">\n"); Collection<OWLAxiom> orderedAxioms; if (entailment instanceof OWLAxiom) { OWLAxiom entailedAxiom = (OWLAxiom) entailment; ExplanationOrderer orderer = new ExplanationOrdererImplNoManager(); List<OWLAxiom> axs = new ArrayList<>(orderer.getOrderedExplanation(entailedAxiom, justification).fillDepthFirst()); axs.remove(0); orderedAxioms = axs; } else { orderedAxioms = new TreeSet<>(justification); } for (OWLAxiom ax : orderedAxioms) { sb.append("\t"); sb.append(ax); sb.append("\n"); } return sb.toString(); }
log("Expanding axioms"); StringBuilder sb = new StringBuilder(); ExplanationOrderer orderer = new ExplanationOrdererImplNoManager(); Tree<OWLAxiom> tree = orderer.getOrderedExplanation((OWLAxiom) checker.getEntailment(), expandedAxioms); List<OWLAxiom> axiomList = tree.fillDepthFirst();