Skip to content

rorlic/ldes-shacl

Repository files navigation

LDES specification SHACL

Warning

This repository is still work in progress and needs to be approved and accepted by the SEMIC (Semantic Interoperability Community), so use at your own risk.

Currently, not all requirements are covered by shapes and their tests. In addition, some requirements are hard to validate using SHACL or simply cannot be validated by shapes.

In order to be compliant with the LDES specification a producer MUST also be compliant with the TREE hypermedia specification on which LDES is based.

This repository contains a number of additional SHACL shapes that can be used to validate compliance with the LDES specification. The shapes help to validate a set of requirements that have been extracted from the LDES specification as it currently stands (Living Standard, 3 July 2025).

Deliverables

The shapes can be found in the src directory and are split into a common shapes file and a file per requirement. Each requirement shape file has its own test and collection of test files and can be found in the tests directory. There is also a build directory that contains a build script and some support text files to create the following combined shape files (which only exist after creating a build using the script):

  • the shapes file contains all additional shapes to validate pages of a LDES and should be combined with the released TREE shapes.

Run Unit Tests

To run the set of unit tests, which check the correctness of the requirement shape files, you first need to install the required packages:

npm i

after which you can run the tests with the following command:

npm run gui-test

or even without an user interface:

npm test

Create Release

To build the combined shapes files (see deliverables), you can run the build script from the root of the repository using:

./build/create-release.sh

This will first create a temporary directory and a distribution directory. After that it creates a zip archive containing the individual requirement shape files to allow creating custom combined shapes files as well as a zip file containing the set of standard combined shapes files. You can find both archives in the distribution directory.

About

SHACL validation rules for the LDES specification

Resources

License

Stars

Watchers

Forks

Packages

No packages published