Skip to content
SHACL/ShEx implementation
Branch: master
Clone or download
Pull request Compare This branch is 1 commit ahead, 364 commits behind labra:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
modules
notes
project
src
.gitignore
.travis.yml
LICENSE
Procfile
README.md
build.sbt
buildinfo.sbt

README.md

shaclex

SHACL and SHEX Implementation.

This project contains an implementation of SHACL and ShEx

Codacy Badge Build Status

Introduction

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 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 -d examples/shacl/good1.ttl --engine ShaClex"

Validating RDF with ShEx

Example:

sbt "run -e ShEx -s examples/shex/good1.shex --schemaFormat ShExC -d examples/shex/good1.ttl"

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 Shaclex is to compile the code and generate a binary. The following command:

$ sbt universal:packageBin  

generates the file:

target/universal/shaclex-N.N.N.zip

which contains the compressed binary code.

Server mode

The --server option activates server mode.

sbt "run --server"

Implementation details

  • 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

More information

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.

Author

Contribution

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

You can’t perform that action at this time.