diff --git a/rocrate_validator/profiles/five-safes-crate/may/14_workflow_retrieval_phase.ttl b/rocrate_validator/profiles/five-safes-crate/may/14_workflow_retrieval_phase.ttl
index d392c8fb..2a3c44d1 100644
--- a/rocrate_validator/profiles/five-safes-crate/may/14_workflow_retrieval_phase.ttl
+++ b/rocrate_validator/profiles/five-safes-crate/may/14_workflow_retrieval_phase.ttl
@@ -37,7 +37,6 @@ five-safes-crate:DownloadedWorkflowSHOULDExistAndBeReferencedByDownloadActionRes
sh:path schema:result ;
sh:minCount 1 ;
sh:nodeKind sh:IRI ;
-
sh:sparql [
a sh:SPARQLConstraint ;
sh:select """
@@ -54,9 +53,9 @@ five-safes-crate:DownloadedWorkflowSHOULDExistAndBeReferencedByDownloadActionRes
}
}
""" ;
- sh:severity sh:Info ;
- sh:message "The entity representing the downloaded workflow is not defined, OR is not referenced by `DownloadAction` --> `result`, OR is not of type `Dataset`." ;
] ;
+ sh:severity sh:Info ;
+ sh:message "The entity representing the downloaded workflow is not defined, OR is not referenced by `DownloadAction` --> `result`, OR is not of type `Dataset`." ;
] .
@@ -93,10 +92,10 @@ five-safes-crate:DownloadActionMayHaveStartTimeIfBegun
sh:path schema:startTime ;
sh:minCount 1 ;
sh:maxCount 1 ;
- sh:severity sh:Info ;
sh:description (
"`DownloadAction` MAY have the `startTime` property if `actionStatus` "
"is either ActiveActionStatus, CompletedActionStatus or FailedActionStatus."
);
+ sh:severity sh:Info ;
sh:message "`DownloadAction` MAY have the `startTime` property if `actionStatus` is either ActiveActionStatus, CompletedActionStatus or FailedActionStatus." ;
] .
diff --git a/rocrate_validator/profiles/five-safes-crate/must/11_workflow_execution_phase.ttl b/rocrate_validator/profiles/five-safes-crate/must/11_workflow_execution_phase.ttl
index 2f723c93..d036e9bb 100644
--- a/rocrate_validator/profiles/five-safes-crate/must/11_workflow_execution_phase.ttl
+++ b/rocrate_validator/profiles/five-safes-crate/must/11_workflow_execution_phase.ttl
@@ -41,8 +41,6 @@ five-safes-crate:WorkflowMustHaveDescriptiveName
] .
-
-
five-safes-crate:WorkflowMustHaveActionStatusWithAllowedValues
a sh:NodeShape ;
sh:name "WorkflowExecution" ;
diff --git a/rocrate_validator/profiles/five-safes-crate/must/14_workflow_retrieval_phase.ttl b/rocrate_validator/profiles/five-safes-crate/must/14_workflow_retrieval_phase.ttl
index a1108add..6fe8c2a3 100644
--- a/rocrate_validator/profiles/five-safes-crate/must/14_workflow_retrieval_phase.ttl
+++ b/rocrate_validator/profiles/five-safes-crate/must/14_workflow_retrieval_phase.ttl
@@ -47,6 +47,8 @@ five-safes-crate:WorkflowSameAsAndRootDataEntityMainEntityMUSTBeTheSame
a sh:NodeShape ;
sh:name "Downloaded Workflow" ;
sh:description "" ;
+ sh:severity sh:Violation ;
+
sh:target [
a sh:SPARQLTarget ;
sh:select """
@@ -77,7 +79,7 @@ five-safes-crate:WorkflowSameAsAndRootDataEntityMainEntityMUSTBeTheSame
}
}
""" ;
- sh:severity sh:Violation ;
+
sh:description "The property `sameAs` of the entity representing the downloaded workflow MUST point to the same entity as `RootDataEntity` --> `mainEntity`." ;
sh:message "The property `sameAs` of the entity representing the downloaded workflow MUST point to the same entity as `RootDataEntity` --> `mainEntity`." ;
] .
@@ -87,6 +89,8 @@ five-safes-crate:DownloadedWorkflowDistributionAndDownloadActionObjectMUSTBeTheS
a sh:NodeShape ;
sh:name "Downloaded Workflow" ;
sh:description "" ;
+ sh:severity sh:Violation ;
+
sh:target [
a sh:SPARQLTarget ;
sh:select """
@@ -118,7 +122,6 @@ five-safes-crate:DownloadedWorkflowDistributionAndDownloadActionObjectMUSTBeTheS
}
}
""" ;
- sh:severity sh:Violation ;
sh:message "DownloadedWorkflow --> `distribution` MUST reference the same entity as `DownloadAction` --> `object`." ;
] .
diff --git a/rocrate_validator/profiles/five-safes-crate/must/1_requesting_agent.ttl b/rocrate_validator/profiles/five-safes-crate/must/1_requesting_agent.ttl
index 2cc0d434..b3b5a138 100644
--- a/rocrate_validator/profiles/five-safes-crate/must/1_requesting_agent.ttl
+++ b/rocrate_validator/profiles/five-safes-crate/must/1_requesting_agent.ttl
@@ -77,6 +77,6 @@ five-safes-crate:AgentProjectIntersection
}
}
""" ;
- sh:severity sh:Violation ;
- sh:message """At least one Project referenced by Agent -> memberOf MUST be included in the set of Projects referenced by RootDataEntity -> sourceOrganization.""" ;
- ] .
\ No newline at end of file
+ ] ;
+ sh:severity sh:Violation ;
+ sh:message """At least one Project referenced by Agent -> memberOf MUST be included in the set of Projects referenced by RootDataEntity -> sourceOrganization.""" .
\ No newline at end of file
diff --git a/rocrate_validator/profiles/five-safes-crate/must/3_timestamp_format.ttl b/rocrate_validator/profiles/five-safes-crate/must/3_timestamp_format.ttl
index c4f2ddb5..f9b8f065 100644
--- a/rocrate_validator/profiles/five-safes-crate/must/3_timestamp_format.ttl
+++ b/rocrate_validator/profiles/five-safes-crate/must/3_timestamp_format.ttl
@@ -35,20 +35,20 @@ five-safes-crate:TimeStampFormat
sh:property [
a sh:PropertyShape ;
sh:name "End TimeStamp" ;
+ sh:description "End timestamps MUST follow the RFC 3339 standard." ;
sh:path schema:endTime ;
sh:minCount 0 ;
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:Violation ;
sh:message "All `startTime` and `endTime` values MUST follow the RFC 3339 standard (YYYY-MM-DD'T'hh:mm:ss[.fraction](Z | ±hh:mm))." ;
- sh:description "End timestamps MUST follow the RFC 3339 standard." ;
] ;
sh:property [
a sh:PropertyShape ;
sh:name "Start TimeStamp" ;
+ sh:description "Start timestamps MUST follow the RFC 3339 standard." ;
sh:path schema:startTime ;
sh:minCount 0 ;
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:Violation ;
sh:message "All `startTime` and `endTime` values MUST follow the RFC 3339 standard (YYYY-MM-DD'T'hh:mm:ss[.fraction](Z | ±hh:mm))." ;
- sh:description "Start timestamps MUST follow the RFC 3339 standard." ;
] .
diff --git a/rocrate_validator/profiles/five-safes-crate/must/6_workflow_reference.ttl b/rocrate_validator/profiles/five-safes-crate/must/6_workflow_reference.ttl
index 34dd73d6..68d84265 100644
--- a/rocrate_validator/profiles/five-safes-crate/must/6_workflow_reference.ttl
+++ b/rocrate_validator/profiles/five-safes-crate/must/6_workflow_reference.ttl
@@ -56,7 +56,7 @@ five-safes-crate:mainEntityHasProperConformsTo
sh:name "mainEntity" ;
sh:description "The mainEntity of the RootDataEntity MUST have a conformsTo property with an IRI starting with https://w3id.org/workflowhub/workflow-ro-crate" ;
sh:targetObjectsOf schema:mainEntity ;
- sh:property [
+ sh:property [
a sh:PropertyShape ;
sh:name "conformsTo" ;
sh:path purl:conformsTo ;
@@ -65,16 +65,12 @@ five-safes-crate:mainEntityHasProperConformsTo
sh:severity sh:Violation ;
sh:message "mainEntity MUST have one and only one `conformsTo` property." ;
] ;
- sh:sparql [
- a sh:SPARQLConstraint ;
+ sh:property [
+ a sh:PropertyShape ;
sh:name "conformsTo" ;
+ sh:path purl:conformsTo ;
+ sh:nodeKind sh:IRI ;
+ sh:pattern "^https://w3id\\.org/workflowhub/workflow-ro-crate" ;
+ sh:severity sh:Violation ;
sh:message "conformsTo IRI must start with https://w3id.org/workflowhub/workflow-ro-crate" ;
- sh:select """
- PREFIX schema:
- PREFIX purl:
- SELECT $this WHERE {
- $this purl:conformsTo ?iri .
- FILTER(!STRSTARTS(STR(?iri), "https://w3id.org/workflowhub/workflow-ro-crate"))
- }
- """ ;
] .
diff --git a/rocrate_validator/profiles/five-safes-crate/must/7_requested_workflow_run.ttl b/rocrate_validator/profiles/five-safes-crate/must/7_requested_workflow_run.ttl
index d1a9ff6d..5f513532 100644
--- a/rocrate_validator/profiles/five-safes-crate/must/7_requested_workflow_run.ttl
+++ b/rocrate_validator/profiles/five-safes-crate/must/7_requested_workflow_run.ttl
@@ -46,13 +46,13 @@ five-safes-crate:CreateActionInstrumentAndStatus
sh:name "CreateAction" ;
sh:targetClass schema:CreateAction ;
sh:description "" ;
+ sh:severity sh:Violation ; # Apply to all property shapes / constraints below
sh:property [
a sh:PropertyShape ;
sh:name "instrument" ;
sh:path schema:instrument;
sh:minCount 1 ;
- sh:severity sh:Violation ;
sh:message "`CreateAction` MUST have the `instrument` property" ;
] ;
sh:sparql [
@@ -67,7 +67,6 @@ five-safes-crate:CreateActionInstrumentAndStatus
FILTER (?instrument != ?main)
}
""" ;
- sh:severity sh:Violation ;
sh:message "`CreateAction` --> `instrument` MUST reference the same entity as `Root Data Entity` --> `mainEntity`" ;
] ;
sh:sparql [
@@ -81,6 +80,5 @@ five-safes-crate:CreateActionInstrumentAndStatus
FILTER NOT EXISTS { ?object a ?type . }
}
""" ;
- sh:severity sh:Violation ;
sh:message "Each `object` in `CreateAction` MUST reference an existing entity." ;
] .
\ No newline at end of file
diff --git a/rocrate_validator/profiles/five-safes-crate/should/1_responsible_project.ttl b/rocrate_validator/profiles/five-safes-crate/should/1_responsible_project.ttl
index 28d1c1ee..2c5c4d4a 100644
--- a/rocrate_validator/profiles/five-safes-crate/should/1_responsible_project.ttl
+++ b/rocrate_validator/profiles/five-safes-crate/should/1_responsible_project.ttl
@@ -26,6 +26,8 @@ five-safes-crate:ResponsibleProjectMemberAndSourceOrganizationIntersection
a sh:NodeShape ;
sh:name "Organizations (members of Responsible Project)" ;
sh:description """At least one of the organisations that are members of the responsible project SHOULD be included in the Requesting Agent's affiliations, if such properties exist.""" ;
+ sh:severity sh:Warning ;
+
sh:target [
a sh:SPARQLTarget ;
sh:prefixes ro-crate:sparqlPrefixes ;
@@ -40,6 +42,7 @@ five-safes-crate:ResponsibleProjectMemberAndSourceOrganizationIntersection
}
"""
] ;
+
sh:sparql [
a sh:SPARQLConstraint ;
sh:name "Intersection with agent affiliations" ;
@@ -55,6 +58,5 @@ five-safes-crate:ResponsibleProjectMemberAndSourceOrganizationIntersection
}
}
""" ;
- sh:severity sh:Warning ;
sh:message """At least one of the organisations that are members of the responsible project SHOULD be included in the Requesting Agent's affiliations, if such properties exist.""" ;
] .
\ No newline at end of file
diff --git a/rocrate_validator/profiles/five-safes-crate/should/4_sign_off.ttl b/rocrate_validator/profiles/five-safes-crate/should/4_sign_off.ttl
index 129c02df..3da4dfa7 100644
--- a/rocrate_validator/profiles/five-safes-crate/should/4_sign_off.ttl
+++ b/rocrate_validator/profiles/five-safes-crate/should/4_sign_off.ttl
@@ -26,8 +26,11 @@
# There SHOULD be a Sign-Off Phase
five-safes-crate:SignOffPhase
a sh:NodeShape ;
+ sh:name "SignOffPhase" ;
sh:targetClass ro-crate:RootDataEntity ;
sh:description "Check the Sign-Off Phase" ;
+ sh:severity sh:Warning ;
+
sh:sparql [
sh:select """
PREFIX schema:
@@ -39,9 +42,9 @@ five-safes-crate:SignOffPhase
}
}
""" ;
- sh:severity sh:Warning ;
sh:message "There SHOULD be a Sign-Off Phase in the Final RO-Crate" ;
] ;
+
sh:sparql [
sh:select """
PREFIX schema:
@@ -54,14 +57,16 @@ five-safes-crate:SignOffPhase
}
}
""" ;
- sh:severity sh:Warning ;
sh:message "The Root Data Entity SHOULD mention a Sign-Off Phase Object" ;
] .
five-safes-crate:SignOffPhaseProperties
a sh:NodeShape ;
+ sh:name "SignOffPhaseProperties" ;
sh:description "Check Sign-Off Phase Properties" ;
+ sh:severity sh:Warning ;
+
sh:target [
a sh:SPARQLTarget ;
sh:select """
@@ -73,6 +78,7 @@ five-safes-crate:SignOffPhaseProperties
}
"""
] ;
+
sh:property [
sh:description "Check if the Sign Off phase has an actionStatus" ;
sh:path schema:actionStatus ;
@@ -80,6 +86,7 @@ five-safes-crate:SignOffPhaseProperties
sh:severity sh:Warning ;
sh:message "The Sign-Off Phase SHOULD have an actionStatus" ;
] ;
+
sh:property [
sh:description "Check if the Sign Off phase has an agent" ;
sh:path schema:agent ;
@@ -87,6 +94,7 @@ five-safes-crate:SignOffPhaseProperties
sh:severity sh:Warning ;
sh:message "The Sign-Off Phase SHOULD have an agent" ;
] ;
+
sh:property [
sh:description "Check if the Sign Off phase has an instrument (TRE Policy)" ;
sh:path schema:instrument ;
@@ -96,6 +104,7 @@ five-safes-crate:SignOffPhaseProperties
sh:severity sh:Warning ;
sh:message "The Sign-Off Phase SHOULD have an TRE policy (instrument) with type CreativeWork" ;
] ;
+
sh:property [
sh:description "Check if the Sign Off phase has an instrument (TRE Policy)" ;
sh:path ( schema:instrument schema:name ) ;
@@ -104,6 +113,7 @@ five-safes-crate:SignOffPhaseProperties
sh:severity sh:Warning ;
sh:message "The Sign-Off Phase SHOULD have an TRE policy (instrument) with a human-readable name" ;
] ;
+
sh:sparql [
a sh:SPARQLConstraint ;
sh:description "Check if the Sign Off phase lists the workflow as an object" ;
@@ -120,9 +130,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,13 +149,13 @@ five-safes-crate:SignOffPhaseProperties
}
}
""" ;
- sh:severity sh:Warning ;
sh:message "The Sign-Off Phase SHOULD list the Responsible Project (sourceOrganization) as an object" ;
].
five-safes-crate:SignOffPhaseEndTime
a sh:NodeShape ;
+ sh:name "SignOffPhaseEndTime" ;
sh:description "Sign Off end time check" ;
sh:target [