Search code examples
fusekilinked-data

How to dereference an uploaded URI node in Fuseki2 linked data server?


I installed Fuseki2 and run it as a standalone server with default settings (http://localhost:3030/).

I created an in-memory dataset ('geography') by uploading a Turtle file with information like this, through the 'Manage datasets' console:

@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 .

Although I can get the values by SPARQL query (eg. PREFIX dcat: http://www.w3.org/ns/dcat# SELECT ?s WHERE {?s a dcat:Dataset.}), I cannot access this node's information (http://localhost:3030/geography/City/1100015), as I would, for example , like this: http://dbpedia.org/page/Rome.

Is there a way that I can configure Fuseki server to dereference the URI that I uploaded and return the information of the node?


Solution

  • Apparently the only way to make the imported URIs resolvable is by using a Linked Data Interface, such as Pubby (unmaintained since 1/2021) or LOD View.

    Once installed, you can point them to the Fuseki's SPARQL endpoint.

    Example with LodView config file (config.ttl):

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

    The, you can access http://localhost:8080/lodview/geography/City/1100015 through content negotiation.