Assuming two types of classes, one (A) "isManagedBy" by the other (B). The following owl snipped illustrates this scenario. There are multiple classes of type A (which are "managed by" other classes) and multiple classes of B. In fact, there is also a hierarchy between between classes bot of type A and B.
<owl:ObjectProperty rdf:about="#isManagedBy"/>
<owl:Class rdf:about="#FunctionManagement">
<rdfs:subClassOf rdf:resource="..."/>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="#isManagedBy"/>
<owl:someValuesFrom rdf:resource="#SymposiumPlanner2013"/>
</owl:Restriction>
</rdfs:subClassOf>
</owl:Class>
<owl:Class rdf:about="#SymposiumPlanner2013"/>
...
Problem: Get all classes of type B given an arbitrary class A.
Idea: Iterate over all classes of type B. For each class B, check whether a given A has an ObjectProperty "isManagedBy" (directly or inherited) to class B by using a Reasoner's isSatisfiable() method.
OWLObjectProperty objProp = df.getOWLObjectProperty(IRI.create("#isManagedBy"));
OWLClassExpression expression;
for (OWLClass B : SetOfAllBs) {
expression = df.getOWLObjectIntersectionOf(A, df.getOWLObjectSomeValuesFrom(objProp, B));
if (reasoner.isSatisfiable(expression)) {
// do something
}
}
Unfortunately, the reasoner returns satisfiable for all classes of type B.
Question: How to solve this problem?