@Override public boolean isCancelled() { return progressMonitor.isCancelled(); } }
@Override public boolean isCancelled() { return progressMonitor.isCancelled(); } }
@Override public boolean isCancelled() { return progressMonitor.isCancelled(); } }
/** * Determines if the process of finding laconic justifications is cancelled. This is called by our delegate and * by us as a check to see if we can break out. We don't have to continue finding laconic justifications if we have * found enough justifications up to the limit. * @return <code>true</code> if cancelled or <code>false</code> if not cancelled */ @Override public boolean isCancelled() { return isAtFoundLaconicJustificationsLimit() || progressMonitor.isCancelled(); }
public boolean isCancelled() { return progressDialog.getProgressMonitor().isCancelled(); } }
@Override public void constructTree(HittingSetTree<E> hittingSetTree, int limit, ExplanationGeneratorMediator<E> handler) { if (hittingSetTree.getProgressMonitor().isCancelled()) { throw new ExplanationGeneratorInterruptedException(); } List<HittingSetTreeNode<E>> queue = new ArrayList<>(); queue.add(hittingSetTree.getRoot()); boolean b = true; while (b) { b = buildHittingSetTree(hittingSetTree, limit, handler, queue); if (hittingSetTree.getProgressMonitor().isCancelled()) { throw new ExplanationGeneratorInterruptedException(); } } }
@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); if (progressMonitor.isCancelled()) { return;
count = 0; if(progressMonitor.isCancelled()) { throw new ExplanationGeneratorInterruptedException(); Set<OWLEntity> expansionSig = new HashSet<>(); while (size != expansion.size()) { if(progressMonitor.isCancelled()) { return Collections.emptySet(); if(progressMonitor.isCancelled()) { return Collections.emptySet();
public List<OWLAxiom> extract(List<OWLAxiom> listS, List<OWLAxiom> listO, EntailmentChecker<E> checker, ExplanationProgressMonitor<?> progressMonitor) { if(progressMonitor.isCancelled()) { throw new ExplanationGeneratorInterruptedException(); } if(listO.size() == 1) { return listO; } ListHalves halves = getHalves(listO); if(isEntailed(listS, halves.getS1(), checker)) { return extract(listS, halves.getS1(), checker, progressMonitor); } if(isEntailed(listS, halves.getS2(), checker)) { return extract(listS, halves.getS2(), checker, progressMonitor); } List<OWLAxiom> listSWithS2 = new ArrayList<>(listS); listSWithS2.addAll(halves.getS2()); List<OWLAxiom> listS1Prime = extract(listSWithS2, halves.getS1(), checker, progressMonitor); List<OWLAxiom> listSWithS1Prime = new ArrayList<>(listS); listSWithS1Prime.addAll(listS1Prime); List<OWLAxiom> listS2Prime = extract(listSWithS1Prime, halves.getS2(), checker, progressMonitor); List<OWLAxiom> listS1PrimeWithS2Prime = new ArrayList<>(listS1Prime); listS1PrimeWithS2Prime.addAll(listS2Prime); return listS1PrimeWithS2Prime; }
if(progressMonitor.isCancelled()) { return Explanation.getEmptyExplanation(entailment); if(progressMonitor.isCancelled()) { return Explanation.getEmptyExplanation(entailment);
if (progressMonitor.isCancelled()) { throw new ExplanationGeneratorInterruptedException(); if (progressMonitor.isCancelled()) { throw new ExplanationGeneratorInterruptedException();
public boolean buildHittingSetTree(HittingSetTree<E> hittingSetTree, int limit, ExplanationGeneratorMediator<E> handler, List<HittingSetTreeNode<E>> queue) { while (!queue.isEmpty()) { if (hittingSetTree.getProgressMonitor().isCancelled()) { throw new ExplanationGeneratorInterruptedException(); if (hittingSetTree.getProgressMonitor().isCancelled()) { throw new ExplanationGeneratorInterruptedException();
if(progressMonitor.isCancelled()) { throw new ExplanationGeneratorInterruptedException();
if (progressMonitor.isCancelled()) { throw new ExplanationGeneratorInterruptedException();