Type propagation problem?

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

Type propagation problem?

Blechner,Michael
I am using Protege 4.3.0. New to Protege and OWL/RDFS/RDF and SPARQL so please pardon my naiveté. I am interested in building an ontology to support tagging and retrieval of educational content in the medical domain (targeting medical students). I found the following W3C page that seemed to explicitly address one of my issues (Representing Classes As Property Values on the Semantic Web, http://www.w3.org/TR/swbp-classes-as-values/). The document discusses the merits and drawbacks of 5 approaches. The first, if I understand correctly is not possible in Protege-OWL since OWL will not let one treat classes as instances and vice versa. I have attempted to create approach #2 in protege (with exception that I have created my own property isAbout instead of using the Dublin Core dc:subject. But when I run a SPARQL query there appears to be no type propagation. If I simplify the situation and create an "Animal" class with a subclass "Lion" which in turn has a subclass "AfricanLion" and then do the following SPARQL query …

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX mdb: <http://www.semanticweb.org/mblechn/ontologies/2013/5/untitled-ontology-5#>
SELECT ?y
WHERE { ?y rdfs:subClassOf mdb:Animal  }

I only get "Lion". If I query

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX mdb: <http://www.semanticweb.org/mblechn/ontologies/2013/5/untitled-ontology-5#>
SELECT ?y
WHERE { ?y rdf:type mdb:Lion  }

I get "LionSubject" but not AfricanLionSubject and if I query

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX mdb: <http://www.semanticweb.org/mblechn/ontologies/2013/5/untitled-ontology-5#>
SELECT ?y
WHERE { ?y rdf:type mdb:Animal  }

I get nothing.


The goal is to be able to query for all resources (books in this example) that are about animals and get both books.

Any help much appreciated.

-Mike Blechner
University of Connecticut

PS- My goals at present are pretty simple and I probably do not need OWL. If there is a simpler way to do this in protege with the built-in sparql query ability please don't hesitate to suggest other tools. Thanks.
_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback
Reply | Threaded
Open this post in threaded view
|

Re: Type propagation problem?

Lorenz Buehmann
To get the information you want, it is necessary to have a reasoner in
the background, because "plain SPARQL" is without inferencing.

Lorenz
On 06/18/2013 05:59 PM, Blechner,Michael wrote:

> I am using Protege 4.3.0. New to Protege and OWL/RDFS/RDF and SPARQL so please pardon my naiveté. I am interested in building an ontology to support tagging and retrieval of educational content in the medical domain (targeting medical students). I found the following W3C page that seemed to explicitly address one of my issues (Representing Classes As Property Values on the Semantic Web, http://www.w3.org/TR/swbp-classes-as-values/). The document discusses the merits and drawbacks of 5 approaches. The first, if I understand correctly is not possible in Protege-OWL since OWL will not let one treat classes as instances and vice versa. I have attempted to create approach #2 in protege (with exception that I have created my own property isAbout instead of using the Dublin Core dc:subject. But when I run a SPARQL query there appears to be no type propagation. If I simplify the situation and create an "Animal" class with a subclass "Lion" which in turn has a subclass "AfricanLion" and then do the following SPARQL query …
>
> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
> PREFIX owl: <http://www.w3.org/2002/07/owl#>
> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
> PREFIX mdb: <http://www.semanticweb.org/mblechn/ontologies/2013/5/untitled-ontology-5#>
> SELECT ?y
> WHERE { ?y rdfs:subClassOf mdb:Animal  }
>
> I only get "Lion". If I query
>
> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
> PREFIX owl: <http://www.w3.org/2002/07/owl#>
> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
> PREFIX mdb: <http://www.semanticweb.org/mblechn/ontologies/2013/5/untitled-ontology-5#>
> SELECT ?y
> WHERE { ?y rdf:type mdb:Lion  }
>
> I get "LionSubject" but not AfricanLionSubject and if I query
>
> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
> PREFIX owl: <http://www.w3.org/2002/07/owl#>
> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
> PREFIX mdb: <http://www.semanticweb.org/mblechn/ontologies/2013/5/untitled-ontology-5#>
> SELECT ?y
> WHERE { ?y rdf:type mdb:Animal  }
>
> I get nothing.
>
>
> The goal is to be able to query for all resources (books in this example) that are about animals and get both books.
>
> Any help much appreciated.
>
> -Mike Blechner
> University of Connecticut
>
> PS- My goals at present are pretty simple and I probably do not need OWL. If there is a simpler way to do this in protege with the built-in sparql query ability please don't hesitate to suggest other tools. Thanks.
> _______________________________________________
> 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