Search code examples
rdfowlowl-apireasoningdlquery

Get representative classes from an OWL "or" class expression


I have 3 classes: Reptile, Mammal and Cat, with Cat is a subclass of Mammal.

I have an "or" class expression:

Reptile or Mammal or Cat

How can I infer with a reasoner to get the most representative classes for any given "or" class expression? Like in this case, they're Reptile and Mammal.


Solution

  • It seems that getDirectSubclasses(yourOrExpression) gives you the answers you are looking for.