[Pellet-users] Internal Triple Representation of owl:unionOf (a b) as rdf:List
Wolfgang May
may at informatik.uni-goettingen.de
Thu Feb 7 10:31:55 UTC 2008
Hi,
constructs like
:Person a owl:Class; owl:unionOf (:Male :Female).
are translated to collections/rdf:List constructs.
Although, pellet seems not to "know" that this these things are
rdf:Lists:
***
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix : <foo://bla/>.
:Male a owl:Class.
:Female a owl:Class.
:Person a owl:Class; owl:unionOf (:Male :Female).
:EqToPerson a owl:Class;
owl:unionOf
[ a rdf:List; rdf:first :Male;
rdf:rest [ a rdf:List; rdf:first :Female; rdf:rest rdf:nil]].
:x a :Person.
***
***
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix owl: <http://www.w3.org/2002/07/owl#>
prefix : <foo://bla/>
select ?X ?Y ?Z
from <file:union-list.n3>
where {?X rdf:first ?Y . OPTIONAL {?X rdf:rest ?Z}}
***
results -as expected- in
--------------------------------------------------------------------------------
| X | Y | Z
================================================================================
| _:b0 | <foo://bla/Male> | _:b1
| _:b2 | <foo://bla/Male> | _:b3
| _:b3 | <foo://bla/Female> | <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> |
| _:b1 | <foo://bla/Female> | <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> |
--------------------------------------------------------------------------------
Successfully printed 4 query results.
But, if I ask whether ?X is a list, the answer to
***
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix owl: <http://www.w3.org/2002/07/owl#>
prefix : <foo://bla/>
select ?X ?Y ?Z
from <file:union-list.n3>
where {?X a rdf:List; rdf:first ?Y . OPTIONAL {?X rdf:rest ?Z}}
***
is only
--------------------------------------------------------------------------------
| X | Y | Z
================================================================================
| _:b0 | <foo://bla/Female> | <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> |
| _:b1 | <foo://bla/Male> | _:b0
--------------------------------------------------------------------------------
Successfully printed 2 query results.
Obviously, for
owl:unionOf (...)
the list *structure* is generated, but rdf:type rdf:List
is not assigned.
Is there a reason for this (from a previous post, I already learnt
that rdf:first and rdf:rest cannot be used for reasoning)? It would
be nice for some applications (e.g. analysis of ontologies) to
have access to these properties for querying and processing
collection-based concept definitions.
Best,
Wolfgang
More information about the Pellet-users
mailing list