SPARQL Query Tab - Protege 4.2

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

SPARQL Query Tab - Protege 4.2

Lorenz Buehmann
Hi,

not sure if it is a bug, but when I load the pizza ontology from URI
(http://www.co-ode.org/ontologies/pizza/pizza.owl) and execute the
following SPARQL query

SELECT distinct ?p
WHERE {
  ?s ?p ?o.
}

only the built-in properties are returned, but none of the domain
specific properties.

I think closely related to this behaviour is that for the SPARQL query

SELECT *
WHERE {
  ?s <http://www.co-ode.org/ontologies/pizza/pizza.owl#hasBase> ?o.
}

the result is empty.

Regards,
Lorenz
_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback
Reply | Threaded
Open this post in threaded view
|

Re: SPARQL Query Tab - Protege 4.2

Timothy Redmond

One of the problems with doing SPARQL queries against OWL files is that
you need to visualize what the ontology looks like in rdf. From an OWL
perspective this is a bit convoluted and makes the SPARQL syntax awkward
to use.

So in particular, it really is true that hasBase does not appear as a
predicate in the standard pizza ontology.  To show this I will show you
a fragment that relates Pizza to PizzaBase using the hasBase property.  
In the Manchester OWL syntax the axioms describing Pizza look like this:

Class: Pizza

     Annotations:
         rdfs:label "Pizza"@en
     
     SubClassOf:
         Food,
         hasBase some PizzaBase
     
     DisjointWith:
         IceCream, PizzaTopping, PizzaBase


In the turtle syntax it looks like this:

:Pizza rdf:type owl:Class ;
       
        rdfs:label "Pizza"@en ;
       
        rdfs:subClassOf :Food ,
                        [ rdf:type owl:Restriction ;
                          owl:onProperty :hasBase ;
                          owl:someValuesFrom :PizzaBase
                        ] ;
       
        owl:disjointWith :PizzaBase ,
                         :PizzaTopping .


Here we see that hasBase shows up as an object and not as a predicate.

-Timothy


On 08/23/2012 03:25 AM, Lorenz B├╝hmann wrote:

> Hi,
>
> not sure if it is a bug, but when I load the pizza ontology from URI
> (http://www.co-ode.org/ontologies/pizza/pizza.owl) and execute the
> following SPARQL query
>
> SELECT distinct ?p
> WHERE {
>  ?s ?p ?o.
> }
>
> only the built-in properties are returned, but none of the domain
> specific properties.
>
> I think closely related to this behaviour is that for the SPARQL query
>
> SELECT *
> WHERE {
>  ?s <http://www.co-ode.org/ontologies/pizza/pizza.owl#hasBase> ?o.
> }
>
> the result is empty.
>
> Regards,
> Lorenz
> _______________________________________________
> p4-feedback mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/p4-feedback

_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback
Reply | Threaded
Open this post in threaded view
|

Re: SPARQL Query Tab - Protege 4.2

Lorenz Buehmann

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ah,

yes you're right. I did not check the ontology, but was somehow influenced by a problem posted here http://answers.semanticweb.com/.
Normally I never use SPARQL on OWL ontologies.

Thanks,
Lorenz
On 23.08.2012 16:55, Timothy Redmond wrote:
>
> One of the problems with doing SPARQL queries against OWL files is that you need to visualize what the ontology looks like in rdf. From an OWL perspective this is a bit convoluted and makes the SPARQL syntax awkward to use.
>
> So in particular, it really is true that hasBase does not appear as a predicate in the standard pizza ontology. To show this I will show you a fragment that relates Pizza to PizzaBase using the hasBase property. In the Manchester OWL syntax the axioms describing Pizza look like this:
>
> Class: Pizza
>
> Annotations:
> rdfs:label "Pizza"@en
> SubClassOf:
> Food,
> hasBase some PizzaBase
> DisjointWith:
> IceCream, PizzaTopping, PizzaBase
>
>
> In the turtle syntax it looks like this:
>
> :Pizza rdf:type owl:Class ;
> rdfs:label "Pizza"@en ;
> rdfs:subClassOf :Food ,
> [ rdf:type owl:Restriction ;
> owl:onProperty :hasBase ;
> owl:someValuesFrom :PizzaBase
> ] ;
> owl:disjointWith :PizzaBase ,
> :PizzaTopping .
>
>
> Here we see that hasBase shows up as an object and not as a predicate.
>
> -Timothy
>
>
> On 08/23/2012 03:25 AM, Lorenz Bühmann wrote:
>> Hi,
>>
>> not sure if it is a bug, but when I load the pizza ontology from URI (http://www.co-ode.org/ontologies/pizza/pizza.owl) and execute the following SPARQL query
>>
>> SELECT distinct ?p
>> WHERE {
>> ?s ?p ?o.
>> }
>>
>> only the built-in properties are returned, but none of the domain specific properties.
>>
>> I think closely related to this behaviour is that for the SPARQL query
>>
>> SELECT *
>> WHERE {
>> ?s <http://www.co-ode.org/ontologies/pizza/pizza.owl#hasBase> ?o.
>> }
>>
>> the result is empty.
>>
>> Regards,
>> Lorenz
>> _______________________________________________
>> p4-feedback mailing list
>> [hidden email]
>> https://mailman.stanford.edu/mailman/listinfo/p4-feedback
>
> _______________________________________________
> p4-feedback mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/p4-feedback
>


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJQNmtUAAoJEI97YhPimK8y1c0H/3fI2PqzHlxhN2+z3uspVkvc
bj64EQHRUiVCnSbjKVNffsXSvDtIpPupTBagX27bqUBdPjFXFPsmHmwWEMxsIJUr
5A3Sqgsk7909j0jBFZS75SiLdoJcW9TAI4M3SCK1HoeipAMtwXPb0RQIOGsIwy73
mmlE39RPt8Df+SHhML6jvjS/FAM8pjMjDxHC3CgEgWb6HEuW1+yrDsqIJpQ1Lbk3
vwBZL+1O0DvwRACYW+8XBI6Vx1E4sRMq0/xNw70iaeOaEwgF32/vJDL2/TdNbZu1
ryaNdWGzxETzAwvMeUJ5Ag4nRCqk1M0oYaQmlMl8cKj1HlaZk5anm/f/T3dgCFs=
=TFv1
-----END PGP SIGNATURE-----


_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback