1+ # Copyright (c) 2025 eScience Lab, The University of Manchester
2+ #
3+ # Licensed under the Apache License, Version 2.0 (the "License");
4+ # you may not use this file except in compliance with the License.
5+ # You may obtain a copy of the License at
6+ #
7+ # http://www.apache.org/licenses/LICENSE-2.0
8+ #
9+ # Unless required by applicable law or agreed to in writing, software
10+ # distributed under the License is distributed on an "AS IS" BASIS,
11+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ # See the License for the specific language governing permissions and
13+ # limitations under the License.
14+
15+ @prefix ro: <./> .
16+ @prefix ro-crate: <https://github.com/crs4/rocrate-validator/profiles/ro-crate/> .
17+ @prefix five-safes-crate: <https://github.com/eScienceLab/rocrate-validator/profiles/five-safes-crate/> .
18+ @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
19+ @prefix schema: <http://schema.org/> .
20+ @prefix purl: <http://purl.org/dc/terms/> .
21+ @prefix sh: <http://www.w3.org/ns/shacl#> .
22+ @prefix validator: <https://github.com/crs4/rocrate-validator/> .
23+ @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
24+
25+
26+ five-safes-crate:WorkflowMustHaveDescriptiveName
27+ a sh:NodeShape ;
28+ sh:name " WorkflowExecution" ;
29+ sh:targetClass schema:CreateAction ;
30+
31+ sh:property [
32+ sh:a sh:PropertyShape ;
33+ sh:name " name" ;
34+ sh:minCount 1 ;
35+ sh:description " Workflow (CreateAction) MUST have a name string of at least 10 characters." ;
36+ sh:path schema:name ;
37+ sh:datatype xsd:string ;
38+ sh:minLength 10 ;
39+ sh:severity sh:Violation ;
40+ sh:message " Workflow (CreateAction) MUST have a name string of at least 10 characters." ;
41+ ] .
42+
43+
44+ five-safes-crate:WorkflowexecutionObjectHasCompliantStartTimeFormat
45+ a sh:NodeShape ;
46+ sh:name " WorkflowExecution" ;
47+ sh:description " The startTime of the workflow execution object MUST follow the RFC 3339 standard (YYYY-MM-DD'T'hh:mm:ss[.fraction](Z | ±hh:mm))." ;
48+ sh:targetClass schema:CreateAction ;
49+
50+ sh:property [
51+ a sh:PropertyShape ;
52+ sh:name " StartTime" ;
53+ sh:path schema:startTime ;
54+ sh:minCount 0 ;
55+ sh:pattern " ^[0-9]{4}-[0-9]{2}-[0-9]{2}[Tt][0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]+)?(Z|z|[+-][0-9]{2}:[0-9]{2})$" ;
56+ sh:severity sh:Violation ;
57+ sh:message " The startTime of the workflow execution object MUST follow the RFC 3339 standard (YYYY-MM-DD'T'hh:mm:ss[.fraction](Z | ±hh:mm))." ;
58+ ] .
59+
60+
61+ five-safes-crate:WorkflowexecutionObjectHasCompliantEndTimeFormat
62+ a sh:NodeShape ;
63+ sh:name " WorkflowExecution" ;
64+ sh:description " The endTime of the workflow execution object MUST follow the RFC 3339 standard (YYYY-MM-DD'T'hh:mm:ss[.fraction](Z | ±hh:mm))." ;
65+ sh:targetClass schema:CreateAction ;
66+
67+ sh:property [
68+ a sh:PropertyShape ;
69+ sh:name " EndTime" ;
70+ sh:path schema:endTime ;
71+ sh:minCount 0 ;
72+ sh:pattern " ^[0-9]{4}-[0-9]{2}-[0-9]{2}[Tt][0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]+)?(Z|z|[+-][0-9]{2}:[0-9]{2})$" ;
73+ sh:severity sh:Violation ;
74+ sh:message " The endTime of the workflow execution object MUST follow the RFC 3339 standard (YYYY-MM-DD'T'hh:mm:ss[.fraction](Z | ±hh:mm))." ;
75+ ] .
76+
77+
78+ five-safes-crate:WorkflowMustHaveActionStatusWithAllowedValues
79+ a sh:NodeShape ;
80+ sh:name " WorkflowExecution" ;
81+ sh:targetClass schema:CreateAction ;
82+ sh:property [
83+ a sh:PropertyShape ;
84+ sh:minCount 1 ;
85+ sh:name " actionStatus" ;
86+ sh:description " WorkflowExecution MUST have an actionStatus with an allowed value (see https://schema.org/ActionStatusType)." ;
87+ sh:path schema:actionStatus ;
88+ sh:in (
89+ " http://schema.org/PotentialActionStatus"
90+ " http://schema.org/ActiveActionStatus"
91+ " http://schema.org/CompletedActionStatus"
92+ " http://schema.org/FailedActionStatus"
93+ ) ;
94+ sh:severity sh:Violation ;
95+ sh:message " WorkflowExecution MUST have an actionStatus with an allowed value (see https://schema.org/ActionStatusType)." ;
96+ ] .
0 commit comments