0

Does OWLReasoner has a method that lets you get all object properties that have a specified class as their domain?

For instance, given the below ontology

city rdf:type owl:Class
country rdf:type owl:Class
isCaptialOf rdf:type owl:ObjectProperty
isCapitalOf rdfs:domain city
isCapitalOf rdfs:range country

I would like a method that does the following:

getObjectPropertyWithDomain(city) *returns* isCapitalOf
HMCheong
  • 79
  • 1
  • 7
  • 1
    No, there is no such method in OWL API. In general, most of the methods are just wrappers of the basic satisfiability check via tableau algorithm. That means, you have to write the method by yourself, which isn't that difficult - simply iterate over the properties and check whether `getObjectPropertyDomains` contains the class `city` – UninformedUser Oct 13 '17 at 10:31
  • getObjectPropertyWithDomain could be very hard to implement if your ontology contains inverseOf, subProperties/subClasses, or SWRL axioms that are related to the objectProperty or class. – Galigator Dec 06 '17 at 11:08

0 Answers0