I have an ontology created in Protege, with classes and properties and related instances for them. Considering one object property I want to find all the instances in the ontology sharing the same object property - to do that I did iterate through abject properties and got the value of each of them and got the individual sharing same properties.
The problem I'm facing in is by this method I can not get the values for the inferred properties.
To make it more clear, in the following image; For the property isFrom I can get the value of 761 which is fine, however for the property immediateRelationI was expecting to get GroupOfPeople2 but I got empty. So for participant and immediateRelation which are inferred relation, I can not get any value.
Can you please help me with any method that let me go through the values of inferred properties as well ?
Following is part of the code I used for getting values.
The part of result I got when I turn the reasoner on
for (OWLObjectProperty ax: listObjectProperty) {
TreeSet < OWLNamedIndividual > finalInd_sameOProperty = new
TreeSet < OWLNamedIndividual > ();
for (OWLNamedIndividual i:
individualsameProperty) {
Set < OWLNamedIndividual > objectValue = reasoner.getObjectPropertyValues(i, ax).getFlattened();
if (objectValue.size() > 0) {
finalInd_sameOProperty.add(i);
}
}