La vie des standards est parfois un peu difficile à…
SHACL Play! at http://shacl-play.sparna.fr/ is a free online RDF validator based on SHACL. It encapsulates TopQuadrant’s Java SHACL implementation as the actual validation engine. The code of SHACL Play is available on Github.
- Give the input RDF data to be validated, by uploading an RDF file, pointing to a URL, or copy/pasting inline data;
- Give the SHACL rules to use for validation, by uploading a file, pointing to a URL, copy/pasting inline data, or selecting the shapes from the catalog (see below);
- Validate, and get a human-readable report generated from the SHACL raw validation report;
- Access to the report in its RDF or CSV variant;
Here is a screenshot of how the validation report looks like :
SHACL Play! features :
- Free, no registration required, no limit;
- Easy-to-use input form;
- Multiple RDF serialisations supported (Turtle, RDF/XML, n3, TriG);
- Versatile input methods for both RDF data and SHACL rules (upload, URL, copy/paste, catalog);
- Human-readable validation report, for quick analysis of the issues to be fixed in the data (or adjusted in the shapes);
- Downloadable validation reports in CSV or raw RDF;
- Asynchronous validation to avoid timeouts, for large datasets (greater than 100000 triples);
- Permalinks to validation reports when both RDF dataset and SHACL rules are online;
- Catalog of online public shapes for documentation and quick validation (see below);
SHACL Play also features a command-line variant (see the documentation on the Github wiki).
Future features could include :
- Improved display of validation report, with possibly different styles of report (depending on the « styles » of the Shapes):
- Human-readable display of a SHACL graph;
- Online data transformation engine based on SHACL Rules, with a first focus on converting an OWL ontology to SHACL constraints (see this excellent description of one possible set of rules to derive SHACL shapes from an OWL ontology, by Irene Polikoff from TopQuadrant);
The Shapes Catalog
Adding an entry to the catalog allows to:
- See the shapes listed in the catalog page;
- Get a form to directly validate data against these Shapes, e.g. if you want to validate your Shapes against « SHACL for SHACL » you can go to http://shacl-play.sparna.fr/validate?shapes=shsh;
- Get a direct permaling to the validation report if the validated RDF data is also online, so there even no need to submit anything through a form to get a validation report. e.g. http://shacl-play.sparna.fr/validate?shapes=shaclplay-catalog&url=https://raw.githubusercontent.com/sparna-git/SHACL-Catalog/master/shacl-catalog.ttl is the direct link for the validation of the Shapes Catalog source file against the Shapes Catalog SHACL file;
Another SHACL Validator
How to edit/create SHACL rules ?
You need to create your own set of SHACL rules ? You don’t have a tool to do that and you don’t want to write Turtle file by hand ? One technique I use is to edit them in an Excel spreadsheet that is converted in RDF using SKOS Play Excel 2 RDF converter. Here are 1 example of such a file : OpenArchaeo shapes in Excel.
You could start from this template and modify it to create your own Shapes Graph.
Now let’s SHACL Play!
Post illustration : « Calculateur » Bulletin des sciences mathématiques 1922, found from https://www.bnf.fr/fr/mathematiques-informatique-et-sciences-du-numerique, from Gallica at https://gallica.bnf.fr/ark:/12148/bpt6k9620547z/f123.item
Next Post: Semantic Markdown Specifications