for (OWLNamedIndividual ind : getAllNamedIndividuals()) {
result.put(ind, getAllNamedIndividuals());
}
return result;
}
OWLDataFactory factory=getDataFactory();
AtomicRole role=H(property);
initializeKnownAndPossibleRelations();
// If an individual is declared, but not used in a logical axiom, it can still be related
// e.g., {ReflexiveObjectProperty(r)} entails r(a,a) even if a if not used in a logical axiom
Map<Individual,Set<Individual>> relations=m_possibleObjectPropertyRelations.get(role);
if (relations!=null) {
Set<Individual> toTest=relations.keySet();
for (Individual individual : toTest) {
Set<Individual> toTestSuccessors=relations.get(individual);
for (Individual successorIndividual : toTestSuccessors) {
OWLClass pseudoNominal=factory.getOWLClass(IRI.create("internal:pseudo-nominal"));
OWLClassExpression allNotPseudoNominal=factory.getOWLObjectAllValuesFrom(property,pseudoNominal.getObjectComplementOf());
OWLAxiom allNotPseudoNominalAssertion=factory.getOWLClassAssertionAxiom(allNotPseudoNominal,factory.getOWLNamedIndividual(IRI.create(individual.getIRI())));
OWLAxiom pseudoNominalAssertion=factory.getOWLClassAssertionAxiom(pseudoNominal,factory.getOWLNamedIndividual(IRI.create(successorIndividual.getIRI())));
Tableau tableau=getTableau(allNotPseudoNominalAssertion,pseudoNominalAssertion);
if (!tableau.isSatisfiable(true,true,null,null,null,null,null,new ReasoningTaskDescription(true,"is {0} connected to {1} via {2}",individual,successorIndividual,property))) {
Map<Individual,Set<Individual>> newKnownRelations=m_knownObjectPropertyRelations.get(role);
if (newKnownRelations==null) {
newKnownRelations=new HashMap<Individual, Set<Individual>>();
m_knownObjectPropertyRelations.put(role,newKnownRelations);
}
Set<Individual> successors=newKnownRelations.get(individual);
if (successors==null) {
successors=new HashSet<Individual>();
newKnownRelations.put(individual,successors);
}
successors.add(successorIndividual);
}
}
}
// remove from possibles, all tested now
m_possibleObjectPropertyRelations.remove(role);
}
relations=m_knownObjectPropertyRelations.get(role);
if (relations!=null) {
for (Individual individual : relations.keySet()) {
Set<OWLNamedIndividual> successors=new HashSet<OWLNamedIndividual>();
result.put(factory.getOWLNamedIndividual(IRI.create(individual.getIRI())), successors);
for (Individual successorIndividual : relations.get(individual)) {
successors.add(factory.getOWLNamedIndividual(IRI.create(successorIndividual.getIRI())));
}
}
}
return result;
}