Pubby显示问号而不是实际的命名空间

时间:2014-09-16 12:49:28

标签: apache tomcat rdf sparql linked-data

一些表示命名空间的URI没有出现在Pubby Linked Data Frontend中:只有一个问号(?)符号,即使点击该URL,它也会将您带到正确的页面。 / p>

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

2 个答案:

答案 0 :(得分:4)

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

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

但是,要小心。 It seems您无法链接到文件(尽管有其签名)但到网址。例如:

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

这是我的解决方案。

答案 1 :(得分:3)

我们遇到了同样的问题,我们通过在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>;
 ....

我希望这会有所帮助

相关问题