I am trying to get Pellet to propagate properties from classes down to the individuals belonging to those classes. For example, if I have Class A with Property X, and Individual B with rdf:type=Class A, I want Individual B to have Property X after running the reasoner. I'm using the technique of property chain inclusion referenced on the OWL 2 New Features page. This technique works perfectly if I use my own custom properties in the property chain, but it doesn't work if I try to use rdf:type itself. Here are some relevant snips of my RDF/XML.
Ontological Class (generated by Jena; note the "spread" property, as that is what I'm trying to propagate to the individuals of class Person):
<rdf:Description rdf:about="http://family/person">
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Thing"/>
<owl:sameAs rdf:resource="http://family/person"/>
<rdfs:subClassOf rdf:resource="http://www.w3.org/2002/07/owl#Thing"/>
<owl:equivalentClass rdf:resource="http://family/person"/>
<owl:disjointWith rdf:resource="http://www.w3.org/2002/07/owl#Nothing"/>
<j.1:spread rdf:resource="http://spread/specificSpread"/>
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
</rdf:Description>
"Spread" property itself (written manually by me, not generated with Jena since Jena's API doesn't support object property chains):
<rdf:Description rdf:about="http://spread/generalSpread">
<owl:propertyChainAxiom rdf:parseType="Collection">
<owl:ObjectProperty rdf:about="http:开发者_JAVA百科//www.w3.org/1999/02/22-rdf-syntax-ns#type"/>
<owl:ObjectProperty rdf:about="http://spread/generalSpread"/>
</owl:propertyChainAxiom>
</rdf:Description>
Before reasoning, the person Oedipus looks like this:
<rdf:Description rdf:about="http://family/Oedipus">
<rdf:type rdf:resource="http://family/person"/>
</rdf:Description>
The idea is that, after reasoning, it would look something like this:
<rdf:Description rdf:about="http://family/Oedipus">
<rdf:type rdf:resource="http://family/person"/>
<j.1:spread rdf:resource="http://spread/specificSpread"/>
</rdf:Description>
I have a feeling that referring to rdf:type as an rdf:resource is probably where things are getting screwy since I'm pretty sure it's not a resource. But I'm not sure how to fix it. I ran it through Pellet's command line lint program as well and it didn't seem to have a problem with it except that it created an explicit entry for rdf:type that looked like this:
<owl:ObjectProperty rdf:about="&rdf;type"/>
Looks a little strange to me and might also be a hint that it doesn't understand my reference to rdf:type.
Can anyone shed any light on what might be going on? I'd really appreciate any help anyone could provide.
Very Important Edit
It actually turns out that property propagation IS possible within the realm of OWL DL. For example, if you want to propagate the property spread
with the value simpleSpread
(assuming both are already defined in your RDF), you might do something like this (in RDF/XML):
<rdf:Description rdf:about="http://family/person">
<rdfs:subClassOf>
<owl:hasValue rdf:resource="http://spread/simpleSpread"/>
<owl:onProperty rdf:resource="http://spread/hasSpread"/>
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Restriction"/>
</rdfs:subClassOf>
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
</rdf:Description>
Not so important anymore
Okay so for information completeness, I'll post the relevant answer information here. This stuff comes from talking to people on the pellet-users mailing list. The thread is archived and starts with my initial message. Follow the thread to find out what happened in detail.
Essentially, OWL DL does not allow "reflection" upon built-in properties and datatypes. Allowing this could violate the polynomial time decidability guaranteed by OWL DL. In order to accomplish this, you have to use the OWL RL profile of OWL Full, which treats all things in OWL equally, thus allowing the use of an inference over rdf:type
.
The major issue with this is finding a reasoner (or combination of reasoners) that support both DL and RL, since RL is much lighter-weight and less expressive than DL (not to mention not guaranteed to be decidable in polynomial time).
精彩评论