How to query Classes with Object Property in Sparql
问题 Does any one know how to query Classes with Object Property in Sparql? Assume we have an OWL file which contains follows Human ----(hasPizza)---> Pizzas Human and Pizzas are classes (or concepts). In SPARQL, this query returns nothing: select ?x ?y where { ?x hasPizza ?y } But if I add two individuals (or entities) under those concepts like Human:Jim ----(hasPizza)---> Pizzas:cheesePizza that query will return ?x=Jim and ?y=cheesePizza How can I get ?x=Human and ?y=Pizza using SPARQL? 回答1: