Docker image with SHACL API installed
309
Get the docker image by running the following command in a Powershell:
docker image pull semmtech/shacl-api
In the Powershell, go to the folder containing your data and shape files. From here a shacl validation or inferencing can now be done by running the following command (fill in the names of your datafile and shapesfile):
docker container run --rm -v "$(pwd):/tmp/" semmtech/shacl-api shaclinfer -datafile /tmp/data_file_name.ttl -shapesfile /tmp/shape_file_name.ttl > output.ttl
--rm causes Docker to automatically remove the container when it exits
-v is a mechanism for persisting data used by Docker containers
$(pwd) returns the current working directory)Remark: Using the > will pipe the output of the shaclinfer to a file (output.ttl) on the host machine and not in the container!
The SHACL API also offers the shaclvalidate functionality.
docker container run --rm -v "$(pwd):/tmp/" semmtech/shacl-api shaclvalidate -datafile tmp/data_input.ttl -shapesfile tmp/shape_input.ttl > output.ttl
In case your file name has a whitespace you should put your filename between quotation marks (").
Finally, if you are testing if your SHACL query is working you can leave out > output.ttl at the end, then the output will be directly printed in the shell.
For more information about the SHACL API, see TopBraid SHACL API.
Content type
Image
Digest
Size
205.9 MB
Last updated
over 5 years ago
docker pull semmtech/shacl-api