-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from SHACL-X/py-ext
Add SHACL-Py implementation
- Loading branch information
Showing
72 changed files
with
3,822 additions
and
764 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,19 @@ | ||
 | ||
 | ||
|
||
# TopBraid SHACL API | ||
# TopBraid SHACL API Extended | ||
|
||
**An open source implementation of the W3C Shapes Constraint Language (SHACL) based on Apache Jena.** | ||
**This is a fork of the [TopBraid SHACL API](https://github.com/TopQuadrant/shacl), an open source implementation of the W3C Shapes Constraint Language (SHACL) based on Apache Jena.** | ||
|
||
Contact: Holger Knublauch ([email protected]) | ||
Starting from [SHACL API v1.4.0](https://github.com/TopQuadrant/shacl/releases/tag/v1.4.0), the SHACL-JS support was removed to avoid Nashorn issues. | ||
|
||
This fork brings the SHACL JavaScript Extensions (SHACL-JS) features back by leveraging GraalVM and its Polyglot APIs. Not only the SHACL-JS features are brought back but new extensions are introduced, such as the SHACL Python Extensions (SHACL-Py). | ||
|
||
Can be used to perform SHACL constraint checking and rule inferencing in any Jena-based Java application. | ||
This API also serves as a reference implementation of the SHACL spec. | ||
|
||
Coverage: | ||
* [SHACL Core and SHACL-SPARQL validation](https://www.w3.org/TR/shacl/) | ||
* [SHACL Advanced Features (Rules etc)](https://www.w3.org/TR/shacl-af/) | ||
* [SHACL JavaScript Extensions](https://www.w3.org/TR/shacl-js/) | ||
* [SHACL Compact Syntax](https://w3c.github.io/shacl/shacl-compact-syntax/) | ||
* [SHACL JavaScript Extensions](https://www.w3.org/TR/shacl-js/) | ||
* SHACL Python Extensions | ||
|
||
See [SHACL-JS](https://github.com/TopQuadrant/shacl-js) for a pure JavaScript implementation. | ||
|
||
The same code is used in the TopBraid products (currently aligned with the TopBraid 6.3 release). | ||
|
||
Feedback and questions should become GitHub issues or sent 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 class ValidationUtil in | ||
the package org.topbraid.shacl.validation. | ||
There is also an [Example Test Case](../master/src/test/java/org/topbraid/shacl/ValidationExample.java) | ||
|
||
## Application dependency | ||
|
||
Releases are available in the central maven repository: | ||
|
||
``` | ||
<dependency> | ||
<groupId>org.topbraid</groupId> | ||
<artifactId>shacl</artifactId> | ||
<version>*VER*</version> | ||
</dependency> | ||
``` | ||
## Command Line Usage | ||
|
||
Download the latest release from: | ||
|
||
`https://repo1.maven.org/maven2/org/topbraid/shacl/` | ||
|
||
The binary distribution is: | ||
|
||
`https://repo1.maven.org/maven2/org/topbraid/shacl/*VER*/shacl-*VER*-bin.zip`. | ||
|
||
Two command line utilities are included: validate (performs constraint validation) and infer (performs SHACL rule inferencing). | ||
|
||
To use them, set up your environment similar to https://jena.apache.org/documentation/tools/ (note that the SHACL download includes Jena). | ||
|
||
For example, on Windows: | ||
|
||
``` | ||
SET SHACLROOT=C:\Users\Holger\Desktop\shacl-1.0.0-bin | ||
SET PATH=%PATH%;%SHACLROOT%\bin | ||
``` | ||
|
||
As another example, for Linux, add to .bashrc these lines: | ||
|
||
``` | ||
# for shacl | ||
export SHACLROOT=/home/holger/shacl/shacl-1.0.0-bin/shacl-1.0.0/bin | ||
export PATH=$SHACLROOT:$PATH | ||
``` | ||
|
||
Both tools take the following parameters, for example: | ||
|
||
`shaclvalidate.bat -datafile myfile.ttl -shapesfile myshapes.ttl` | ||
|
||
where `-shapesfile` is optional and falls back to using the data graph as shapes graph. | ||
|
||
Currently only Turtle (.ttl) files and SHACL Compact Syntax (.shaclc) files are supported. | ||
|
||
The tools print the validation report or the inferences graph to the output screen. | ||
Contact: Ashley Caselli ([[email protected]](mailto:[email protected])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,19 +21,14 @@ | |
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>org.topbraid</groupId> | ||
<artifactId>shacl</artifactId> | ||
<groupId>io.github.shacl-x</groupId> | ||
<artifactId>shacl-x</artifactId> | ||
<version>1.3.3-SNAPSHOT</version> | ||
<packaging>jar</packaging> | ||
|
||
<name>TopBraid SHACL API</name> | ||
<description>TopBraid SHACL API</description> | ||
<url>http://topbraid.org/shacl/api</url> | ||
|
||
<organization> | ||
<name>TopQuadrant, Inc.</name> | ||
<url>http://topquadrant.com</url> | ||
</organization> | ||
<name>SHACL eXtended (SHACL-X)</name> | ||
<description>This SHACL implementation is an extension of the TopBraid SHACL API</description> | ||
<url>https://shacl-x.github.io/docs/</url> | ||
|
||
<licenses> | ||
<license> | ||
|
@@ -44,29 +39,25 @@ | |
</licenses> | ||
|
||
<issueManagement> | ||
<url>https://github.com/TopQuadrant/shacl/issues</url> | ||
<url>https://github.com/shacl-x/shacl-x/issues</url> | ||
</issueManagement> | ||
|
||
<developers> | ||
<developer> | ||
<name>Ashley Caselli</name> | ||
<organization>University of Geneva</organization> | ||
</developer> | ||
<developer> | ||
<name>Holger Knublauch</name> | ||
</developer> | ||
</developers> | ||
|
||
<contributors> | ||
<contributor> | ||
<!-- Github contributors page --> | ||
<url>https://github.com/TopQuadrant/shacl/graphs/contributors</url> | ||
<url>https://github.com/shacl-x/shacl-x/graphs/contributors</url> | ||
</contributor> | ||
</contributors> | ||
|
||
<scm> | ||
<url>https://github.com/TopQuadrant/shacl</url> | ||
<connection>scm:git:https://github.com/TopQuadrant/shacl</connection> | ||
<developerConnection>scm:git:[email protected]:TopQuadrant/shacl.git</developerConnection> | ||
<tag>shacl-1.3.2</tag> | ||
</scm> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<ver.jena>3.17.0</ver.jena> | ||
|
@@ -76,6 +67,7 @@ | |
<ver.log4j1>1.2.17</ver.log4j1> | ||
<ver.graalvm>23.1.2</ver.graalvm> | ||
<ver.graalvm-js>23.1.2</ver.graalvm-js> | ||
<ver.graalvm-py>23.1.1</ver.graalvm-py> | ||
</properties> | ||
|
||
<dependencies> | ||
|
@@ -92,6 +84,14 @@ | |
<type>pom</type> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.graalvm.polyglot</groupId> | ||
<artifactId>python</artifactId> | ||
<version>${ver.graalvm-py}</version> | ||
<scope>runtime</scope> | ||
<type>pom</type> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.jena</groupId> | ||
<artifactId>jena-arq</artifactId> | ||
|
@@ -120,7 +120,7 @@ | |
<!-- Logging : <optional> so the application chooses the provider for slf4j --> | ||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-log4j12</artifactId> | ||
<artifactId>slf4j-reload4j</artifactId> | ||
<version>${ver.slf4j}</version> | ||
<optional>true</optional> | ||
<scope>test</scope> | ||
|
Oops, something went wrong.