linked-data-describer

Serves Linked Data documents via content negotiation over various data sources

Usage no npm install needed!

<script type="module">
  import linkedDataDescriber from 'https://cdn.skypack.dev/linked-data-describer';
</script>

README

Linked Data Describer

Build Status Coverage Status npm version

Linked Data Describer is a tool that allows you to set up a Web service for automatically serving Linked Data documents (a.k.a. subject pages) based on one or more RDF sources.

This tool automatically takes care of content negotiation as HTML and popular RDF serializations.

A live example of this tool is available at ESWC 2020.

1. Install

This server requires Node.js 10.0 or higher and is tested on OSX and Linux. To install, execute:

$ npm install -g linked-data-describer

2. Configure

Before the server can be started, a configuration file needs to be created. For example, config.json could look as follows:

{
  "sources": [
    "http://mysource.example.org/document.ttl",
    "http://somesparqlendpoint.example.org/sparql",
  ],
  "port": 8080,
  "baseIRI": "https://mydomain.example.org/",
  "title": "My App",
  "prefixes": [
    "http://xmlns.com/foaf/0.1/",
    "http://www.w3.org/ns/earl#",
    "http://purl.org/dc/terms/",
    "http://purl.org/ontology/bibo/"
  ],
  "footer": "Generated with <a href=\"https://github.com/rubensworks/linked-data-describer.js\">Linked Data Describer</a>"
}

Config entries:

  • sources: An array of RDF sources, this can be an RDF document in any serialization, a SPARQL endpoint, or a Triple Pattern Fragments interface (any source that is accepted by Comunica is allowed).
  • port: The local TCP port at which the server should be started.
  • baseIRI: The base IRI at which the server is hosted. This should also correspond to the base IRI of the subjects that are to be described by this service.
  • title: The title that will appear in HTML.
  • prefixes: An array of IRI prefixes that will be shortened in the HTML view.
  • footer: An optional footer that can be displayed on each HTML page.

3. Start the server

$ linked-data-describer config.json
Server is running on https://mydomain.example.org/ (internally: http://localhost:8080/)

License

This software is written by Ruben Taelman.

This code is released under the MIT license.