Skip to content
Merged
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# 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: <https://github.com/crs4/rocrate-validator/profiles/ro-crate/> .
@prefix five-safes-crate: <https://github.com/eScienceLab/rocrate-validator/profiles/five-safes-crate/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix schema: <http://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix validator: <https://github.com/crs4/rocrate-validator/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .


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`.""" ;
] .
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# 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: <https://github.com/crs4/rocrate-validator/profiles/ro-crate/> .
@prefix five-safes-crate: <https://github.com/eScienceLab/rocrate-validator/profiles/five-safes-crate/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix schema: <http://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix validator: <https://github.com/crs4/rocrate-validator/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .


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:class schema:Project ;
sh:severity sh:Violation ;
sh:message """The 'memberOf' property of an agent MUST be of type Project.""" ;
] .


five-safes-crate:AgentProjectIntersection
a sh:NodeShape ;
sh:name "Agent Project Intersection" ;
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 ;
sh:prefixes ro-crate:sparqlPrefixes ;
sh:select """
SELECT DISTINCT ?this WHERE {
?action a schema:CreateAction ;
schema:agent ?this .
}
"""
] ;
sh:sparql [
a sh:SPARQLConstraint ;
sh:name "Agent Project Intersection" ;
sh:description """At least one Project referenced by Agent -> memberOf MUST be included in the set of Projects referenced by RootDataEntity -> sourceOrganization.""" ;
sh:prefixes ro-crate:sparqlPrefixes ;
sh:select """
SELECT $this WHERE {
FILTER EXISTS {
$this schema:memberOf ?anyProject .
}
FILTER NOT EXISTS {
$this schema:memberOf ?commonProject .
?metadata schema:about ?root .
?root schema:sourceOrganization ?commonProject .
}
}
""" ;
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.""" ;
] .
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# 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: <https://github.com/crs4/rocrate-validator/profiles/ro-crate/> .
@prefix five-safes-crate: <https://github.com/eScienceLab/rocrate-validator/profiles/five-safes-crate/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix schema: <http://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix validator: <https://github.com/crs4/rocrate-validator/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .


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 schema:Grant.""" ;
] ;

sh:property [
Comment thread
elichad marked this conversation as resolved.
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 schema:Person.""" ;
] .
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2024-2025 CRS4
# 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.
Expand All @@ -16,23 +16,31 @@
@prefix ro-crate: <https://github.com/crs4/rocrate-validator/profiles/ro-crate/> .
@prefix five-safes-crate: <https://github.com/eScienceLab/rocrate-validator/profiles/five-safes-crate/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix schema_org: <http://schema.org/> .
@prefix schema: <http://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix validator: <https://github.com/crs4/rocrate-validator/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .


five-safes-crate:RootDataEntityRequiredProperties
a sh:NodeShape ;
sh:name "Five Safes Crate Root Data Entity REQUIRED properties" ;
sh:description "The Root Data Entity MUST have a `sourceOrganisation`" ;
sh:name "RootDataEntity" ;
sh:targetClass ro-crate:RootDataEntity ;

sh:property [
a sh:PropertyShape ;
sh:name "Root Data Entity: `sourceOrganization` property" ;
sh:description """Check if the Root Data Entity includes a `sourceOrganization` (as specified by schema.org).""" ;
sh:path schema_org:sourceOrganization;
sh:name "sourceOrganization" ;
sh:path schema:sourceOrganization;
sh:minCount 1 ;
sh:nodeKind sh:IRI;
sh:message """The Root Data Entity MUST have a `sourceOrganization` property (as specified by schema.org).
SHOULD link to a Contextual Entity in the RO-Crate Metadata File with a name.""" ;
sh:severity sh:Violation ;
sh:message """The Root Data Entity MUST have a `sourceOrganization` property.""" ;
] ;

sh:property [
a sh:PropertyShape ;
sh:name "sourceOrganization" ;
sh:path schema:sourceOrganization ;
sh:class schema:Project ;
sh:severity sh:Violation ;
sh:message """The `sourceOrganization` property of the RootDataEntity MUST point to a Project entity.""" ;
] .
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2024-2025 CRS4
# 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.
Expand All @@ -15,22 +15,32 @@
@prefix ro: <./> .
@prefix ro-crate: <https://github.com/crs4/rocrate-validator/profiles/ro-crate/> .
@prefix five-safes-crate: <https://github.com/eScienceLab/rocrate-validator/profiles/five-safes-crate/> .
@prefix schema_org: <http://schema.org/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix schema: <http://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix bioschemas: <https://bioschemas.org/> .
@prefix validator: <https://github.com/crs4/rocrate-validator/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .


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 .
}
"""
] ;

# TODO: note that this applies to all Projects, not just those targeted by `funding` relationships
Comment thread
elichad marked this conversation as resolved.
five-safes-crate:FundingBody a sh:NodeShape ;
sh:name "Funding body Project" ;
sh:description "Project which is funding this work" ;
sh:targetClass schema_org:Project ;
sh:property [
a sh:PropertyShape ;
sh:name "Project Name" ;
sh:description """Check if the Project Entity `name` (as specified by schema.org)
to clearly identify the dataset and distinguish it from other projects.""" ;
sh:name "memberOf" ;
sh:path schema:memberOf;
sh:minCount 1 ;
sh:nodeKind sh:Literal ;
sh:path schema_org:name;
sh:message "The Project Entity MUST have a `name` property (as specified by schema.org)" ;
] .
sh:severity sh:Warning ;
sh:message """The Requesting Agent SHOULD have a `memberOf` property.""" ;
] .
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# 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: <https://github.com/crs4/rocrate-validator/profiles/ro-crate/> .
@prefix five-safes-crate: <https://github.com/eScienceLab/rocrate-validator/profiles/five-safes-crate/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix schema: <http://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix validator: <https://github.com/crs4/rocrate-validator/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .


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:target [
a sh:SPARQLTarget ;
sh:prefixes ro-crate:sparqlPrefixes ;
sh:select """
SELECT DISTINCT ?this WHERE {
?action a schema:CreateAction ;
schema:agent ?this .
?this a schema:Person ;
schema:memberOf ?project ;
schema:affiliation ?someAffiliation .
?project schema:member ?org2 .
}
"""
] ;
sh:sparql [
a sh:SPARQLConstraint ;
sh:name "Intersection with agent affiliations" ;
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:prefixes ro-crate:sparqlPrefixes ;
sh:select """
SELECT $this WHERE {
FILTER NOT EXISTS {
$this schema:affiliation ?org .
$this schema:memberOf ?project .
?project schema:member ?org .
}
}
""" ;
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.""" ;
] .
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@
"@type": "Organization",
"name": "The University of Manchester"
},
{
"@id": "https://ror.org/01ee9ar58",
"@type": "Organization",
"name": "University of Nottingham"
},
{
"@id": "#project-be6ffb55-4f5a-4c14-b60e-47e0951090c70",
"@type": "Project",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,11 @@
"@type": "Organization",
"name": "The University of Manchester"
},
{
"@id": "https://ror.org/01ee9ar58",
"@type": "Organization",
"name": "University of Nottingham"
},
{
"@id": "https://gtr.ukri.org/projects?ref=10038961",
"@type": "Grant",
Expand Down
Loading