shacl-play
shacl-play copied to clipboard
SHACL validation UI, SHACL documentation generator, SHACL generator from RDF.
SHACL Play!
SHACL validator and documentation generator live at https://shacl-play.sparna.fr
Cool things you can do with SHACL
With SHACL Play you can:
- validate an RDF dataset against a SHACL specification, and produce a human-readable report (
validatecommand) - generate an HTML documentation of your SHACL application profile (
doccommand), or a diagram (draw) - generate a SHACL from an RDF dataset (
generatecommand) - obtain the statistics of an RDF dataset from a SHACL specification (
analyzecommand) - generate SPARQL queries from a SHACL spec (
shacl2sparqlcommand)
and other cool things with SHACL Rules, too, like applying them for inference.
Check out Sparnatural, too
If you use SHACL you may be interested to know that the Sparnatural Knowledge Graph explorer uses a SHACL file for its configuration. Which means you can use the same SHACL file to document your dataset, validate data, and provide a query UI.
Running the application.
As a command-line
The easiest and recommended way to run the application is by using its command-line version. There is no need to locally install the online version. For this:
- Install Java 11
- Download the command-line app from the release section
- Refer to the command-line documentation
With Docker
The following docker commands should be sufficient to get you started.
First, build the image with:
docker build -t shacl-play:latest ./
Then, start the application on port 8080 with:
docker run -p 8080:8080 shacl-play:latest
Refer to docker documentation for advanced configuration.
Installing locally
Clone this respository:
git clone [email protected]:sparna-git/shacl-play.git
OSX
Install maven and tomcat (it must be the 9th version):
brew install maven tomcat@9
Go to the directory where this repository was cloned and build the project as a .war file:
mvn package
Copy the generated package into tomcat's webapp directory:
cp shacl-play/target/shacl-play-0.8.0.war /opt/homebrew/Cellar/tomcat@9/9.0.89/libexec/webapps
Start the tomcat server:
/opt/homebrew/Cellar/tomcat@9/9.0.89/bin/catalina start
Go to the default address http://localhost:8080/shacl-play-0.8.0/ to access SHACL.
Don't forget to stop the server once you don't need it anymore!
/opt/homebrew/Cellar/tomcat@9/9.0.89/bin/catalina stop
Linux
Install Maven and Tomcat (version 9) using your package manager, here's apt as an example:
sudo apt-get update
sudo apt-get install maven tomcat9
Navigate to the directory where the repository was cloned and build the project as a .war file:
mvn package
Copy the generated .war file into Tomcat's webapps directory:
sudo cp target/shacl-play-0.8.0.war /var/lib/tomcat9/webapps
Start the Tomcat server to deploy the application:
sudo systemctl start tomcat9
Access the SHACL-Play web application by navigating to http://localhost:8080/shacl-play-0.8.0/
Remember to stop the Tomcat server when it's no longer needed:
sudo systemctl stop tomcat9
Troubleshooting
If you're running into issues try to give read and write access to tomcat's SHACL directory, on Mac:
chmod 644 /opt/homebrew/Cellar/tomcat/10.1.24/libexec/webapps/shacl-play-0.8.0.war
Or Linux:
sudo chmod 644 /var/lib/tomcat9/webapps/shacl-play-0.8.0.war
Or stop and re-start the server.
You can also export tomcat's binary path to your .rc file and add a nickname to it, like tomcat.