reasoner.throwFreshEntityExceptionIfNecessary(axiom);
reasoner.throwInconsistentOntologyExceptionIfNecessary();
if (!reasoner.isConsistent())
return true;
OWLOntologyManager ontologyManager=OWLManager.createOWLOntologyManager();
OWLDataFactory factory=ontologyManager.getOWLDataFactory();
OWLIndividual individualA=factory.getOWLNamedIndividual(IRI.create("internal:named-fresh-individual-A"));
OWLIndividual individualB=factory.getOWLNamedIndividual(IRI.create("internal:named-fresh-individual-B"));
Set<OWLAxiom> axioms=new HashSet<OWLAxiom>();
axioms.add(factory.getOWLClassAssertionAxiom(axiom.getClassExpression(),individualA));
axioms.add(factory.getOWLClassAssertionAxiom(axiom.getClassExpression(),individualB));
int i=0;
for (OWLObjectPropertyExpression p : axiom.getObjectPropertyExpressions()) {
OWLIndividual tmp=factory.getOWLNamedIndividual(IRI.create("internal:named-fresh-individual-"+i));
axioms.add(factory.getOWLObjectPropertyAssertionAxiom(p,individualA,tmp));
axioms.add(factory.getOWLObjectPropertyAssertionAxiom(p,individualB,tmp));
i++;
}
for (OWLDataPropertyExpression p : axiom.getDataPropertyExpressions()) {
OWLDatatype anonymousConstantsDatatype=factory.getOWLDatatype(IRI.create("internal:anonymous-constants"));
OWLTypedLiteral constant=factory.getOWLTypedLiteral("internal:constant-"+i,anonymousConstantsDatatype);
axioms.add(factory.getOWLDataPropertyAssertionAxiom(p,individualA,constant));
axioms.add(factory.getOWLDataPropertyAssertionAxiom(p,individualB,constant));
i++;
}
axioms.add(factory.getOWLDifferentIndividualsAxiom(individualA,individualB));
Tableau tableau=reasoner.getTableau(axioms.toArray(new OWLAxiom[axioms.size()]));
return !tableau.isSatisfiable(true,true,null,null,null,null,null,ReasoningTaskDescription.isAxiomEntailed(axiom));
}