public Set<Set<OWLAxiom>> getEntailmentExplanations(final OWLAxiom axiom) { final OWLClassExpression unsatClass = _converter.convert(axiom); return getUnsatisfiableExplanations(unsatClass); }
public Set<Set<OWLAxiom>> getInconsistencyExplanations(final int maxExplanations) { return getUnsatisfiableExplanations(_factory.getOWLThing(), maxExplanations); }
public Set<Set<OWLAxiom>> getEntailmentExplanations(final OWLAxiom axiom, final int maxExplanations) { final OWLClassExpression unsatClass = _converter.convert(axiom); return getUnsatisfiableExplanations(unsatClass, maxExplanations); }
public Set<Set<OWLAxiom>> getInconsistencyExplanations(final int maxExplanations) { return getUnsatisfiableExplanations(_factory.getOWLThing(), maxExplanations); }
public Set<Set<OWLAxiom>> getInconsistencyExplanations() { return getUnsatisfiableExplanations(_factory.getOWLThing()); }
public Set<Set<OWLAxiom>> getInconsistencyExplanations(final int maxExplanations) { return getUnsatisfiableExplanations(_factory.getOWLThing(), maxExplanations); }
public Set<Set<OWLAxiom>> getEntailmentExplanations(final OWLAxiom axiom, final int maxExplanations) { final OWLClassExpression unsatClass = _converter.convert(axiom); return getUnsatisfiableExplanations(unsatClass, maxExplanations); }
public Set<Set<OWLAxiom>> getEntailmentExplanations(final OWLAxiom axiom) { final OWLClassExpression unsatClass = _converter.convert(axiom); return getUnsatisfiableExplanations(unsatClass); }
public Set<Set<OWLAxiom>> getEntailmentExplanations(final OWLAxiom axiom) { final OWLClassExpression unsatClass = _converter.convert(axiom); return getUnsatisfiableExplanations(unsatClass); }
public Set<Set<OWLAxiom>> getEntailmentExplanations(final OWLAxiom axiom, final int maxExplanations) { final OWLClassExpression unsatClass = _converter.convert(axiom); return getUnsatisfiableExplanations(unsatClass, maxExplanations); }
public Set<Set<OWLAxiom>> getInconsistencyExplanations() { return getUnsatisfiableExplanations(_factory.getOWLThing()); }
public Set<Set<OWLAxiom>> getInconsistencyExplanations() { return getUnsatisfiableExplanations(_factory.getOWLThing()); }
public void run() throws OWLOntologyCreationException, OWLException, IOException { PelletExplanation.setup(); // The renderer is used to pretty print clashExplanation final ManchesterSyntaxExplanationRenderer renderer = new ManchesterSyntaxExplanationRenderer(); // The writer used for the clashExplanation rendered final PrintWriter out = new PrintWriter(System.out); renderer.startRendering(out); // Create an OWLAPI manager that allows to load an ontology file and // create OWLEntities final OWLOntologyManager manager = OWL._manager; final OWLOntology ontology = manager.loadOntology(IRI.create(file)); // Create the reasoner and load the ontology final OpenlletReasoner reasoner = OpenlletReasonerFactory.getInstance().createReasoner(ontology); // Create an clashExplanation generator final PelletExplanation expGen = new PelletExplanation(reasoner); // Create some concepts final OWLClass madCow = OWL.Class(NS + "mad+cow"); final OWLClass animalLover = OWL.Class(NS + "animal+lover"); final OWLClass petOwner = OWL.Class(NS + "pet+owner"); // Explain why mad cow is an unsatisfiable concept Set<Set<OWLAxiom>> exp = expGen.getUnsatisfiableExplanations(madCow); out.println("Why is " + madCow + " concept unsatisfiable?"); renderer.render(exp); // Now explain why animal lover is a sub class of pet owner exp = expGen.getSubClassExplanations(animalLover, petOwner); out.println("Why is " + animalLover + " subclass of " + petOwner + "?"); renderer.render(exp); renderer.endRendering(); }
public void run() throws OWLOntologyCreationException, OWLException, IOException { PelletExplanation.setup(); // The renderer is used to pretty print clashExplanation final ManchesterSyntaxExplanationRenderer renderer = new ManchesterSyntaxExplanationRenderer(); // The writer used for the clashExplanation rendered final PrintWriter out = new PrintWriter(System.out); renderer.startRendering(out); // Create an OWLAPI manager that allows to load an ontology file and // create OWLEntities final OWLOntologyManager manager = OWL._manager; final OWLOntology ontology = manager.loadOntology(IRI.create(file)); // Create the reasoner and load the ontology final OpenlletReasoner reasoner = OpenlletReasonerFactory.getInstance().createReasoner(ontology); // Create an clashExplanation generator final PelletExplanation expGen = new PelletExplanation(reasoner); // Create some concepts final OWLClass madCow = OWL.Class(NS + "mad+cow"); final OWLClass animalLover = OWL.Class(NS + "animal+lover"); final OWLClass petOwner = OWL.Class(NS + "pet+owner"); // Explain why mad cow is an unsatisfiable concept Set<Set<OWLAxiom>> exp = expGen.getUnsatisfiableExplanations(madCow); out.println("Why is " + madCow + " concept unsatisfiable?"); renderer.render(exp); // Now explain why animal lover is a sub class of pet owner exp = expGen.getSubClassExplanations(animalLover, petOwner); out.println("Why is " + animalLover + " subclass of " + petOwner + "?"); renderer.render(exp); renderer.endRendering(); }
final Set<Set<OWLAxiom>> actual = explain.getUnsatisfiableExplanations(VolcanicMountain, 0);