public boolean hasType(OWLNamedIndividual namedIndividual,OWLClassExpression type,boolean direct) {
checkPreConditions(namedIndividual,type);
if (!m_isConsistent) return true;
else if (direct && isRealised() && type instanceof OWLClass) {
Individual individual=H(namedIndividual);
AtomicConcept atomicConcept=H((OWLClass)type);
Set<Individual> individuals=m_realization.get(atomicConcept);
return individuals!=null && individuals.contains(individual);
}
else if (type instanceof OWLClass) {
Individual individual=H(namedIndividual);
AtomicConcept atomicConcept=H((OWLClass)type);
return !getTableau().isSatisfiable(true,true,null,Collections.singleton(Atom.create(atomicConcept,individual)),null,null,null,ReasoningTaskDescription.isInstanceOf(individual,atomicConcept));
}
else {
OWLDataFactory factory=getDataFactory();
OWLAxiom negatedAssertionAxiom=factory.getOWLClassAssertionAxiom(type.getObjectComplementOf(),namedIndividual);