【问题标题】:Pubby displays question marks instead of the actual namespacesPubby 显示问号而不是实际的命名空间
【发布时间】:2014-09-16 12:49:28
【问题描述】:

一些表示命名空间的 URI 不会出现在 Pubby 链接数据前端:命名空间应该位于的位置只有一个问号 (?),即使当您单击该 URL 时,它也会将您带到正确的页面。

我最初认为 Pubby 没有找到 prefixes.ttl 文件,但在那种情况下,链接也不会起作用,我也会看到一个错误(我在其他情况下看到过)......显然有些东西否则会导致这种情况。有谁知道是什么原因造成的?

【问题讨论】:

    标签: apache tomcat rdf sparql linked-data


    【解决方案1】:

    我遇到了同样的问题。 It seems pubby 的最新版本 (0.3.3) 不使用 config.ttl 文件中定义的前缀。

    解决方案是使用配置选项conf:usePrefixesFrom <file.rdf>;

    但是,小心点。 It seems 您不能链接到文件(尽管有其签名),但只能链接到 URL。例如:

    conf:usePrefixesFrom <http://www.csee.umbc.edu/~finin//prefixes.n3>;
    

    这就是我的解决方案。

    【讨论】:

      【解决方案2】:

      我们遇到了同样的问题,我们通过在 Pubby 的 config.ttl 文件中添加前缀来修复它,就在其他所有内容之前。例如:

       ##Declare all your prefixes here
       @prefix geosparql: <http://www.opengis.net/ont/geosparql#>.
       @prefix geo-ont: <http://www.oeg-upm.net/ontologies/geo#>.
      
       ##Pubby config.ttl file starts here
       # Server configuration section
       <> a conf:Configuration;
           # Project name for display in page titles
           conf:projectName "nameOfOurProject";
           # Homepage with description of the project for the link in the page header
           conf:projectHomepage <http://projectHomePage.com>;
       ....
      

      希望对你有帮助

      【讨论】:

        猜你喜欢
        • 2011-01-02
        • 1970-01-01
        • 2022-12-22
        • 1970-01-01
        • 2018-04-13
        • 1970-01-01
        • 2021-05-14
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多