[Pellet-users] Bnodes in SPARQL queries
Arthur Peters
amp at singingwizard.org
Thu Jan 10 18:22:02 UTC 2008
I am experimenting with using an OWL ontology to infer information
about instances based on a set of class membership assertion. I also
want to be able to get information about instances that can be
inferred to exist based on these class memberships.
I created a small test OWL (Attached) and I've been running queries on
it using Pellet and I'm not getting exactly what I expect. It probably
some silly mistake on my part in the OWL or the query (and if so sorry
for bugging you, I know this is a pellet list not an OWL help list).
$ bash pellet.sh -if /home/amp/tmp/categories_test.owl -s level -qs
"PREFIX : <http://www.owl-ontologies.com/Ontology1199984147.owl#>
SELECT * WHERE { ?a a :Obj . ?a ?p ?y }"
Input file: file:/home/amp/tmp/categories_test.owl
OWL Species: DL
DL Expressivity: ALCN(D)
Consistent: Yes
Time: 725 ms (Loading: 632 Species Validation: 29 Consistency: 13 )
Query:
PREFIX : <http://www.owl-ontologies.com/Ontology1199984147.owl#>
SELECT * WHERE { ?a a :Obj . ?a ?p ?y }
-----------------------------------------------------
Query Results (6 answers):
a | p | y
=========================================================================================================
ontology1199984147:InstanceOfObj | ontology1199984147:data |
"1"^^xsd:int
ontology1199984147:InstanceOfObj | rdf:type |
ontology1199984147:HasRelationWith2Relations
ontology1199984147:InstanceOfObj | rdf:type | owl:Thing
ontology1199984147:InstanceOfObj | rdf:type |
ontology1199984147:Has1Relation
ontology1199984147:InstanceOfObj | rdf:type |
ontology1199984147:Obj
ontology1199984147:InstanceOfObj | owl:sameAs |
ontology1199984147:InstanceOfObj
So far so good. Now try to get information about an instance that is
only inferred to exist:
$ bash pellet.sh -if /home/amp/tmp/categories_test.owl -s level -qs
"PREFIX : <http://www.owl-ontologies.com/Ontology1199984147.owl#>
SELECT * WHERE { ?a a :Obj . ?a :related _:x . _:x ?p ?y }"
Input file: file:/home/amp/tmp/categories_test.owl
OWL Species: DL
DL Expressivity: ALCN(D)
Consistent: Yes
Time: 748 ms (Loading: 652 Species Validation: 30 Consistency: 14 )
Query:
PREFIX : <http://www.owl-ontologies.com/Ontology1199984147.owl#>
SELECT * WHERE { ?a a :Obj . ?a :related _:x . _:x ?p ?y }
-----------------------------------------------------
Query Results (0 answers):
NO RESULTS
No dice. I should at least get a type for _:x.
Any advise or pointers to resources that cover this type of thing?
Thanks for your time.
-Arthur
--
Home page: www.singingwizard.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: categories_test.owl
Type: text/rdf
Size: 2722 bytes
Desc: not available
Url : http://lists.owldl.com/pipermail/pellet-users/attachments/20080110/2f23fdf5/attachment.bin
More information about the Pellet-users
mailing list