gpt4 book ai didi

rdf - GraphDB 的 Visual graph 不显示所有的三元组

转载 作者:行者123 更新时间:2023-12-01 12:20:05 26 4
gpt4 key购买 nike

在我的图中我有以下断言

  @prefix :     <http://www.example.org/~joe/contact.rdf#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

:joesmith a foaf:Person ;
foaf:givenname "Joe" ;
foaf:family_name "Smith" ;
foaf:homepage <http://www.example.org/~joe/> ;
foaf:mbox <mailto:joe.smith@example.org> .

我将图表加载到 GraphDB 中。

如果我将 GraphDB 的 Visual Graph 指向 :joesmith,我想看到所有的三元组,但我看到了这个图

enter image description here

foaf:givennamefoaf:family_name 没有显示在图中,但它们在节点详细信息选项卡中,没关系。

相反,节点 http://www.example.org/~joe/ 没有连接到 :joesmith。它看起来很连线,因为有一个明确的断言属于 :joesmith

这是我的数据中的错误还是问题?

最佳答案

这绝对是一个错误。此错误仅影响 Visual Graph 功能。在 SPARQL 结果 View 中,一切正常。

这个问题似乎很复杂。有两个因素:

  • 这个命名空间—— <http://xmlns.com/foaf/0.1/> — 在某处进行了硬编码。

  • 此命名空间未正确进行。

让我们考虑以下示例。
在每个示例之前,清除您的存储库并删除在 Setup > Namespaces 中创建的前缀。

案例一

@prefix :     <http://www.example.org/~joe/contact.rdf#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

:joesmith a foaf:Person ;
foaf:givenname "Joe" ;
foaf:family_name "Smith" ;
foaf:homepage <http://www.example.org/~joe/> ;
foaf:mbox <mailto:joe.smith@example.org> .

正如您所指出的,<http://www.example.org/~joe/> 未显示

案例二

@prefix :     <http://www.example.org/~joe/contact.rdf#> .
@prefix foo: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

:joesmith a foo:Person ;
foo:givenname "Joe" ;
foo:family_name "Smith" ;
foo:homepage <http://www.example.org/~joe/> ;
foo:mbox <mailto:joe.smith@example.org> .

在这种情况下,<http://www.example.org/~joe/> 未显示

案例三

@prefix :     <http://www.example.org/~joe/contact.rdf#> .
@prefix foaf: <http://xmlns.com/foaf/01/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

:joesmith a foaf:Person ;
foaf:givenname "Joe" ;
foaf:family_name "Smith" ;
foaf:homepage <http://www.example.org/~joe/> ;
foaf:mbox <mailto:joe.smith@example.org> .

在这种情况下,<http://www.example.org/~joe/> 已显示

案例4

@prefix :     <http://www.example.org/~joe/contact.rdf#> .
@prefix foaf: <http://xmln.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

:joesmith a foaf:Person ;
foaf:givenname "Joe" ;
foaf:family_name "Smith" ;
foaf:homepage <http://www.example.org/~joe/> ;
foaf:mbox <mailto:joe.smith@example.org> .

在这种情况下,<http://www.example.org/~joe/> 已显示


我会尝试通过发送电子邮件直接联系他们的支持团队。


更新 1

他们说有四种 RDF 术语:

  1. URI
  2. 文字
  3. 空白节点
  4. 他们的团队认为“不真实”的 URI。

从 GraphDB 查询日志中,可以确定哪些 URI 属于第四类。

BIND (strstarts(str(?p), "http://purl.org/dc/terms/") ||
strstarts(str(?p), "http://dbpedia.org/ontology/subsidiary") AS ?isMeta)
FILTER(!strstarts(str(?p), "http://www.w3.org/2002/07/owl#")
&& !strstarts(str(?p), "http://www.w3.org/1999/02/22-rdf-syntax-ns#")
&& !strstarts(str(?p), "http://www.w3.org/2000/01/rdf-schema#")
&& !strstarts(str(?p), "http://www.openrdf.org/schema/sesame#")
&& !strstarts(str(?p), "http://www.ontologydesignpatterns.org/ont/dul/DUL.owl")
&& !strstarts(str(?p), "http://www.w3.org/ns/prov")
&& !strstarts(str(?p), "http://dbpedia.org/ontology/wikiPage")
&& !strstarts(str(?p), "http://dbpedia.org/property/wikiPage")
&& !strstarts(str(?p), "http://www.omg.org/spec/")
&& !strstarts(str(?p), "http://www.wikidata.org/entity/")
&& !strstarts(str(?p), "http://factforge.net/")
&& ?p != <http://dbpedia.org/property/logo>;
&& ?p != <http://dbpedia.org/property/hasPhotoCollection>;
&& ?p != <http://dbpedia.org/property/website>;
&& ?p != <http://dbpedia.org/property/homepage>;
&& ?p != <http://dbpedia.org/ontology/thumbnail>;
&& ?p != <http://xmlns.com/foaf/0.1/depiction>;
&& ?p != <http://xmlns.com/foaf/0.1/homepage>;
)

更新 2

在 GraphDB 8.3 中,它是 fixed以某种方式:

GDB-2076 - Visual graph: consistent handling of foaf/dbpedia predicates that point to IRIs but are treated as literals

关于rdf - GraphDB 的 Visual graph 不显示所有的三元组,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45085969/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com