3

在我的图表中,我有以下断言

  @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,我想查看所有三元组,但我看到了这张图

在此处输入图像描述

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

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

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

4

3 回答 3

2

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

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

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

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

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

情况1

@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/> 未显示

案例2

@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/> 不显示

案例3

@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 中,它以某种方式得到了修复:

GDB-2076 - 可视图:对指向 IRI 但被视为文字的 foaf/dbpedia 谓词的一致处理

于 2017-07-14T11:38:28.317 回答
2

可视化图表功能显示资源(= 具有 IRI 的事物)及其连接方式。由于 foaf:givenname 和 foaf:family_name 指向文字,它们没有显示在图中。你说得对,泡沫是专门处理的。属性 foaf:homepage 和 foaf:depiction 被视为指向文字(因此未显示),因为它们用于引用 Internet 上的 URL,而不是指向图中其他资源的真实 RDF IRI。没有其他泡沫特性经过特殊处理。

在 GraphDB 的未来版本中,您将对省略的内容进行更细粒度的控制。

编辑:在侧面板(显示文字的地方)不显示 foaf:homepage 与从图中隐藏它不一致。这将在下一个版本中解决。

于 2017-07-14T12:45:52.580 回答
0

从 GraphDB 8.3 开始,您可以通过创建自己的 Visual Graph Config 来配置 Visual Graph 的所有查询。在此处查看文档。 http://graphdb.ontotext.com/documentation/enterprise/devhub/custom-graph-views.html?highlight=visual%20graph%20config

还有一个网络研讨会。 https://www.ontotext.com/custom-graph-views-webinar-recording/

于 2018-12-14T16:47:18.487 回答