SPARQL query to get my pizza name

I'm just a beginner in SPARQL and can write some basic queries. I have a pizza ontology in which there is one pizza whose properties are as follows:

rdf:subClassOf NamedPizza hasTopping only (MozzarellaTopping or PeperoniSausageTopping or TomatoTopping) hasTopping some MozzarellaTopping hasTopping some PeperoniSausageTopping hasTopping some TomatoTopping 

I wrote the following query, but no result.

 SELECT * WHERE { ?pizza rdfs:subClassof [ owl:onProperty :hasTopping; owl:someValuesFrom :MozzarellaTopping ] . ?pizza rdfs:subClassof [ owl:onProperty :hasTopping; owl:someValuesFrom :PeperonSausageTopping ] . ?pizza rdfs:subClassof [ owl:onProperty :hasTopping; owl:someValuesFrom :TomatoTopping ] . } 

What is a SPARQL query to get the name of this pizza?

I am using Protege 4.2 as well as TopBraid to run a SPARQL query

+4
source share
2 answers

In a SPARQL query, you write rdfs:subClassof instead of rdfs:subClassof ('o' instead of 'O'). Capitalization matters because prefix notation is only a shorthand for a URI, and different characters (for example, lowercase letters instead of uppercase) in a URI create a different URI.

+4
source

Cut the request until it yields nothing, and then see why the part you deleted does not match the data.

+2
source

All Articles