No results when running the same SPARQL query in Owlready compared to Protege
Posted by
IWilliams on
URL: http://owlready.306.s1.nabble.com/No-results-when-running-the-same-SPARQL-query-in-Owlready-compared-to-Protege-tp528.html
I tried the SPARQL query below in protege and got results. However, when I followed the documentation for Owlready2, I am not getting any results.
#code snippet in python
onto = get_ontology("file://../Ontology/newOnto.owl").load()
graph = default_world.as_rdflib_graph()
r = list(graph.query("""
PREFIX UC: <
http://www.semanticweb.org/myonto#>
SELECT ?UseCase WHERE {
?UseCase UC:hasBoundary 'D'.
}"""))
print (r)