-
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.
Add SHACL files for tasks, profiles, categories
Issue: RiverBench/RiverBench#66
- Loading branch information
1 parent
2bdfa2c
commit 472251a
Showing
4 changed files
with
244 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,58 @@ | ||
@prefix : <https://w3id.org/riverbench/schema/dataset-shacl#> . | ||
@prefix sh: <http://www.w3.org/ns/shacl#> . | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
@prefix schema: <http://schema.org/> . | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
|
||
@prefix dcat: <http://www.w3.org/ns/dcat#> . | ||
@prefix dcterms: <http://purl.org/dc/terms/> . | ||
@prefix foaf: <http://xmlns.com/foaf/0.1/> . | ||
@prefix rb: <https://w3id.org/riverbench/schema/metadata#> . | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
@prefix skos: <http://www.w3.org/2004/02/skos/core#> . | ||
@prefix stax: <https://w3id.org/stax/ontology#> . | ||
@prefix spdx: <http://spdx.org/rdf/terms#> . | ||
@prefix void: <http://rdfs.org/ns/void#> . | ||
|
||
# Exactly one category per file | ||
:CategoryGraphShape | ||
a sh:NodeShape ; | ||
sh:targetNode rb:Category ; | ||
sh:property [ | ||
sh:path [ sh:inversePath rdf:type ] ; | ||
sh:minCount 1 ; | ||
sh:maxCount 1 ; | ||
] | ||
. | ||
|
||
:CategoryShape | ||
a sh:NodeShape ; | ||
sh:targetNode <https://w3id.org/riverbench/temp#category> ; | ||
sh:property [ | ||
sh:path rdf:type ; | ||
sh:minCount 1 ; | ||
sh:maxCount 1 ; | ||
sh:hasValue rb:Category ; | ||
] , [ | ||
sh:path dcterms:conformsTo ; | ||
sh:minCount 1 ; | ||
sh:maxCount 1 ; | ||
sh:hasValue <https://w3id.org/riverbench/schema/metadata> ; | ||
] , [ | ||
sh:path dcterms:identifier ; | ||
sh:minCount 1 ; | ||
sh:maxCount 1 ; | ||
sh:datatype xsd:string ; | ||
] , [ | ||
sh:path dcterms:title ; | ||
sh:minCount 1 ; | ||
sh:datatype rdf:langString ; | ||
sh:uniqueLang true ; | ||
] , [ | ||
sh:path dcterms:description ; | ||
sh:minCount 1 ; | ||
sh:datatype rdf:langString ; | ||
sh:uniqueLang true ; | ||
] | ||
. |
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
@prefix : <https://w3id.org/riverbench/schema/dataset-shacl#> . | ||
@prefix sh: <http://www.w3.org/ns/shacl#> . | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
@prefix schema: <http://schema.org/> . | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
|
||
@prefix dcat: <http://www.w3.org/ns/dcat#> . | ||
@prefix dcterms: <http://purl.org/dc/terms/> . | ||
@prefix foaf: <http://xmlns.com/foaf/0.1/> . | ||
@prefix rb: <https://w3id.org/riverbench/schema/metadata#> . | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
@prefix skos: <http://www.w3.org/2004/02/skos/core#> . | ||
@prefix stax: <https://w3id.org/stax/ontology#> . | ||
@prefix spdx: <http://spdx.org/rdf/terms#> . | ||
@prefix void: <http://rdfs.org/ns/void#> . | ||
|
||
# Shape file to validate entire profile collections. | ||
|
||
# At least one profile per collection | ||
:ProfileGraphShape | ||
a sh:NodeShape ; | ||
sh:targetNode rb:Profile ; | ||
sh:property [ | ||
sh:path [ sh:inversePath rdf:type ] ; | ||
sh:minCount 1 ; | ||
] | ||
. | ||
|
||
# Profile shape | ||
:ProfileShape | ||
a sh:NodeShape ; | ||
sh:targetClass rb:Profile ; | ||
# Check if the children profiles exist | ||
sh:property [ | ||
sh:path rb:isSupersetOfProfile ; | ||
sh:nodeKind sh:IRI ; | ||
sh:node [ | ||
sh:property [ | ||
sh:path rdf:type ; | ||
sh:hasValue rb:Profile ; | ||
] | ||
] | ||
] | ||
. |
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 |
---|---|---|
@@ -0,0 +1,79 @@ | ||
@prefix : <https://w3id.org/riverbench/schema/dataset-shacl#> . | ||
@prefix sh: <http://www.w3.org/ns/shacl#> . | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
@prefix schema: <http://schema.org/> . | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
|
||
@prefix dcat: <http://www.w3.org/ns/dcat#> . | ||
@prefix dcterms: <http://purl.org/dc/terms/> . | ||
@prefix foaf: <http://xmlns.com/foaf/0.1/> . | ||
@prefix rb: <https://w3id.org/riverbench/schema/metadata#> . | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
@prefix skos: <http://www.w3.org/2004/02/skos/core#> . | ||
@prefix stax: <https://w3id.org/stax/ontology#> . | ||
@prefix spdx: <http://spdx.org/rdf/terms#> . | ||
@prefix void: <http://rdfs.org/ns/void#> . | ||
|
||
# Shape file to validate single profile files. | ||
# See also profile-collection.ttl for shapes to validate profile collections, | ||
# i.e., all profiles in a benchmark category. | ||
|
||
# Exactly one profile per file | ||
:ProfileGraphShape | ||
a sh:NodeShape ; | ||
sh:targetNode rb:Profile ; | ||
sh:property [ | ||
sh:path [ sh:inversePath rdf:type ] ; | ||
sh:minCount 1 ; | ||
sh:maxCount 1 ; | ||
] | ||
. | ||
|
||
# We can't easily validate this in SHACL... but the ID should match the filename | ||
# and URI. | ||
:ProfileShape | ||
a sh:NodeShape ; | ||
sh:targetClass rb:Profile ; | ||
sh:property [ | ||
sh:path rdf:type ; | ||
sh:minCount 1 ; | ||
sh:hasValue dcat:DatasetSeries ; | ||
] , [ | ||
sh:path dcterms:identifier ; | ||
sh:minCount 1 ; | ||
sh:maxCount 1 ; | ||
sh:datatype xsd:string ; | ||
] , [ | ||
sh:path dcterms:title ; | ||
sh:minCount 1 ; | ||
sh:datatype rdf:langString ; | ||
sh:uniqueLang true ; | ||
] , [ | ||
sh:path dcterms:description ; | ||
sh:minCount 1 ; | ||
sh:datatype rdf:langString ; | ||
sh:uniqueLang true ; | ||
] , [ | ||
sh:path rb:hasDatasetShape ; | ||
sh:minCount 1 ; | ||
sh:maxCount 1 ; | ||
sh:node [ | ||
sh:property [ | ||
sh:path sh:targetClass ; | ||
sh:minCount 1 ; | ||
sh:maxCount 1 ; | ||
sh:hasValue rb:Dataset ; | ||
] , [ | ||
sh:path sh:property ; | ||
sh:minCount 1 ; | ||
sh:nodeKind sh:BlankNodeOrIRI ; | ||
] | ||
] | ||
] , [ | ||
sh:path rb:hasDistributionShape ; | ||
sh:minCount 1 ; | ||
sh:maxCount 1 ; | ||
sh:nodeKind sh:BlankNodeOrIRI ; | ||
] | ||
. |
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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
@prefix : <https://w3id.org/riverbench/schema/dataset-shacl#> . | ||
@prefix sh: <http://www.w3.org/ns/shacl#> . | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
@prefix schema: <http://schema.org/> . | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
|
||
@prefix dcat: <http://www.w3.org/ns/dcat#> . | ||
@prefix dcterms: <http://purl.org/dc/terms/> . | ||
@prefix foaf: <http://xmlns.com/foaf/0.1/> . | ||
@prefix rb: <https://w3id.org/riverbench/schema/metadata#> . | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
@prefix skos: <http://www.w3.org/2004/02/skos/core#> . | ||
@prefix stax: <https://w3id.org/stax/ontology#> . | ||
@prefix spdx: <http://spdx.org/rdf/terms#> . | ||
@prefix void: <http://rdfs.org/ns/void#> . | ||
|
||
# Exactly one task per file | ||
:TaskGraphShape | ||
a sh:NodeShape ; | ||
sh:targetNode rb:Task ; | ||
sh:property [ | ||
sh:path [ sh:inversePath rdf:type ] ; | ||
sh:minCount 1 ; | ||
sh:maxCount 1 ; | ||
] | ||
. | ||
|
||
:TaskShape | ||
a sh:NodeShape ; | ||
sh:targetNode <https://w3id.org/riverbench/temp#task> ; | ||
sh:property [ | ||
sh:path rdf:type ; | ||
sh:minCount 1 ; | ||
sh:maxCount 1 ; | ||
sh:hasValue rb:Task ; | ||
] , [ | ||
sh:path dcterms:conformsTo ; | ||
sh:minCount 1 ; | ||
sh:maxCount 1 ; | ||
sh:hasValue <https://w3id.org/riverbench/schema/metadata> ; | ||
] , [ | ||
sh:path dcterms:identifier ; | ||
sh:minCount 1 ; | ||
sh:maxCount 1 ; | ||
sh:datatype xsd:string ; | ||
] , [ | ||
sh:path dcterms:title ; | ||
sh:minCount 1 ; | ||
sh:datatype rdf:langString ; | ||
sh:uniqueLang true ; | ||
] , [ | ||
sh:path dcterms:description ; | ||
sh:minCount 1 ; | ||
sh:datatype rdf:langString ; | ||
sh:uniqueLang true ; | ||
] , [ | ||
sh:path dcterms:creator ; | ||
sh:minCount 1 ; | ||
sh:nodeKind sh:BlankNodeOrIRI ; | ||
] | ||
. |