Skip to content

Latest commit

 

History

History
120 lines (78 loc) · 4.47 KB

README.md

File metadata and controls

120 lines (78 loc) · 4.47 KB

SHACL-S

Scala implementation of SHACL.

This project contains an implementation of SHACL in Scala.

Continuous Integration

Codacy Badge

codecov

Maven Central

Introduction

This project contains an implementation of SHACL in Scala.

Installation and compilation

The project uses sbt for compilation as well as Java 1.11.

  • sbt test compiles and runs the tests

Usage

Once compiled, the program can be run as a command line tool. It is possible to run the program inside sbt as:

Validating RDF data with SHACL

Example:

sbt "run --data examples/shacl/good1.ttl 
         --engine ShaClex"

Interactive mode with sbt

It is usually faster to run the sbt command, which opens the interactive sbt shell and inside that shell, execute the different commands.

$ sbt
... several information about loading libraries
sbt> run -d examples/shacl/good1.ttl --engine ShaClex  

Binary mode

The fastest way to run Shacl-s is to compile the code and generate a binary. The following command:

$ sbt universal:packageBin
...generates the file...
target/universal/shacl-s-N.N.N.zip

which contains the compressed binary code.

Implementation details

  • The engine is based on purely functional concepts using the cats library

Compatibility tests

The current implementation passes all shacl-core tests. In order to generate the EARL report, run:

$ sbt 
[...]
sbt:shaclex> project shacl 
sbt:shacl> testOnly es.weso.shacl.report.ReportGeneratorCompatTest

Publishing to OSS-Sonatype

This project uses the sbt ci release plugin for publishing to OSS Sonatype.

SNAPSHOT Releases

Open a PR and merge it to watch the CI release a -SNAPSHOT version

Full Library Releases
  1. Push a tag and watch the CI do a regular release
  2. git tag -a v0.1.0 -m "v0.1.0"
  3. git push origin v0.1.0 Note that the tag version MUST start with v.

More information

  • More information about SHACL can be read in the Validating RDF data co-authored by one of the authors.
  • This project was originally part of SHaclEx but we decided to modularize that project and keep the SHACl implementation in its own repository.
  • An online demo based on this library is available at http://rdfshape.weso.es.
  • Another online demo based on this library customized for Wikidata is available at http://wikishape.weso.es.
  • This project was based on ShExcala which was focused on Shape Expressions only.

Author & contributors

Contributors:

Adopters

  • RDFShape: An online demo powered by this library.
  • Wikishape: An online demo powered by this library for Wikidata.
  • Eclipse lyo: An SDK and a modelling environment to design and develop linked data applications based on the OSLC standards. The validation library is lyo-validation.

Contribution

Contributions are greatly appreciated. Please fork this repository and open a pull request to add more features or submit issues