0

我正在尝试来自http://docs.openlinksw.com/virtuoso/rdfsparqlrule.html的以下示例。
将数据加载到图表中:

ttlp ('<http://localhost:8890/dataspace> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://rdfs.org/sioc/ns#Space> . 
<http://localhost:8890/dataspace/test2/weblog/test2tWeblog> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://rdfs.org/sioc/types#Weblog> . 
<http://localhost:8890/dataspace/discussion/oWiki-test1Wiki> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://rdfs.org/sioc/types#MessageBoard> . 
<http://localhost:8890/dataspace> <http://rdfs.org/sioc/ns#link> <http://localhost:8890/ods> . 
<http://localhost:8890/dataspace/test2/weblog/test2tWeblog> <http://rdfs.org/sioc/ns#link> <http://localhost:8890/dataspace/test2/weblog/test2tWeblog> . 
<http://localhost:8890/dataspace/discussion/oWiki-test1Wiki> <http://rdfs.org/sioc/ns#link> <http://localhost:8890/dataspace/discussion/oWiki-test1Wiki> .
', '', 'http://localhost:8890/test');

关于子类和子属性的断言:

ttlp (' @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . 
<http://rdfs.org/sioc/ns#Space> rdfs:subClassOf <http://www.w3.org/2000/01/rdf-schema#Resource> . 
<http://rdfs.org/sioc/ns#Container> rdfs:subClassOf <http://rdfs.org/sioc/ns#Space> . 
<http://rdfs.org/sioc/ns#Forum> rdfs:subClassOf <http://rdfs.org/sioc/ns#Container> . 
<http://rdfs.org/sioc/types#Weblog> rdfs:subClassOf <http://rdfs.org/sioc/ns#Forum> . 
<http://rdfs.org/sioc/types#MessageBoard> rdfs:subClassOf <http://rdfs.org/sioc/ns#Forum> . 
<http://rdfs.org/sioc/ns#link> rdfs:subPropertyOf <http://rdfs.org/sioc/ns> . ', 
'', 'http://localhost:8890/schema/test');

定义规则:

rdfs_rule_set ('http://localhost:8890/schema/property_rules1', 'http://localhost:8890/schema/test');

执行查询:

define input:inference "http://localhost:8890/schema/property_rules1" 
SELECT ?s FROM <http://localhost:8890/test> 
WHERE {?s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>  <http://rdfs.org/sioc/ns#Space> };

这给了我只有 1 个结果行 - http://localhost:8890/dataspace
虽然我想得到 3 行:

  • http://localhost:8890/dataspace/test2/weblog/test2tWeblog
  • http://localhost:8890/dataspace/discussion/oWiki-test1Wiki
  • http://localhost:8890/dataspace

谁能告诉我我在这里做错了什么。是否需要授予 dba 对 rdfs_rule_set 的任何权限?非常感谢。

4

1 回答 1

0

这是一些旧版本的 Virtuoso 中的一个已知问题...

那么,您能否详细说明您正在使用什么版本的 Virtuoso 以及在什么操作系统上?

(我相信这个问题在 Virtuoso Open Source 6.1.4 和 Commercial 6.3 中得到了解决......)

于 2011-12-21T14:19:32.263 回答