English 中文(简体)
SPARQL queries for Pizza ontology
原标题:
  • 时间:2010-01-15 22:56:19
  •  标签:
  • sparql

i have to use ROWLKit http://www.dis.uniroma1.it/quonto/?q=node/30

(1) can anybody suggest two sparql queries for the Pizza.owl ?


(2) is this query valid ?

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX pizza: <http://www.co-ode.org/ontologies/pizza/pizza.owl#>
SELECT * 
WHERE { ?p rdf:type pizza:Pizza;
           pizza:hasTopping ?t.
        ?t rdf:type pizza:TomatoTopping }

(3) if it is a valid query then: is the response an empty result?

问题回答
SELECT DISTINCT *
WHERE { 
 ?NombrePizza ?Relacion pizza:MushroomTopping .
 ?Relacion owl:inverseOf pizza:isToppingOf .
 OPTIONAL { 
  ?NombrePizza2 ?Relacion2 pizza:HamTopping .
  ?Relacion2 owl:inverseOf pizza:isToppingOf . 
 }
 FILTER(?NombrePizza2 = ?NombrePizza)
}

(1) can anybody suggest two sparql queries for the Pizza.owl ?

Here are two examples:

SELECT * WHERE { ?s ?p ?o }

and:

SELECT ?class WHERE { ?class  a  owl:Class }

(2) is this query valid ?

Yes.

(3) if it is a valid query then: is the response an empty result?

I assume that you mean "if I query the RDF document that serialises the pizza ontology, is the response an empty result?". The answer is yes.

(2) appears to be a valid query

I don t understand part (3) of your question. (2) cannot be compared to a boolean since it returns a Result Set, if you want a boolean result then you need to use an ASK query. If an ASK query returns true then it means that there are solutions to the query in the data you are querying so it would not be an empty result.





相关问题
SPARQL xsd:dateTime equality

I have a SPARQL query: PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX person: <http://www.myOntDomain/person#> PREFIX likedEvent: <http://www.myOntDomain/likedEventRule#...

SPARQL queries for Pizza ontology

i have to use ROWLKit http://www.dis.uniroma1.it/quonto/?q=node/30 (1) can anybody suggest two sparql queries for the Pizza.owl ? (2) is this query valid ? PREFIX rdf: <http://www.w3.org/1999/02/...

Usage of MongoDB as a RDFStore for data objects

Is there any tool to query MongoDB using SPARQL ? I store object using an RDF schema (boo Mongo no schema ^^), and now i looking for a tool/server to query the datastore using SPARQL. I started to ...

SPARQL query language tag weirdness

This works: SELECT * WHERE{ ?x rdfs:label "Chalti Ka Naam Gaadi"@en . ?x foaf:name ?z . } (Results on DBpedia SPARQL Explorer) This doesn t: SELECT * WHERE{ ?x foaf:name "Chalti Ka Naam Gaadi" ...

Question on RDF and how thisweknow.org works

I was reading through this question What s a RDF triple? and the excellent answers to it. Roger Federer | won | wimbledon I understand that the above sentence is a triplet. But if the ...

Defining cardinality for a RDF statement

Im having a problem with RDF. I have a couple of triples defined as : <User rdf:about="#T"> <hasName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">T</hasName> <...

Pick and RDF/SPARQL

Anyone have any interest in intergrating RDF and/or SPARQL with a PICK database? Has anyone tried this yet? I have some thoughts about what to try. One idea is to figure out how to create a file with ...

Problem with SPARQLWrapper (Python)

I m making a SPARQL query against the Sesame store in localhost, using SPARQLWrapper: sparql = SPARQLWrapper( http://localhost:8080/openrdf-sesame/repositories/rep/statements ) sparql.setQuery(...

热门标签