diff --git a/rocrate_validator/profiles/five-safes-crate/should/4_sign_off.ttl b/rocrate_validator/profiles/five-safes-crate/4_sign_off.ttl
similarity index 61%
rename from rocrate_validator/profiles/five-safes-crate/should/4_sign_off.ttl
rename to rocrate_validator/profiles/five-safes-crate/4_sign_off.ttl
index 129c02df..13a89083 100644
--- a/rocrate_validator/profiles/five-safes-crate/should/4_sign_off.ttl
+++ b/rocrate_validator/profiles/five-safes-crate/4_sign_off.ttl
@@ -17,17 +17,91 @@
@prefix five-safes-crate: .
@prefix rdf: .
@prefix schema: .
+@prefix purl: .
@prefix sh: .
@prefix validator: .
@prefix xsd: .
-@prefix shp: .
+#=== MUST shapes ===#
+
+five-safes-crate:SignOffObjectActionAndName
+ a sh:NodeShape ;
+ sh:name "SignOff" ;
+ sh:description "Sign Off phase" ;
+
+ sh:target [
+ a sh:SPARQLTarget ;
+ sh:select """
+ PREFIX schema:
+ PREFIX shp:
+ SELECT ?this
+ WHERE {
+ ?this schema:additionalType shp:SignOff .
+ }
+ """ ;
+ ] ;
+
+ sh:property [
+ sh:path schema:name ;
+ sh:datatype xsd:string ;
+ sh:minCount 1 ;
+ sh:severity sh:Violation ;
+ sh:message "Sign Off phase MUST have a human-readable name string." ;
+ ] ;
+
+ sh:property [
+ sh:path rdf:type ;
+ sh:minCount 1 ;
+ sh:hasValue schema:AssessAction;
+ sh:severity sh:Violation ;
+ sh:message "Sign Off phase MUST be a `AssessAction`." ;
+ ] .
+
+five-safes-crate:SignOffObjectHasActionStatus
+ a sh:NodeShape ;
+ sh:name "SignOffStatus" ;
+ sh:description "Sign Off Phase Action Status" ;
+
+ sh:target [
+ a sh:SPARQLTarget ;
+ sh:select """
+ PREFIX schema:
+ PREFIX shp:
+ SELECT ?this
+ WHERE {
+ ?this schema:additionalType shp:SignOff ;
+ schema:actionStatus ?status .
+ }
+ """ ;
+ ] ;
+
+ sh:property [
+ a sh:PropertyShape ;
+ sh:name "actionStatus" ;
+ sh:description "The value of actionStatus MUST be one of the allowed values." ;
+ sh:path schema:actionStatus ;
+ sh:in (
+ "http://schema.org/PotentialActionStatus"
+ "http://schema.org/ActiveActionStatus"
+ "http://schema.org/CompletedActionStatus"
+ "http://schema.org/FailedActionStatus"
+ ) ;
+ sh:severity sh:Violation ;
+ sh:message "The value of actionStatus MUST be one of the allowed values: PotentialActionStatus; ActiveActionStatus; CompletedActionStatus; FailedActionStatus." ;
+ ] .
+
+
+#=== SHOULD shapes ===#
+
# There SHOULD be a Sign-Off Phase
five-safes-crate:SignOffPhase
a sh:NodeShape ;
sh:targetClass ro-crate:RootDataEntity ;
sh:description "Check the Sign-Off Phase" ;
+ sh:severity sh:Warning ;
+ sh:name "SignOffPhase" ;
+
sh:sparql [
sh:select """
PREFIX schema:
@@ -39,7 +113,6 @@ five-safes-crate:SignOffPhase
}
}
""" ;
- sh:severity sh:Warning ;
sh:message "There SHOULD be a Sign-Off Phase in the Final RO-Crate" ;
] ;
sh:sparql [
@@ -54,7 +127,6 @@ five-safes-crate:SignOffPhase
}
}
""" ;
- sh:severity sh:Warning ;
sh:message "The Root Data Entity SHOULD mention a Sign-Off Phase Object" ;
] .
@@ -62,6 +134,7 @@ five-safes-crate:SignOffPhase
five-safes-crate:SignOffPhaseProperties
a sh:NodeShape ;
sh:description "Check Sign-Off Phase Properties" ;
+ sh:name "SignOffPhaseProperties" ;
sh:target [
a sh:SPARQLTarget ;
sh:select """
@@ -103,7 +176,27 @@ five-safes-crate:SignOffPhaseProperties
sh:minCount 1 ;
sh:severity sh:Warning ;
sh:message "The Sign-Off Phase SHOULD have an TRE policy (instrument) with a human-readable name" ;
+ ] .
+
+
+five-safes-crate:SignOffPhaseProperties2
+ a sh:NodeShape ;
+ sh:description "Check Sign-Off Phase Properties" ;
+ sh:severity sh:Warning ;
+ sh:name "SignOffPhaseProperties" ;
+
+ sh:target [
+ a sh:SPARQLTarget ;
+ sh:select """
+ PREFIX schema:
+ PREFIX shp:
+ SELECT ?this
+ WHERE {
+ ?this schema:additionalType shp:SignOff .
+ }
+ """
] ;
+
sh:sparql [
a sh:SPARQLConstraint ;
sh:description "Check if the Sign Off phase lists the workflow as an object" ;
@@ -120,9 +213,9 @@ five-safes-crate:SignOffPhaseProperties
}
}
""" ;
- sh:severity sh:Warning ;
sh:message "The Sign-Off Phase SHOULD list the workflow (mainEntity) as an object" ;
];
+
sh:sparql [
a sh:SPARQLConstraint ;
sh:description "Check if the Sign Off phase lists the Responsible Project as an object" ;
@@ -139,7 +232,6 @@ five-safes-crate:SignOffPhaseProperties
}
}
""" ;
- sh:severity sh:Warning ;
sh:message "The Sign-Off Phase SHOULD list the Responsible Project (sourceOrganization) as an object" ;
].
@@ -147,6 +239,7 @@ five-safes-crate:SignOffPhaseProperties
five-safes-crate:SignOffPhaseEndTime
a sh:NodeShape ;
sh:description "Sign Off end time check" ;
+ sh:name "SignOffPhaseEndTime" ;
sh:target [
a sh:SPARQLTarget ;
@@ -175,3 +268,40 @@ five-safes-crate:SignOffPhaseEndTime
sh:description "Sign Off object SHOULD have endTime property if action completed or failed." ;
sh:message "Sign Off object SHOULD have endTime property if action completed or failed." ;
] .
+
+
+#=== MAY shapes ===#
+
+five-safes-crate:SignOffPhaseStartTime
+ a sh:NodeShape ;
+ sh:name "SignOffPhaseStartTime" ;
+
+ sh:target [
+ a sh:SPARQLTarget ;
+ sh:select """
+ PREFIX schema:
+ PREFIX shp:
+ SELECT ?this
+ WHERE {
+ ?this schema:additionalType shp:SignOff ;
+ schema:actionStatus ?status .
+ FILTER(?status IN (
+ "http://schema.org/ActiveActionStatus",
+ "http://schema.org/CompletedActionStatus",
+ "http://schema.org/FailedActionStatus"
+ ))
+ }
+ """ ;
+ ] ;
+
+ sh:property [
+ a sh:PropertyShape ;
+ sh:name "StartTime" ;
+ sh:path schema:startTime ;
+ sh:minCount 1 ;
+ sh:maxCount 1 ;
+ 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})$" ;
+ sh:severity sh:Info ;
+ sh:description "Sign Off object MAY have a startTime property if action is active, completed or failed." ;
+ sh:message "Sign Off object MAY have a startTime property if action is active, completed or failed." ;
+ ] .
diff --git a/rocrate_validator/profiles/five-safes-crate/may/4_sign_off.ttl b/rocrate_validator/profiles/five-safes-crate/may/4_sign_off.ttl
deleted file mode 100644
index 3890e2b3..00000000
--- a/rocrate_validator/profiles/five-safes-crate/may/4_sign_off.ttl
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright (c) 2025 eScience Lab, The University of Manchester
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-@prefix ro: <./> .
-@prefix ro-crate: .
-@prefix five-safes-crate: .
-@prefix rdf: .
-@prefix schema: .
-@prefix sh: .
-@prefix validator: .
-@prefix xsd: .
-@prefix shp: .
-
-
-five-safes-crate:SignOffPhaseStartTime
- a sh:NodeShape ;
- sh:name "SignOffPhaseStartTime" ;
-
- sh:target [
- a sh:SPARQLTarget ;
- sh:select """
- PREFIX schema:
- PREFIX shp:
- SELECT ?this
- WHERE {
- ?this schema:additionalType shp:SignOff ;
- schema:actionStatus ?status .
- FILTER(?status IN (
- "http://schema.org/ActiveActionStatus",
- "http://schema.org/CompletedActionStatus",
- "http://schema.org/FailedActionStatus"
- ))
- }
- """ ;
- ] ;
-
- sh:property [
- a sh:PropertyShape ;
- sh:name "StartTime" ;
- sh:path schema:startTime ;
- sh:minCount 1 ;
- sh:maxCount 1 ;
- 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})$" ;
- sh:severity sh:Info ;
- sh:description "Sign Off object MAY have a startTime property if action is active, completed or failed." ;
- sh:message "Sign Off object MAY have a startTime property if action is active, completed or failed." ;
- ] .
diff --git a/rocrate_validator/profiles/five-safes-crate/must/4_sign_off.ttl b/rocrate_validator/profiles/five-safes-crate/must/4_sign_off.ttl
deleted file mode 100644
index dfbd85d0..00000000
--- a/rocrate_validator/profiles/five-safes-crate/must/4_sign_off.ttl
+++ /dev/null
@@ -1,89 +0,0 @@
-# Copyright (c) 2025 eScience Lab, The University of Manchester
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-@prefix ro: <./> .
-@prefix ro-crate: .
-@prefix five-safes-crate: .
-@prefix rdf: .
-@prefix schema: .
-@prefix purl: .
-@prefix sh: .
-@prefix validator: .
-@prefix xsd: .
-
-five-safes-crate:SignOffObjectActionAndName
- a sh:NodeShape ;
- sh:name "SignOff" ;
- sh:description "Sign Off phase" ;
-
- sh:target [
- a sh:SPARQLTarget ;
- sh:select """
- PREFIX schema:
- PREFIX shp:
- SELECT ?this
- WHERE {
- ?this schema:additionalType shp:SignOff .
- }
- """ ;
- ] ;
-
- sh:property [
- sh:path schema:name ;
- sh:datatype xsd:string ;
- sh:minCount 1 ;
- sh:severity sh:Violation ;
- sh:message "Sign Off phase MUST have a human-readable name string." ;
- ] ;
-
- sh:property [
- sh:path rdf:type ;
- sh:minCount 1 ;
- sh:hasValue schema:AssessAction;
- sh:severity sh:Violation ;
- sh:message "Sign Off phase MUST be a `AssessAction`." ;
- ] .
-
-five-safes-crate:SignOffObjectHasActionStatus
- a sh:NodeShape ;
- sh:name "SignOffStatus" ;
- sh:description "Sign Off Phase Action Status" ;
-
- sh:target [
- a sh:SPARQLTarget ;
- sh:select """
- PREFIX schema:
- PREFIX shp:
- SELECT ?this
- WHERE {
- ?this schema:additionalType shp:SignOff ;
- schema:actionStatus ?status .
- }
- """ ;
- ] ;
-
- sh:property [
- a sh:PropertyShape ;
- sh:name "actionStatus" ;
- sh:description "The value of actionStatus MUST be one of the allowed values." ;
- sh:path schema:actionStatus ;
- sh:in (
- "http://schema.org/PotentialActionStatus"
- "http://schema.org/ActiveActionStatus"
- "http://schema.org/CompletedActionStatus"
- "http://schema.org/FailedActionStatus"
- ) ;
- sh:severity sh:Violation ;
- sh:message "The value of actionStatus MUST be one of the allowed values: PotentialActionStatus; ActiveActionStatus; CompletedActionStatus; FailedActionStatus." ;
- ] .