@Override public Graph getSchemaGraph() { return ((PelletReasoner) getReasoner()).getSchema(); }
@Override public Graph getSchemaGraph() { return ((PelletReasoner) getReasoner()).getSchema(); }
@Override public Graph getSchemaGraph() { return ((PelletReasoner) getReasoner()).getSchema(); }
private Set<ATermAppl> pruneExplanation(final Triple pattern, final Set<ATermAppl> explanation) { final Set<ATermAppl> prunedExplanation = new HashSet<>(explanation); final OntBuilder builder = new OntBuilder(_kb); KnowledgeBase copyKB; PelletInfGraph copyGraph; final GraphLoader loader = new DefaultGraphLoader(); for (final ATermAppl axiom : explanation) { prunedExplanation.remove(axiom); copyKB = builder.build(prunedExplanation); copyGraph = new PelletInfGraph(copyKB, (PelletReasoner) getReasoner(), loader); if (!checkEntailment(copyGraph, pattern, false)) prunedExplanation.add(axiom); else _logger.finer(() -> "Prune from explanation " + ATermUtils.toString(axiom)); } return prunedExplanation; }
private Set<ATermAppl> pruneExplanation(final Triple pattern, final Set<ATermAppl> explanation) { final Set<ATermAppl> prunedExplanation = new HashSet<>(explanation); final OntBuilder builder = new OntBuilder(_kb); KnowledgeBase copyKB; PelletInfGraph copyGraph; final GraphLoader loader = new DefaultGraphLoader(); for (final ATermAppl axiom : explanation) { prunedExplanation.remove(axiom); copyKB = builder.build(prunedExplanation); copyGraph = new PelletInfGraph(copyKB, (PelletReasoner) getReasoner(), loader); if (!checkEntailment(copyGraph, pattern, false)) prunedExplanation.add(axiom); else _logger.finer(() -> "Prune from explanation " + ATermUtils.toString(axiom)); } return prunedExplanation; }
private Set<ATermAppl> pruneExplanation(final Triple pattern, final Set<ATermAppl> explanation) { final Set<ATermAppl> prunedExplanation = new HashSet<>(explanation); final OntBuilder builder = new OntBuilder(_kb); KnowledgeBase copyKB; PelletInfGraph copyGraph; final GraphLoader loader = new DefaultGraphLoader(); for (final ATermAppl axiom : explanation) { prunedExplanation.remove(axiom); copyKB = builder.build(prunedExplanation); copyGraph = new PelletInfGraph(copyKB, (PelletReasoner) getReasoner(), loader); if (!checkEntailment(copyGraph, pattern, false)) prunedExplanation.add(axiom); else _logger.finer(() -> "Prune from explanation " + ATermUtils.toString(axiom)); } return prunedExplanation; }