【发布时间】:2011-01-06 03:50:51
【问题描述】:
我试图让 Pellet 将属性从类传播到属于这些类的个人。例如,如果我的 A 类具有属性 X,而个体 B 具有 rdf:type=A 类,我希望个体 B 在运行推理器后具有属性 X。我正在使用OWL 2 New Features 页面上引用的属性链包含技术。如果我在属性链中使用我自己的自定义属性,这种技术非常有效,但如果我尝试使用 rdf:type 本身,它就不起作用。以下是我的 RDF/XML 的一些相关片段。
本体类(由 Jena 生成;注意“传播”属性,因为这是我试图传播给 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>
“传播”属性本身(由我手动编写,不是用 Jena 生成的,因为 Jena 的 API 不支持对象属性链):
<rdf:Description rdf:about="http://spread/generalSpread">
<owl:propertyChainAxiom rdf:parseType="Collection">
<owl:ObjectProperty rdf:about="http://www.w3.org/1999/02/22-rdf-syntax-ns#type"/>
<owl:ObjectProperty rdf:about="http://spread/generalSpread"/>
</owl:propertyChainAxiom>
</rdf:Description>
在推理之前,俄狄浦斯这个人是这样的:
<rdf:Description rdf:about="http://family/Oedipus">
<rdf:type rdf:resource="http://family/person"/>
</rdf:Description>
这个想法是,经过推理,它看起来像这样:
<rdf:Description rdf:about="http://family/Oedipus">
<rdf:type rdf:resource="http://family/person"/>
<j.1:spread rdf:resource="http://spread/specificSpread"/>
</rdf:Description>
我有一种感觉,将 rdf:type 称为 rdf:resource 可能是事情变得很糟糕的地方,因为我很确定它不是资源。但我不知道如何解决它。我也通过 Pellet 的命令行 lint 程序运行它,它似乎没有问题,只是它为 rdf:type 创建了一个显式条目,如下所示:
<owl:ObjectProperty rdf:about="&rdf;type"/>
对我来说看起来有点奇怪,也可能暗示它不理解我对 rdf:type 的引用。
任何人都可以阐明可能发生的事情吗?我非常感谢任何人提供的任何帮助。
【问题讨论】:
-
semanticoverflow.com 的完美问题
-
在我提出这个问题时不存在。
-
这只是一个只有 3 个月的婴儿,并不为人所知 :-) 但我为这个问题的读者做了更多的评论。和 (+1) 很好的问题。
标签: rdf semantic-web owl pellet