简体   繁体   English

为什么空白节点不作为链接显示在资源页面上,而不显示在可视化图表上?

[英]Why blank node is not displayed on Resource page as a link?and not displayed on visual graph?

Ontotext GraphDB 9.1.1, Free Edition Centos7 3.10.0-1062.9.1.el7.x86_64 Ontotext GraphDB 9.1.1, 免费版 Centos7 3.10.0-1062.9.1.el7.x86_64

One of my graph that contains blank nodes like this:我的图表之一包含这样的空白节点:

@prefix : <urn:ex:> .
:John :weight [ :value "5" ;
                :unit  "kg"  ] .

When I searching John in the Explore/Graphs Overview for the default graph, triples are displayed and the subject :John has a object called _:node3.当我在探索/图表概览中搜索 John 以获取默认图表时,会显示三元组并且主题 :John 有一个名为 _:node3 的对象。

However, the object is displayed as text rather than a resource link like a :John.但是,对象显示为文本,而不是像 :John 这样的资源链接。

And I click Visual Graph for :John, nothing is displayed.I tried Advanced Graph Configuration , also failed.然后我单击Visual Graph for :John,没有显示任何内容。我尝试了Advanced Graph Configuration ,也失败了。

I found some solution that using CONCAT to merge object, but it's not enough graceful.我找到了一些使用CONCAT合并对象的解决方案,但它不够优雅。

What I expect is that blank nodes could be displayed on Overview and Visual Graph .我期望的是,可以在OverviewVisual Graph上显示空白节点。

Is that possible no matter what version of graphDB?无论是什么版本的graphDB,这都可能吗?

Thanks!谢谢!

A blank node is a node that does not have a IRI as its identifier.空白节点是没有 IRI 作为其标识符的节点。 That's the reason the Visual Graph shows only IRIs.这就是可视化图表仅显示 IRI 的原因。 Ideally you should avoid using blank nodes as it will be inconsistent with the fact that :John is IRI and you are using blank node to define it's properties.Here's a workaround (I'm not sure if you found this one):理想情况下,您应该避免使用空白节点,因为它与 :John 是 IRI 并且您使用空白节点来定义它的属性的事实不一致。这是一种解决方法(我不确定您是否找到了这个):

prefix : <urn:ex:>
CONSTRUCT { 
    :John :weight ?value
} WHERE {
    :John :weight ?bnode.
    ?bnode :value ?nameLiteral;
       :unit "kg" .
    BIND( IRI(CONCAT("http://test", ?nameLiteral)) as ?value)
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM