I'm trying to get an object property from a class, in particular: I'm trying to understand when a class is a part of some other class (the construct used could be seen in the screenshot).
I've already tried to use the OWL-api function getObjectPropertiesInSignature()
on a OWLClass
object (the object is "e").
//display delle object property
Set<OWLObjectProperty> proprietà = e.getObjectPropertiesInSignature();
System.out.println("Object Property:");
if(proprietà.isEmpty()) {
System.out.println("\tQuesta classe non ha object property");
}
else {
for(OWLObjectProperty prop : proprietà) {
System.out.println("\t"+ prop);
}
}
The output of the snippet is Questa classe non ha object property
, so the function returns an empty Set, But In this case, it should return a Set with one object property: the part-Of object property.