@Override public boolean isEntailed(Set<? extends OWLAxiom> axioms) { checkPreConditions(axioms.toArray(new OWLObject[0])); if (!m_isConsistent.booleanValue()) return true; EntailmentChecker checker=new EntailmentChecker(this,getDataFactory()); return checker.entails(axioms); }
/** * Use this method only if you really want to check just one axiom or if the axioms you want to check do not contain blind nodes/anonymous individuals. Otherwise use entails(Set<OWLAxiom> axioms) because only then concepts for the anonymous individuals can be obtained by rolling-up as required. * * @param axiom * an axiom for which entailment is to be checked * @return true if the loaded ontology entails the axiom and false otherwise */ public boolean entails(OWLAxiom axiom) { if (!axiom.accept(this)) return false; return checkAnonymousIndividuals(); } /**
public boolean isEntailed(Set<? extends OWLAxiom> axioms) { checkPreConditions(axioms.toArray(new OWLObject[0])); if (!m_isConsistent) return true; EntailmentChecker checker=new EntailmentChecker(this,getDataFactory()); return checker.entails(axioms); }
/** * Use this method only if you really want to check just one axiom or * if the axioms you want to check do not contain blind nodes/anonymous * individuals. Otherwise use {@code entails(Set<OWLAxiom> axioms)} * because only then concepts for the anonymous individuals can be * obtained by rolling-up as required. * * @param axiom * an axiom for which entailment is to be checked * @return true if the loaded ontology entails the axiom and false otherwise */ public boolean entails(OWLAxiom axiom) { if (!axiom.accept(this).booleanValue()) return false; return checkAnonymousIndividuals(); } /**
public boolean isEntailed(OWLAxiom axiom) { checkPreConditions(axiom); if (!isConsistent()) return true; EntailmentChecker checker=new EntailmentChecker(this,getDataFactory()); return checker.entails(axiom); } public boolean isEntailed(Set<? extends OWLAxiom> axioms) {
/** * Checks entailment of a set of axioms (an ontology) against the loaded ontology. * * @param axioms * the axioms that should be checked for enailment * @return true if all axioms follow from the loaded ontology and false otherwise. */ public boolean entails(Set<? extends OWLAxiom> axioms) { anonymousIndividualAxioms.clear(); for (OWLAxiom axiom : axioms) { if (axiom.isLogicalAxiom()) if (!axiom.accept(this).booleanValue()) return false; } return checkAnonymousIndividuals(); }
@Override public boolean isEntailed(OWLAxiom axiom) { checkPreConditions(axiom); if (!isConsistent()) return true; EntailmentChecker checker=new EntailmentChecker(this,getDataFactory()); return checker.entails(axiom); } @Override
/** * Checks entailment of a set of axioms (an ontology) against the loaded ontology. * * @param axioms * the axioms that should be checked for enailment * @return true if all axioms follow from the loaded ontology and false otherwise. */ public boolean entails(Set<? extends OWLAxiom> axioms) { anonymousIndividualAxioms.clear(); for (OWLAxiom axiom : axioms) { if (axiom.isLogicalAxiom()) if (!axiom.accept(this)) return false; } return checkAnonymousIndividuals(); }
@Override public void run(Reasoner hermit,StatusOutput status,PrintWriter output,boolean ignoreOntologyPrefixes) { status.log(2,"Checking whether the loaded ontology entails the conclusion ontology"); OWLOntologyManager m=OWLManager.createOWLOntologyManager(); try { OWLOntology conclusions = m.loadOntology(conclusionIRI); status.log(2,"Conclusion ontology loaded."); EntailmentChecker checker=new EntailmentChecker(hermit, m.getOWLDataFactory()); boolean isEntailed=checker.entails(conclusions.getLogicalAxioms()); status.log(2,"Conclusion ontology is "+(isEntailed?"":"not ")+"entailed."); output.println(isEntailed); } catch (OWLOntologyCreationException e) { e.printStackTrace(); } output.flush(); } }