Create or change a dataspace, and configure its SPARQL services and XSLT stylesheets

Configuration files

Dataspaces are configured using RDF configuration files in TriG syntax: config/dataspaces.trig holds the dataspace metadata, config/system.trig the internal service wiring, and secrets/credentials.trig the optional service credentials. See the configuration reference for details about these files.

The configuration uses the dataspace domain ontology. Each dataspace — end-user or administration — is backed by its own SPARQL service and can specify its own XSLT stylesheet.

Dataspace configuration is file-based — there is no ldh command for it. The config/*.trig files are read at startup, so changes to them require a restart of the LinkedDataHub service.

Dataspace base URIs must be relative to the system base URI configured in .env. If you change the system base URI, you must update the dataspace base URIs too, or they will not be reachable.

Create a dataspace

To create a new dataspace:

  1. Add instances of lds:EndUserDataspace and lds:AdminDataspace to config/dataspaces.trig, following the default dataspace as a template
  2. Declare an end-user and an admin dataset for the dataspace in config/fuseki/config.ttl, named after its origin (deployment host dropped, role appended)
  3. Add corresponding sd:Service instances to config/system.trig, each pointing at one of those datasets, and bind the dataspaces to them

The relationship between end-user and admin dataspaces is inferred from their origins, and there is nothing to declare. A dataspace whose origin (lds:origin) uses the admin. subdomain is recognized as an administration dataspace, and paired with the end-user dataspace on the corresponding bare host.

Use URIs (for example in the urn: scheme) to identify apps and services, not blank nodes. Make sure both files are valid TriG, or the setup will not work. You can check the syntax with Apache Jena's riot --validate.

Change stylesheet

Change the value of ac:stylesheet to the URI of your XSLT stylesheet. Add the property if it is absent. The value has to be an absolute URL on the dataspace's own origin.

The stylesheet can either be uploaded as a file or mounted in docker-compose.yml, in the volumes section of the linkeddatahub service. Mounting is useful while developing.

It is rarely necessary to change the stylesheet of an admin dataspace, but the procedure is identical.

Manage services

The LinkedDataHub service, the single fuseki triplestore, the egress proxy and the sef-compiler are defined in docker-compose.yml; each runs as a Docker container. One Fuseki server holds an end-user and an admin dataset per dataspace, declared in config/fuseki/config.ttl — so giving a dataspace its own datasets means adding a dataset pair there and a matching pair of sd:Service instances in config/system.trig.

While LinkedDataHub uses Apache Jena Fuseki by default, you can configure it to use other SPARQL 1.1-compatible triplestores such as QLever, Tentris, or others.

See the triplestores reference for step-by-step configuration examples, including QLever setup and troubleshooting.

Read more about dataspaces and the configuration.