首页 > 解决方案 > 如何取消引用 Fuseki2 链接数据服务器中上传的 URI 节点?

问题描述

我安装了 Fuseki2 并将其作为具有默认设置 ( http://localhost:3030/ ) 的独立服务器运行。

我通过“管理数据集”控制台上传包含此类信息的 Turtle 文件,创建了一个内存数据集(“地理”):

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix schema: <http://schema.org/> .
@prefix dcat:    <http://www.w3.org/ns/dcat#> .
@prefix pd: <http://localhost:3030/geography/ontology/> .

pd:City 
  rdf:type owl:Class ;
  rdfs:comment "Represents a City in the ontology" .

<http://localhost:3030/geography/City/>
  a dcat:Dataset;
  schema:name "City information";
  schema:description "Dataset with all the country's cities' information from 2018." ;

<http://localhost:3030/geography/City/1100015> 
  a pd:City;
  rdfs:label "Rome" ;
  pd:isCapital "1"^^xsd:int .

虽然我可以通过 SPARQL 查询获取值(例如 PREFIX dcat:http ://www.w3.org/ns/dcat# SELECT ?s WHERE {?sa dcat:Dataset.}),但我无法访问此节点的信息(http://localhost:3030/geography/City/1100015),例如我会这样:http ://dbpedia.org/page/Rome 。

有没有办法可以配置 Fuseki 服务器以取消引用我上传的 URI 并返回节点的信息?

标签: fusekilinked-data

解决方案


显然,使导入的 URI 可解析的唯一方法是使用链接数据接口,例如Pubby ( http://wifo5-03.informatik.uni-mannheim.de/pubby/ ) 或LOD 视图( https://github .com/LodLive/LodView)。

安装后,您可以将它们指向 Fuseki 的 SPARQL 端点。

LodView 配置文件 (config.ttl) 的示例:

conf:IRInamespace <http://localhost:3030/geography/> ; # base namespace for URIs
conf:endpoint <http://localhost:3030/sparql>; # where to query

可以通过内容协商访问http://localhost:8080/lodview/geography/City/1100015 。


推荐阅读