[Pellet-users] SPARQL Query results
Ibach, Brandon L
brandon.l.ibach at lmco.com
Fri Mar 16 19:31:44 UTC 2007
This error will occur if you run the query exactly as it appears in the email. I believe the queries were abbreviated to save space, with the PREFIX clauses omitted. Adding these two lines to the beginning of the queries should resolve the problem:
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX persons: <http://localhost/ontologies/sparql/persons.owl#>
That said, I'm sure Ayomi had this issue covered. I got the same results as described when I tried this, so, short of me diving into the Java internals of Pellet (maybe someday, guys!), I'll have to defer to Evren for an answer on this.
-Brandon :)
-----Original Message-----
From: pellet-users-bounces at lists.owldl.com [mailto:pellet-users-bounces at lists.owldl.com] On Behalf Of Mudunuri, Raj
Sent: Thursday, March 15, 2007 10:54 AM
To: Ayomi Bandara; pellet-users at lists.owldl.com
Subject: Re: [Pellet-users] SPARQL Query results
Hi Ayomi,
When I run the same query I get a query parse error that states "Line 8, column 19: Unresolved qname: persons:Academic"
Is this some kind of namespace problem?
Cheers,
Raj
-----Original Message-----
From: pellet-users-bounces at lists.owldl.com [mailto:pellet-users-bounces at lists.owldl.com] On Behalf Of Ayomi Bandara
Sent: Dienstag, 13. März 2007 19:46
To: pellet-users at lists.owldl.com
Subject: [Pellet-users] SPARQL Query results
Hello,
I am trying to use SPARQL to obtain information related to certain concepts
in an ontology. Specifically I need to to get the information about
existential (owl:someValuesFrom) restrictions on certain concepts. But I have
noticed that SPARQL will return only asserted knowledge regarding these
restrictions, it will not show the restrictions inherited from its super
classes. For example in the attached example ontology, the class "Academic"
is defined to have someValuesFrom restriction on the property, "worksAt".
The "Professor" being a subclass of the "Academic" class inherits this
condition.
When I run the following SPARQL query to get the super classes of
the "Academic" class, the SomeValuesFrom restriction is returned as one of
its super classes. But the same query for its subclass "Professor" does not
return this condition.
SELECT ?x WHERE { persons:Academic rdfs:subClassOf ?x .}
-----------------------------------------------------
Query Results (5 answers):
x
===============================================================
owl:Thing
persons:Person
persons:Employee
persons:Academic
restriction(persons:worksAt someValuesFrom(persons:University))
SELECT ?x WHERE { persons:Professor rdfs:subClassOf ?x .}
-----------------------------------------------------
Query Results (5 answers):
x
=================
persons:Academic
owl:Thing
persons:Person
persons:Employee
persons:Professor
However I have realised that SPARQL does sometimes return results that
include inferred knowledge.
For example when I raise the following query (for subclasses of "Employee")
with the attached ontology as the input file:
SELECT ?x WHERE { ?x rdfs:subClassOf persons:Employee}
the query results include the inferred subclass "Academic" as well, although
it is not asserted in the ontology.
So my questions are:
Is this because SPARQL can support only certain types of inferred knowledge?
Is it defined anywhere, what type of inferences are supported in SPARQL?
Is there any other trick or method that I can use to access such inferred
knowledge (specifically the inherited conditions of owl:SomeValuesFrom
restrictions) through SPARQL?
Please can someone help me on these?
Thanks a lot in advance,
Ayomi.
_______________________________________________
Pellet-users mailing list
Pellet-users at lists.owldl.com
http://lists.owldl.com/mailman/listinfo/pellet-users
_______________________________________________
Sponsored by Clark & Parsia, LLC http://clarkparsia.com/
More information about the Pellet-users
mailing list