diff --git a/rocrate_validator/profiles/five-safes-crate/must/1_requesting_agent.ttl b/rocrate_validator/profiles/five-safes-crate/1_requesting_agent.ttl similarity index 81% rename from rocrate_validator/profiles/five-safes-crate/must/1_requesting_agent.ttl rename to rocrate_validator/profiles/five-safes-crate/1_requesting_agent.ttl index 2cc0d434..7213fc3d 100644 --- a/rocrate_validator/profiles/five-safes-crate/must/1_requesting_agent.ttl +++ b/rocrate_validator/profiles/five-safes-crate/1_requesting_agent.ttl @@ -22,6 +22,8 @@ @prefix xsd: . +#=== MUST shapes ===# + five-safes-crate:AgentIsMemberOf a sh:NodeShape ; sh:name "Requesting Agent" ; @@ -49,6 +51,7 @@ five-safes-crate:AgentIsMemberOf five-safes-crate:AgentProjectIntersection a sh:NodeShape ; sh:name "Agent Project Intersection" ; + sh:severity sh:Violation ; sh:description """At least one Project referenced by Agent -> memberOf MUST be included in the set of Projects referenced by RootDataEntity -> sourceOrganization.""" ; sh:target [ a sh:SPARQLTarget ; @@ -77,6 +80,31 @@ 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.""" ; + ] . + + +#=== SHOULD shapes ===# + +five-safes-crate:AgentIsMemberOf + a sh:NodeShape ; + sh:name "Requesting Agent" ; + sh:target [ + a sh:SPARQLTarget ; + sh:prefixes ro-crate:sparqlPrefixes ; + sh:select """ + SELECT DISTINCT ?this WHERE { + ?action a schema:CreateAction ; + schema:agent ?this . + } + """ + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:name "memberOf" ; + sh:path schema:memberOf; + sh:minCount 1 ; + sh:severity sh:Warning ; + sh:message """The Requesting Agent SHOULD have a `memberOf` property.""" ; ] . \ No newline at end of file diff --git a/rocrate_validator/profiles/five-safes-crate/should/1_requesting_agent.ttl b/rocrate_validator/profiles/five-safes-crate/should/1_requesting_agent.ttl deleted file mode 100644 index 332c67d3..00000000 --- a/rocrate_validator/profiles/five-safes-crate/should/1_requesting_agent.ttl +++ /dev/null @@ -1,46 +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: . - - -five-safes-crate:AgentIsMemberOf - a sh:NodeShape ; - sh:name "Requesting Agent" ; - sh:target [ - a sh:SPARQLTarget ; - sh:prefixes ro-crate:sparqlPrefixes ; - sh:select """ - SELECT DISTINCT ?this WHERE { - ?action a schema:CreateAction ; - schema:agent ?this . - } - """ - ] ; - - sh:property [ - a sh:PropertyShape ; - sh:name "memberOf" ; - sh:path schema:memberOf; - sh:minCount 1 ; - sh:severity sh:Warning ; - sh:message """The Requesting Agent SHOULD have a `memberOf` property.""" ; - ] . \ No newline at end of file