[Pellet-users] SPARQL Query results

Ayomi Bandara hmab02r at ecs.soton.ac.uk
Tue Mar 13 18:46:06 UTC 2007


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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: persons.owl
Type: application/octet-stream
Size: 4104 bytes
Desc: not available
Url : http://lists.owldl.com/pipermail/pellet-users/attachments/20070313/3ae1a23e/attachment.obj 


More information about the Pellet-users mailing list