Skip to content

Commit 14e48a3

Browse files
committed
Resolved conflicts
2 parents 620c5b5 + 8fc209e commit 14e48a3

22 files changed

+549
-197
lines changed

qqOA

Lines changed: 0 additions & 164 deletions
This file was deleted.

rocrate_validator/profiles/five-safes-crate/10_outputs.ttl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ five-safes-crate:CreateActionHasResultIfActionCompleted
5353
sh:path schema:result ;
5454
sh:minCount 1 ;
5555
sh:severity sh:Warning ;
56-
sh:message "`CreateAction` with CompletedActionStatus SHOULD have the `schema:result` property." ;
56+
sh:message "`CreateAction` with CompletedActionStatus SHOULD have the `result` property." ;
5757
] .
5858

5959

rocrate_validator/profiles/five-safes-crate/12_check_phase.ttl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ five-safes-crate:CheckValueInstrumentShouldPointToEntityTypedDefinedTerm
172172
sh:minCount 1 ;
173173
sh:class schema:DefinedTerm ;
174174
sh:severity sh:Warning ;
175-
sh:message "`CheckValue` --> `instrument` SHOULD point to an entity typed `schema:DefinedTerm`" ;
175+
sh:message "`CheckValue` --> `instrument` SHOULD point to an entity typed `DefinedTerm`" ;
176176
] .
177177

178178

rocrate_validator/profiles/five-safes-crate/1_root_data_entity.ttl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,33 @@ five-safes-crate:RootDataEntityRequiredProperties
2828
a sh:NodeShape ;
2929
sh:name "RootDataEntity" ;
3030
sh:targetClass ro-crate:RootDataEntity ;
31+
sh:name "RootDataEntity" ;
32+
sh:targetClass ro-crate:RootDataEntity ;
3133

3234
sh:property [
3335
a sh:PropertyShape ;
3436
sh:name "sourceOrganization" ;
3537
sh:path schema:sourceOrganization;
3638
sh:minCount 1 ;
39+
sh:name "sourceOrganization" ;
40+
sh:path schema:sourceOrganization;
41+
sh:minCount 1 ;
3742
sh:severity sh:Violation ;
3843
sh:message """The Root Data Entity MUST have a `sourceOrganization` property.""" ;
44+
sh:message """The Root Data Entity MUST have a `sourceOrganization` property.""" ;
3945
] ;
4046

4147
sh:property [
4248
a sh:PropertyShape ;
4349
sh:name "sourceOrganization" ;
4450
sh:path schema:sourceOrganization ;
4551
sh:class schema:Project ;
52+
sh:name "sourceOrganization" ;
53+
sh:path schema:sourceOrganization ;
54+
sh:class schema:Project ;
4655
sh:severity sh:Violation ;
4756
sh:message """The `sourceOrganization` property of the RootDataEntity MUST point to a Project entity.""" ;
57+
sh:message """The `sourceOrganization` property of the RootDataEntity MUST point to a Project entity.""" ;
4858
] .
4959

5060
#=== SHOULD shapes ===#

rocrate_validator/profiles/five-safes-crate/2_requesting_agent.ttl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ five-safes-crate:CreateActionHasAgent
2828
a sh:NodeShape ;
2929
sh:name "CreateAction" ;
3030
sh:targetClass schema:CreateAction ;
31-
sh:description "Checks that a CreateAction has an agent and that each agent is a schema:Person." ;
31+
sh:description "Checks that a CreateAction has an agent and that each agent is a Person." ;
3232

3333
# CreateAction entity MUST have an agent (IRI)
3434
sh:property [
@@ -38,7 +38,7 @@ five-safes-crate:CreateActionHasAgent
3838
sh:minCount 1 ;
3939
sh:nodeKind sh:IRI ;
4040
sh:severity sh:Violation ;
41-
sh:message "CreateAction MUST have at least one schema:agent that is a contextual entity." ;
41+
sh:message "CreateAction MUST have at least one agent that is a contextual entity." ;
4242
] ;
4343

4444
# The agent of a CreateAction entity MUST be a Person
@@ -49,7 +49,7 @@ five-safes-crate:CreateActionHasAgent
4949
sh:nodeKind sh:IRI ;
5050
sh:class schema:Person ;
5151
sh:severity sh:Violation ;
52-
sh:message "Each CreateAction agent MUST be typed as schema:Person." ;
52+
sh:message "Each CreateAction agent MUST be typed as Person." ;
5353
] ;
5454

5555
# If any agent affiliation exists, it MUST be an Organization (IRI)
@@ -92,4 +92,4 @@ five-safes-crate:PersonAgentHasAffiliation
9292
] .
9393

9494
#=== MAY shapes ===#
95-
# (none)
95+
# (none)

rocrate_validator/profiles/five-safes-crate/6_workflow_reference.ttl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ five-safes-crate:ReferenceToWorkflowCrate
3939
sh:maxCount 1 ;
4040
sh:nodeKind sh:IRI ;
4141
sh:severity sh:Violation ;
42-
sh:message "The RootDataEntity MUST have exactly one schema:mainEntity property that is an IRI." ;
42+
sh:message "The RootDataEntity MUST have exactly one mainEntity property that is an IRI." ;
4343
] ;
4444

4545
# The mainEntity of a RootDataEntity MUST be a Dataset
@@ -49,7 +49,7 @@ five-safes-crate:ReferenceToWorkflowCrate
4949
sh:path schema:mainEntity ;
5050
sh:class schema:Dataset ;
5151
sh:severity sh:Violation ;
52-
sh:message "The mainEntity pointed to by the RootDataEntity MUST be of type schema:Dataset" ;
52+
sh:message "The mainEntity pointed to by the RootDataEntity MUST be of type Dataset" ;
5353
] .
5454

5555
five-safes-crate:mainEntityHasProperConformsTo
@@ -64,7 +64,7 @@ five-safes-crate:mainEntityHasProperConformsTo
6464
sh:minCount 1 ;
6565
sh:maxCount 1 ;
6666
sh:severity sh:Violation ;
67-
sh:message "mainEntity MUST have one and only one `purl:conformsTo` property." ;
67+
sh:message "mainEntity MUST have one and only one `conformsTo` property." ;
6868
] ;
6969
sh:sparql [
7070
a sh:SPARQLConstraint ;

rocrate_validator/profiles/five-safes-crate/7_requested_workflow_run.ttl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ five-safes-crate:CreateActionInstrumentAndStatus
5555
sh:path schema:instrument;
5656
sh:minCount 1 ;
5757
sh:severity sh:Violation ;
58-
sh:message "`CreateAction` MUST have the `schema:instrument` property" ;
58+
sh:message "`CreateAction` MUST have the `instrument` property" ;
5959
] ;
6060
sh:sparql [
6161
a sh:SPARQLConstraint ;
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# Copyright (c) 2025 eScience Lab, The University of Manchester
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
16+
@prefix ro: <./> .
17+
@prefix ro-crate: <https://github.com/crs4/rocrate-validator/profiles/ro-crate/> .
18+
@prefix five-safes-crate: <https://github.com/eScienceLab/rocrate-validator/profiles/five-safes-crate/> .
19+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
20+
@prefix schema: <http://schema.org/> .
21+
@prefix purl: <http://purl.org/dc/terms/> .
22+
@prefix sh: <http://www.w3.org/ns/shacl#> .
23+
@prefix validator: <https://github.com/crs4/rocrate-validator/> .
24+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
25+
26+
27+
five-safes-crate:DownloadedWorkflowSHOULDExistAndBeReferencedByDownloadActionResult
28+
a sh:NodeShape ;
29+
sh:name "DownloadAction" ;
30+
sh:description "Validates that DownloadAction result references an existing entity" ;
31+
sh:targetClass schema:DownloadAction ;
32+
33+
sh:property [
34+
a sh:PropertyShape ;
35+
sh:name "Result" ;
36+
sh:description "The result property must reference an existing entity in the RO-Crate" ;
37+
sh:path schema:result ;
38+
sh:minCount 1 ;
39+
sh:nodeKind sh:IRI ;
40+
41+
sh:sparql [
42+
a sh:SPARQLConstraint ;
43+
sh:select """
44+
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
45+
PREFIX schema: <http://schema.org/>
46+
47+
SELECT $this $value
48+
WHERE {
49+
$this schema:result $value .
50+
51+
# Entity must have BOTH type AND name (proper definition)
52+
FILTER NOT EXISTS {
53+
$value rdf:type schema:Dataset .
54+
}
55+
}
56+
""" ;
57+
sh:severity sh:Info ;
58+
sh:message "The entity representing the downloaded workflow is not defined, OR is not referenced by `DownloadAction` --> `result`, OR is not of type `Dataset`." ;
59+
] ;
60+
] .
61+
62+
63+
five-safes-crate:DownloadActionMayHaveStartTimeIfBegun
64+
a sh:NodeShape ;
65+
sh:name "DownloadAction" ;
66+
sh:description (
67+
"`DownloadAction` MAY have the `startTime` property if `actionStatus` "
68+
"is either ActiveActionStatus, CompletedActionStatus or FailedActionStatus."
69+
);
70+
71+
sh:target [
72+
a sh:SPARQLTarget ;
73+
sh:select """
74+
PREFIX schema: <http://schema.org/>
75+
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
76+
77+
SELECT ?this
78+
WHERE {
79+
?this rdf:type schema:DownloadAction ;
80+
schema:actionStatus ?status .
81+
FILTER(?status IN (
82+
"http://schema.org/CompletedActionStatus",
83+
"http://schema.org/FailedActionStatus",
84+
"http://schema.org/ActiveActionStatus"
85+
))
86+
}
87+
""" ;
88+
] ;
89+
90+
sh:property [
91+
a sh:PropertyShape ;
92+
sh:name "StartTime" ;
93+
sh:path schema:startTime ;
94+
sh:minCount 1 ;
95+
sh:maxCount 1 ;
96+
sh:severity sh:Info ;
97+
sh:description (
98+
"`DownloadAction` MAY have the `startTime` property if `actionStatus` "
99+
"is either ActiveActionStatus, CompletedActionStatus or FailedActionStatus."
100+
);
101+
sh:message "`DownloadAction` MAY have the `startTime` property if `actionStatus` is either ActiveActionStatus, CompletedActionStatus or FailedActionStatus." ;
102+
] .
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# Copyright (c) 2025 eScience Lab, The University of Manchester
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
@prefix ro: <./> .
16+
@prefix ro-crate: <https://github.com/crs4/rocrate-validator/profiles/ro-crate/> .
17+
@prefix five-safes-crate: <https://github.com/eScienceLab/rocrate-validator/profiles/five-safes-crate/> .
18+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
19+
@prefix schema: <http://schema.org/> .
20+
@prefix purl: <http://purl.org/dc/terms/> .
21+
@prefix sh: <http://www.w3.org/ns/shacl#> .
22+
@prefix validator: <https://github.com/crs4/rocrate-validator/> .
23+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
24+
25+
26+
five-safes-crate:CheckValueObjectHasDescriptiveNameAndIsAssessAction
27+
a sh:NodeShape ;
28+
sh:name "CheckValue" ;
29+
sh:description "" ;
30+
31+
sh:target [
32+
a sh:SPARQLTarget ;
33+
sh:select """
34+
PREFIX schema: <http://schema.org/>
35+
PREFIX shp: <https://w3id.org/shp#>
36+
37+
SELECT ?this
38+
WHERE {
39+
?this schema:additionalType shp:CheckValue .
40+
}
41+
""" ;
42+
] ;
43+
44+
sh:property [
45+
sh:path rdf:type ;
46+
sh:minCount 1 ;
47+
sh:hasValue schema:AssessAction;
48+
sh:severity sh:Violation ;
49+
sh:message "CheckValue MUST be a `AssessAction`." ;
50+
] ;
51+
52+
sh:property [
53+
sh:a sh:PropertyShape ;
54+
sh:name "name" ;
55+
sh:description "CheckValue MUST have a human readable name string." ;
56+
sh:path schema:name ;
57+
sh:datatype xsd:string ;
58+
sh:severity sh:Violation ;
59+
sh:message "CheckValue MUST have a human readable name string." ;
60+
] .
61+
62+
five-safes-crate:CheckValueActionStatusMustHaveAllowedValues
63+
a sh:NodeShape ;
64+
sh:name "CheckValue" ;
65+
sh:description "" ;
66+
67+
sh:target [
68+
a sh:SPARQLTarget ;
69+
sh:select """
70+
PREFIX schema: <http://schema.org/>
71+
PREFIX shp: <https://w3id.org/shp#>
72+
73+
SELECT ?this
74+
WHERE {
75+
?this schema:additionalType shp:CheckValue ;
76+
schema:actionStatus ?status .
77+
}
78+
""" ;
79+
] ;
80+
81+
sh:property [
82+
a sh:PropertyShape ;
83+
sh:name "ActionStatus" ;
84+
sh:path schema:actionStatus ;
85+
sh:in (
86+
"http://schema.org/PotentialActionStatus"
87+
"http://schema.org/ActiveActionStatus"
88+
"http://schema.org/CompletedActionStatus"
89+
"http://schema.org/FailedActionStatus"
90+
) ;
91+
sh:severity sh:Violation ;
92+
sh:message "`CheckValue` --> `actionStatus` MUST have one of the allowed values." ;
93+
] .

0 commit comments

Comments
 (0)