SHACL

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
SHCL
Shapes Constraint Language
StatusW3C Recommendation [1]
Year started2015 (2015)[2]
First publishedOctober 8, 2015; 6 years ago (2015-10-08)[2]
OrganizationW3C
Editors
  • Holger Knublauch
  • Dimitris Kontokostas
[1]
Base standards
Related standards
DomainSemantic Web
AbbreviationSHACL
Websitewww.w3.org/TR/shacl/

Shapes Constraint Language[1] (SHACL) is a World Wide Web Consortium (W3C) specification for validating graph-based data against a set of conditions. Among others, SHACL includes features to express conditions that constrain the number of values that a property may have, the type of such values, numeric ranges, string matching patterns, and logical combinations of such constraints. SHACL also includes an extension mechanism to express more complex conditions in languages such as SPARQL.

A SHACL validation engine takes as input a data graph and a graph containing shapes declarations and produces a validation report that can be consumed by tools. All these graphs can be represented in any Resource Description Framework (RDF) serialization formats including JSON-LD or Turtle. The adoption of SHACL may influence the future of linked data.[3]

World Wide Web Consortium published the following SHACL Specifications:

  • SHACL[1] (W3C Technical Recommendation) is the main document, defining the features of SHACL Core and its extension mechanism called SHACL-SPARQL. SHACL Core defines the basic syntax and structure of shapes, constraints, the built-in kinds of constraints, and how to link shapes to data nodes. SHACL-SPARQL defines how to express constraints that are not covered by the built-in constraint kinds.
  • SHACL Advanced Features[4] (W3C Working Group Note), the most recent version of which is maintained by the SHACL Community Group defines support for SHACL Rules, a powerful feature (inspired by SPIN rules) for data transformations, inferences and mappings based on data shapes. Also includes extensions of SHACL-SPARQL such as user-defined functions.
  • SHACL JavaScript Extensions[5] (W3C Working Group Note) defines how JavaScript can be used to express constraints, rules, functions and other features. This covers similar ground as SHACL-SPARQL, but using JavaScript as its execution language.
  • SHACL Compact Syntax[6] (SHACL Community Group Report).

Open-source tools[edit]

The SHACL Test Suite and Implementation Report[7] linked to from the SHACL W3C specification lists some open source tools that could be used for SHACL validation as of June 2019. By the end of 2019 many commercial RDF database and framework vendors announced support for at least SHACL Core.

Some of the open source tools listed in the report are:

  • dotNetRDF SHACL - an online SHACL validator service written in the .NET Framework[8][9]
  • pySHACL - an open source SHACL validator library for command line use written in Python[10]
  • SHaclEX - a Scala implementation of both SHACL and ShEx[11]
  • TopBraid SHACL API - an open source implementation of SHACL by TopQuadrant, based on Apache Jena. It covers SHACL Core and SHACL-SPARQL validation as well as SHACL Advanced Features, SHACL Javascript Extension and SHACL Compact Syntax. The same code is used in the TopBraid commercial products.[12]

SHACL Playground is a free SHACL validation service implemented in JavaScript.[13]

Eclipse rdf4j is an open source Java framework by the Eclipse Foundation for processing RDF data, which supports SHACL validation.[14]

See also[edit]

References[edit]

  1. ^ a b c d Knublauch, Holger; Kontokostas, Dimitris, eds. (2017-07-20). "Shapes Constraint Language (SHACL)". W3C. RDF Data Shapes Working Group. Retrieved 2021-04-06.
  2. ^ a b "Shapes Constraint Language (SHACL) Publication History - W3C". W3C. Retrieved 2021-04-06.
  3. ^ Voskuil, Jan (2017-11-14). "Web-based graph technology is on the rise. Here is why". LinkedIn (Blog post). Retrieved 2021-04-06.
  4. ^ Knublauch, Holger; Allemang, Dean; Steyskal, Simon, eds. (2017-06-08). "SHACL Advanced Features". W3C. RDF Data Shapes Working Group. Retrieved 2021-04-06.
  5. ^ Knublauch, Holger; Maria, Pano, eds. (2018-01-09). "SHACL JavaScript Extensions". W3C. SHACL Community Group.
  6. ^ Knublauch, Holger; Maria, Pano, eds. (2018-01-09). "SHACL Compact Syntax". W3C. SHACL Community Group.
  7. ^ Labra Gayo, Jose Emilio; Knublauch, Holger; Kontokostas, Dimitris, eds. (2021-01-22). "SHACL Test Suite and Implementation Report". W3C.
  8. ^ Lang, Samu (n.d.). "dotNetRDF SHACL". langsamu.net. Retrieved 2021-04-06.
  9. ^ Lang, Samu (2019-06-01). "dotNetRDF SHACL validator service". GitHub. Retrieved 2021-04-07.
  10. ^ Sommer, Ashley; Car, Nicholas (2018-08-15). "RDFLib/pySHACL: A Python validator for SHACL". GitHub. Retrieved 2021-04-06.
  11. ^ Labra Gayo, Jose Emilio; et al. (Web Semantics Oviedo, University of Oviedo). "weso/shaclex: SHACL/ShEx implementation". GitHub. Retrieved 2021-04-06.
  12. ^ Knublauch, Holger (2015-05-24). "TopQuadrant/shacl: SHACL API in Java based on Apache Jena". GitHub. Retrieved 2021-04-06.
  13. ^ Knublauch, Holger (2017-05-01). "SHACL Playground". SHACL Playground. Retrieved 2021-04-07.
  14. ^ Eclipse Foundation (n.d.). "Validation With SHACL | The Eclipse Foundation". Eclipse RDF4J. Eclipse Foundation. Retrieved 2021-04-07.

Further reading[edit]