From e346062e7129c72e5c1520445508d24831567efc Mon Sep 17 00:00:00 2001 From: EttoreM Date: Fri, 23 Jan 2026 17:28:30 +0000 Subject: [PATCH] Merged 2_requesting_agent.tll files. --- .../{must => }/2_requesting_agent.ttl | 32 +++++++++++- .../should/2_requesting_agent.ttl | 49 ------------------- 2 files changed, 31 insertions(+), 50 deletions(-) rename rocrate_validator/profiles/five-safes-crate/{must => }/2_requesting_agent.ttl (73%) delete mode 100644 rocrate_validator/profiles/five-safes-crate/should/2_requesting_agent.ttl diff --git a/rocrate_validator/profiles/five-safes-crate/must/2_requesting_agent.ttl b/rocrate_validator/profiles/five-safes-crate/2_requesting_agent.ttl similarity index 73% rename from rocrate_validator/profiles/five-safes-crate/must/2_requesting_agent.ttl rename to rocrate_validator/profiles/five-safes-crate/2_requesting_agent.ttl index 4f3a4d89..15b8aa6e 100644 --- a/rocrate_validator/profiles/five-safes-crate/must/2_requesting_agent.ttl +++ b/rocrate_validator/profiles/five-safes-crate/2_requesting_agent.ttl @@ -22,6 +22,7 @@ @prefix xsd: . +#=== MUST shapes ===# five-safes-crate:CreateActionHasAgent a sh:NodeShape ; @@ -60,4 +61,33 @@ five-safes-crate:CreateActionHasAgent sh:nodeKind sh:IRI ; sh:severity sh:Violation ; sh:message "The affiliation of a CreateAction's agent MUST be a contextual entity with type Organization." ; - ] . \ No newline at end of file + ] . + + +#=== SHOULD shapes ===# + +# Person who is the agent of a CreateAction SHOULD have an affiliation +five-safes-crate:PersonAgentHasAffiliation + a sh:NodeShape ; + sh:name "Agent of CreateAction" ; + sh:description "The agent of a CreateAction entity" ; + sh:target [ + a sh:SPARQLTarget ; + sh:prefixes ro-crate:sparqlPrefixes ; + sh:select """ + SELECT DISTINCT ?this WHERE { + ?action a schema:CreateAction ; + schema:agent ?this . + } + """ + ] ; + + # The agent of a CreateAction entity SHOULD have an affiliation + sh:property [ + a sh:PropertyShape ; + sh:name "Presence of affiliations" ; + sh:path schema:affiliation ; + sh:minCount 1 ; + sh:severity sh:Warning ; + sh:message "The agent of a CreateAction entity SHOULD have an affiliation" ; + ] . diff --git a/rocrate_validator/profiles/five-safes-crate/should/2_requesting_agent.ttl b/rocrate_validator/profiles/five-safes-crate/should/2_requesting_agent.ttl deleted file mode 100644 index c21b3f97..00000000 --- a/rocrate_validator/profiles/five-safes-crate/should/2_requesting_agent.ttl +++ /dev/null @@ -1,49 +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: . - - -# Person who is the agent of a CreateAction SHOULD have an affiliation -five-safes-crate:PersonAgentHasAffiliation - a sh:NodeShape ; - sh:name "Agent of CreateAction" ; - sh:description "The agent of a CreateAction entity" ; - sh:target [ - a sh:SPARQLTarget ; - sh:prefixes ro-crate:sparqlPrefixes ; - sh:select """ - SELECT DISTINCT ?this WHERE { - ?action a schema:CreateAction ; - schema:agent ?this . - } - """ - ] ; - - # The agent of a CreateAction entity SHOULD have an affiliation - sh:property [ - a sh:PropertyShape ; - sh:name "Presence of affiliations" ; - sh:path schema:affiliation ; - sh:minCount 1 ; - sh:severity sh:Warning ; - sh:message "The agent of a CreateAction entity SHOULD have an affiliation" ; - ] . \ No newline at end of file