Try to understand how RDF data structure verification works in Apache Jena.
Two possibilities are investigated in this project:
- via Apache Jena Fuseki, a SPARQL server
- via Apache Jena API, a Java API
data/data.ttl
: sample data with 3 users (Tutankhamen
,Leonardo da Vinci
,Julius Ceasar
) and 1 project (Tutankhamen
has a project)data/schema_shacl.ttl
: schema defining data structure
Via server configuration according to Integration with Apache Jena Fuseki
Java code is in src/Shacl_validate.java
, based on an official example from GitHub
Ongoing
Successfully validated, the report is below:
Conforms
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[ rdf:type sh:ValidationReport ;
sh:conforms true
] .
Process finished with exit code 0