Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

springernature/shacl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TopBraid SHACL API

An open source implementation of the evolving W3C Shapes Constraint Language (SHACL) based on the Jena API.

Contact: Holger Knublauch (holger@topquadrant.com)

Can be used to perform SHACL constraint checking in any Jena-based Java application. This API also serves as a reference implementation developed in parallel to the SHACL spec. The code is totally not optimized for performance, just for correctness. And there are unfinished gaps!

The same code is used in the TopBraid products (currently ahead of the release cycle, TopBraid 5.2 will catch up). For interoperability with TopBraid, and during the transition period from SPIN to SHACL, this library uses code from org.topbraid.spin packages. These will eventually be refactored. Meanwhile, please don't rely on any class from the org.topbraid.spin packages directly.

Feedback and questions should go to TopBraid Users mailing list: https://groups.google.com/forum/#!forum/topbraid-users Please prefix your messages with [SHACL API]

To get started, look at the classes ModelConstraintValidator and ResourceConstraintValidator in the package org.topbraid.shacl.constraints. There is also an Example Test Case

Running

This fork includes a simple validator that reads model from stdin and returns with a nonzero exit code if validation fails (if the validation results model is non-empty).

To compile:

./build

To run:

cat ./src/test/resources/sh/tests/core/property/class-001.test.ttl | java -jar ./target/shacl-0.0.1-SNAPSHOT-jar-with-dependencies.jar

Merging in upstream changes

Use

./merge-in-upstream-changes

About

An open source implementation of the evolving W3C Shapes Constraint Language (SHACL) based on the Jena API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 99.8%
  • Other 0.2%