问题描述
在这个问题中我表达了几乎相同的要求:获取所有节点传递关系
I have almost the same requirement expresed in this question: Get all nodes in a transitive relation
我正在使用Protege 3.4.8.这是一个Owl-Lite项目.我有一个传递属性"contains",它定义为Node类型的对象属性节点的后代类型为A,B和C
I am using Protege 3.4.8. This is an Owl-Lite project.I have a transitive property "contains", which is defined as an object property of type NodeNode has descendants of type A, B and C
我有一些个人通过包含以下内容的属性相互链接:
I have individuals that link to each other through contains property like this:
A包含B包含C
当我运行以下SPARQL查询时:
When I run the following SPARQL query:
SELECT ?A ?B
WHERE
{
?A :contains ?B
}
我明白了:
A1 B1
B1 C1
由于包含的传递性,我希望得到
Due to transitive nature of contains, I'd expect to get
A1 C1
也是.我在这里做错了什么?我链接到的问题包括答案中的耶拿(Jena),在耶拿(Jena)模型上执行此操作会有所不同吗?
too.What am I doing wrong here? The question I've linked to includes Jena in the answer, would it make a difference to do this on a Jena model?
推荐答案
好,
进一步的搜索将我带到了此页面: http://opentox.org/data/documents/development/RDF%20files/JavaOnly/query-reasoning-with-jena-and-sparql
Further searches led me to this page: http://opentox.org/data/documents/development/RDF%20files/JavaOnly/query-reasoning-with-jena-and-sparql
此页面的以下引用(可能)解释了我所看到的行为背后的原因:
The following quote from this page (probably) explains the reasons behind the behaviour I'm seeing:
这篇关于Protege中的SPARQL查询结果无法识别传递属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!