Skip to content

Commit 7c2c950

Browse files
authored
Merge pull request #90 from eScienceLab/73-flatten-6_workflow_referencettl-files
Merged 6_workflow_reference.tll files.
2 parents 38bed9f + 02c494f commit 7c2c950

2 files changed

Lines changed: 33 additions & 49 deletions

File tree

rocrate_validator/profiles/five-safes-crate/must/6_workflow_reference.ttl renamed to rocrate_validator/profiles/five-safes-crate/6_workflow_reference.ttl

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
2424

2525

26+
#=== MUST shapes ===#
2627

2728
five-safes-crate:ReferenceToWorkflowCrate
2829
a sh:NodeShape ;
@@ -74,3 +75,35 @@ five-safes-crate:mainEntityHasProperConformsTo
7475
sh:severity sh:Violation ;
7576
sh:message "conformsTo IRI must start with https://w3id.org/workflowhub/workflow-ro-crate" ;
7677
] .
78+
79+
80+
#=== SHOULD shapes ===#
81+
82+
five-safes-crate:DatasetMustHaveDistributionIfURI
83+
a sh:NodeShape ;
84+
sh:name "mainEntity" ;
85+
sh:targetObjectsOf schema:mainEntity ;
86+
sh:description "If mainEntity has an HTTP(S) @id, it SHOULD have a distribution that is an HTTP(S) URL." ;
87+
sh:severity sh:Warning ;
88+
89+
sh:sparql [
90+
a sh:SPARQLConstraint ;
91+
sh:name "distribution" ;
92+
sh:description "If mainEntity has an HTTP(S) @id, it SHOULD have a distribution that is an HTTP(S) URL." ;
93+
sh:prefixes ro-crate:sparqlPrefixes ;
94+
sh:select """
95+
SELECT $this
96+
WHERE {
97+
FILTER (STRSTARTS(STR($this), "http://") || STRSTARTS(STR($this), "https://")) .
98+
FILTER NOT EXISTS {
99+
$this schema:distribution ?dist .
100+
FILTER (STRSTARTS(STR(?dist), "http://") || STRSTARTS(STR(?dist), "https://")) .
101+
}
102+
}
103+
""" ;
104+
sh:message "If mainEntity has an HTTP(S) @id SHOULD have at least one distribution with an HTTP(S) URL." ;
105+
] .
106+
107+
108+
#=== MAY shapes ===#
109+
# (none)

rocrate_validator/profiles/five-safes-crate/should/6_workflow_reference.ttl

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)