SHACL and SHEX Implementation.
This project contains an implementation of SHACL and ShEx.
Both are implemented using the same underlying mechanism which is based on a purely functional approach.
Installation and compilation
The projects uses sbt for compilation as well as Java 1.8.
sbt testcompiles and runs the tests
Once compiled, the program can be run as a command line tool.
It is possible to run the program inside
Validating RDF data with SHACL
sbt "run -d examples/shacl/good1.ttl --engine ShaClex"
Validating RDF with ShEx
sbt "run -e ShEx -s examples/shex/good1.shex --schemaFormat ShExC -d examples/shex/good1.ttl"
Interactive mode with
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
The fastest way to run Shaclex is to compile the code and generate a binary. The following command:
$ sbt universal:packageBin
generates the file:
which contains the compressed binary code.
--server option activates server mode.
sbt "run --server"
- The engine is based on Monads using the cats library
- The ShEx compact syntax parser
is implemented using the following Antlr grammar (previous versions used Scala Parser Combinators) which is based on this grammar
- JSON encoding and decoding uses the Json structure defined here and is implemented using Circe
This project is a continuation of ShExcala which was focused on Shape Expressions only. In this project the underlying validation computation is based on Monad transformers.
Contributions are greatly appreciated. Please fork this repository and open a pull request to add more features or submit issues