public void addExplanation(Explanation<E> explanation) { if (!explanation.isEmpty() && allFoundExplanations.add(explanation)) { explanations.add(explanation); Collections.sort(explanations, explanationComparator); progressMonitor.foundExplanation(null, explanation, allFoundExplanations); } }
public void foundExplanation(ExplanationGenerator<OWLAxiom> explanationGenerator, Explanation<OWLAxiom> explanation, Set<Explanation<OWLAxiom>> explanations) { progressDialog.getProgressMonitor().foundExplanation(explanationGenerator, explanation, explanations); found.add(explanation); logger.info(MARKER, "Explanation {} found", found.size(), explanation.getEntailment()); }
private void notifyLaconicExplanationGeneratorProgressMonitor(Explanation<E> explanation) { try { if (isLaconic(explanation) && !foundLaconicJustifications.contains(explanation)) { foundLaconicJustifications.add(explanation); progressMonitor.foundExplanation(this, explanation, foundLaconicJustifications); } } catch (ExplanationException e) { throw new OWLRuntimeException(e); } }
@Override public Set<Explanation<E>> getExplanations(E entailment, int limit) throws ExplanationException { try { module = extractModule(workingAxioms, checkerFactory.createEntailementChecker(entailment)); prunningDifferences.clear(); Set<Explanation<E>> explanations = new HashSet<>(); Explanation<E> expl = computeExplanation(entailment); explanations.add(expl); progressMonitor.foundExplanation(this, expl, Collections.unmodifiableSet(explanations)); if (progressMonitor.isCancelled()) { return Collections.singleton(expl); } if (expl.isEmpty()) { return Collections.emptySet(); } if (limit > 1) { constructHittingSetTree(entailment, expl, explanations, new HashSet<Set<OWLAxiom>>(), new HashSet<OWLAxiom>(), limit); } if (explanations.isEmpty()) { throw new NotEntailedException(entailment); } return explanations; } catch (OWLException e) { throw new ExplanationException(e); } }
progressMonitor.foundExplanation(this, newJustification, allJustifications);
boolean added = laconicExplanations.add(unfoldedExpl); if (added) { progressMonitor.foundExplanation(this, unfoldedExpl, new HashSet<>(laconicExplanations));
for (Explanation<OWLAxiom> expl : reconstitutedLaconicExpls) { progressMonitorExplanations.add(expl); progressMonitor.foundExplanation(this, expl, progressMonitorExplanations);
for (Explanation<OWLAxiom> expl : preferredLaconicExplanations) { progressFound.add(expl); progressMonitor.foundExplanation(this, expl, progressFound);
for (Explanation<OWLAxiom> expl : preferredLaconicExplanations) { progressFound.add(expl); progressMonitor.foundExplanation(this, expl, progressFound);