diff --git a/rocrate_validator/profiles/five-safes-crate/should/1_responsible_project.ttl b/rocrate_validator/profiles/five-safes-crate/1_responsible_project.ttl similarity index 56% rename from rocrate_validator/profiles/five-safes-crate/should/1_responsible_project.ttl rename to rocrate_validator/profiles/five-safes-crate/1_responsible_project.ttl index 28d1c1ee..75f0b13f 100644 --- a/rocrate_validator/profiles/five-safes-crate/should/1_responsible_project.ttl +++ b/rocrate_validator/profiles/five-safes-crate/1_responsible_project.ttl @@ -22,6 +22,47 @@ @prefix xsd: . +#=== MUST shapes ===# + +five-safes-crate:ResponsibleProject + a sh:NodeShape ; + sh:name "Responsible Project" ; + sh:target [ + a sh:SPARQLTarget ; + sh:prefixes ro-crate:sparqlPrefixes ; + sh:select """ + SELECT DISTINCT ?this WHERE { + ?action a schema:CreateAction ; + schema:agent ?agent . + ?agent schema:memberOf ?this . + } + """ + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:name "funding" ; + sh:path schema:funding; + sh:class schema:Grant ; + sh:severity sh:Violation ; + sh:message """The property 'funding' of the Responsible Project MUST be of type Grant.""" ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:name "member" ; + sh:path schema:member; + sh:or ( + [ sh:class schema:Organization ] + [ sh:class schema:Person ] + ) ; + sh:severity sh:Violation ; + sh:message """The property 'member' of the Responsible Project MUST be of type schema:Organization or Person.""" ; + ] . + + +#=== SHOULD shapes ===# + five-safes-crate:ResponsibleProjectMemberAndSourceOrganizationIntersection a sh:NodeShape ; sh:name "Organizations (members of Responsible Project)" ; @@ -57,4 +98,40 @@ 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 + ] . + + +#=== MAY shapes ===# + +five-safes-crate:ResponsibleProject + a sh:NodeShape ; + sh:name "Responsible Project" ; + sh:target [ + a sh:SPARQLTarget ; + sh:prefixes ro-crate:sparqlPrefixes ; + sh:select """ + SELECT DISTINCT ?this WHERE { + ?action a schema:CreateAction ; + schema:agent ?agent . + ?agent schema:memberOf ?this . + } + """ + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:name "funding" ; + sh:path schema:funding; + sh:minCount 1 ; + sh:severity sh:Info ; + sh:message """The Responsible Project does not have the property `funding`.""" ; + ] ; + + sh:property [ + a sh:PropertyShape ; + sh:name "member" ; + sh:path schema:member; + sh:minCount 1 ; + sh:severity sh:Info ; + sh:message """The Responsible Project does not have the property `member`.""" ; + ] . diff --git a/rocrate_validator/profiles/five-safes-crate/may/1_responsible_project.ttl b/rocrate_validator/profiles/five-safes-crate/may/1_responsible_project.ttl deleted file mode 100644 index 5dd46fd2..00000000 --- a/rocrate_validator/profiles/five-safes-crate/may/1_responsible_project.ttl +++ /dev/null @@ -1,56 +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:ResponsibleProject - a sh:NodeShape ; - sh:name "Responsible Project" ; - sh:target [ - a sh:SPARQLTarget ; - sh:prefixes ro-crate:sparqlPrefixes ; - sh:select """ - SELECT DISTINCT ?this WHERE { - ?action a schema:CreateAction ; - schema:agent ?agent . - ?agent schema:memberOf ?this . - } - """ - ] ; - - sh:property [ - a sh:PropertyShape ; - sh:name "funding" ; - sh:path schema:funding; - sh:minCount 1 ; - sh:severity sh:Info ; - sh:message """The Responsible Project does not have the property `funding`.""" ; - ] ; - - sh:property [ - a sh:PropertyShape ; - sh:name "member" ; - sh:path schema:member; - sh:minCount 1 ; - sh:severity sh:Info ; - sh:message """The Responsible Project does not have the property `member`.""" ; - ] . \ No newline at end of file diff --git a/rocrate_validator/profiles/five-safes-crate/must/1_responsible_project.ttl b/rocrate_validator/profiles/five-safes-crate/must/1_responsible_project.ttl deleted file mode 100644 index 4748655e..00000000 --- a/rocrate_validator/profiles/five-safes-crate/must/1_responsible_project.ttl +++ /dev/null @@ -1,59 +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:ResponsibleProject - a sh:NodeShape ; - sh:name "Responsible Project" ; - sh:target [ - a sh:SPARQLTarget ; - sh:prefixes ro-crate:sparqlPrefixes ; - sh:select """ - SELECT DISTINCT ?this WHERE { - ?action a schema:CreateAction ; - schema:agent ?agent . - ?agent schema:memberOf ?this . - } - """ - ] ; - - sh:property [ - a sh:PropertyShape ; - sh:name "funding" ; - sh:path schema:funding; - sh:class schema:Grant ; - sh:severity sh:Violation ; - sh:message """The property 'funding' of the Responsible Project MUST be of type Grant.""" ; - ] ; - - sh:property [ - a sh:PropertyShape ; - sh:name "member" ; - sh:path schema:member; - sh:or ( - [ sh:class schema:Organization ] - [ sh:class schema:Person ] - ) ; - sh:severity sh:Violation ; - sh:message """The property 'member' of the Responsible Project MUST be of type schema:Organization or Person.""" ; - ] . \ No newline at end of file