Skip to content

Commit a15258e

Browse files
committed
Modification of @graph is now centralised
1 parent b7df62f commit a15258e

13 files changed

Lines changed: 48 additions & 323 deletions

rocrate_validator/profiles/five-safes-crate/may/11_workflow_execution_phase.ttl

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -22,35 +22,6 @@
2222
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
2323

2424

25-
ro-crate:FindWorkflowRunAction a sh:NodeShape, validator:HiddenShape;
26-
sh:name "Identify the CreateAction Entity that corresponds to the Workflow run" ;
27-
sh:description """The Workflow Run is the CreateAction entity that refers to Workflow run.
28-
This is identified by checking that the CreateAction entity has an `instrument` property
29-
that references the same entity as the `mainEntity` property of the Root Data Entity.""" ;
30-
sh:target [
31-
a sh:SPARQLTarget ;
32-
sh:prefixes ro-crate:sparqlPrefixes ;
33-
sh:select """
34-
SELECT ?this
35-
WHERE {
36-
?this a schema:CreateAction ;
37-
schema:instrument ?instrument .
38-
?root schema:mainEntity ?instrument ;
39-
a schema:Dataset .
40-
?metadatafile schema:about ?root .
41-
FILTER(contains(str(?metadatafile), "ro-crate-metadata.json"))
42-
}
43-
"""
44-
] ;
45-
46-
sh:rule [
47-
a sh:TripleRule ;
48-
sh:subject sh:this ;
49-
sh:predicate rdf:type ;
50-
sh:object ro-crate:WorkflowRun ;
51-
] .
52-
53-
5425
five-safes-crate:WorkflowexecutionObjectHasStartTimeIfBegun
5526
a sh:NodeShape ;
5627
sh:name "WorkflowExecution" ;

rocrate_validator/profiles/five-safes-crate/may/1_responsible_project.ttl

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -22,35 +22,6 @@
2222
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
2323

2424

25-
ro-crate:FindWorkflowRunAction a sh:NodeShape, validator:HiddenShape;
26-
sh:name "Identify the CreateAction Entity that corresponds to the Workflow run" ;
27-
sh:description """The Workflow Run is the CreateAction entity that refers to Workflow run.
28-
This is identified by checking that the CreateAction entity has an `instrument` property
29-
that references the same entity as the `mainEntity` property of the Root Data Entity.""" ;
30-
sh:target [
31-
a sh:SPARQLTarget ;
32-
sh:prefixes ro-crate:sparqlPrefixes ;
33-
sh:select """
34-
SELECT ?this
35-
WHERE {
36-
?this a schema:CreateAction ;
37-
schema:instrument ?instrument .
38-
?root schema:mainEntity ?instrument ;
39-
a schema:Dataset .
40-
?metadatafile schema:about ?root .
41-
FILTER(contains(str(?metadatafile), "ro-crate-metadata.json"))
42-
}
43-
"""
44-
] ;
45-
46-
sh:rule [
47-
a sh:TripleRule ;
48-
sh:subject sh:this ;
49-
sh:predicate rdf:type ;
50-
sh:object ro-crate:WorkflowRun ;
51-
] .
52-
53-
5425
five-safes-crate:ResponsibleProject
5526
a sh:NodeShape ;
5627
sh:name "Responsible Project" ;
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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-crate: <https://github.com/crs4/rocrate-validator/profiles/ro-crate/> .
16+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
17+
@prefix schema: <http://schema.org/> .
18+
@prefix sh: <http://www.w3.org/ns/shacl#> .
19+
@prefix validator: <https://github.com/crs4/rocrate-validator/> .
20+
21+
22+
ro-crate:FindWorkflowRunAction a sh:NodeShape, validator:HiddenShape;
23+
sh:order 1 ;
24+
sh:name "Identify the CreateAction Entity that corresponds to the Workflow run" ;
25+
sh:description """The Workflow Run is the CreateAction entity that refers to Workflow run.
26+
This is identified by checking that the CreateAction entity has an `instrument` property
27+
that references the same entity as the `mainEntity` property of the Root Data Entity.""" ;
28+
sh:target [
29+
a sh:SPARQLTarget ;
30+
sh:prefixes ro-crate:sparqlPrefixes ;
31+
sh:select """
32+
SELECT ?this
33+
WHERE {
34+
?this a schema:CreateAction ;
35+
schema:instrument ?instrument .
36+
?root a ro-crate:RootDataEntity ;
37+
schema:mainEntity ?instrument .
38+
}
39+
"""
40+
] ;
41+
42+
sh:rule [
43+
a sh:TripleRule ;
44+
sh:subject sh:this ;
45+
sh:predicate rdf:type ;
46+
sh:object ro-crate:WorkflowRun ;
47+
] .

rocrate_validator/profiles/five-safes-crate/must/11_workflow_execution_phase.ttl

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -23,35 +23,6 @@
2323
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
2424

2525

26-
ro-crate:FindWorkflowRunAction a sh:NodeShape, validator:HiddenShape;
27-
sh:name "Identify the CreateAction Entity that corresponds to the Workflow run" ;
28-
sh:description """The Workflow Run is the CreateAction entity that refers to Workflow run.
29-
This is identified by checking that the CreateAction entity has an `instrument` property
30-
that references the same entity as the `mainEntity` property of the Root Data Entity.""" ;
31-
sh:target [
32-
a sh:SPARQLTarget ;
33-
sh:prefixes ro-crate:sparqlPrefixes ;
34-
sh:select """
35-
SELECT ?this
36-
WHERE {
37-
?this a schema:CreateAction ;
38-
schema:instrument ?instrument .
39-
?root schema:mainEntity ?instrument ;
40-
a schema:Dataset .
41-
?metadatafile schema:about ?root .
42-
FILTER(contains(str(?metadatafile), "ro-crate-metadata.json"))
43-
}
44-
"""
45-
] ;
46-
47-
sh:rule [
48-
a sh:TripleRule ;
49-
sh:subject sh:this ;
50-
sh:predicate rdf:type ;
51-
sh:object ro-crate:WorkflowRun ;
52-
] .
53-
54-
5526
five-safes-crate:WorkflowMustHaveDescriptiveName
5627
a sh:NodeShape ;
5728
sh:name "WorkflowExecution" ;

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

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -22,36 +22,6 @@
2222
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
2323

2424

25-
ro-crate:FindWorkflowRunAction a sh:NodeShape, validator:HiddenShape;
26-
sh:name "Identify the CreateAction Entity that corresponds to the Workflow run" ;
27-
sh:description """The Workflow Run is the CreateAction entity that refers to Workflow run.
28-
This is identified by checking that the CreateAction entity has an `instrument` property
29-
that references the same entity as the `mainEntity` property of the Root Data Entity.""" ;
30-
sh:target [
31-
a sh:SPARQLTarget ;
32-
sh:prefixes ro-crate:sparqlPrefixes ;
33-
sh:select """
34-
SELECT ?this
35-
WHERE {
36-
?this a schema:CreateAction ;
37-
schema:instrument ?instrument .
38-
?root schema:mainEntity ?instrument ;
39-
a schema:Dataset .
40-
?metadatafile schema:about ?root .
41-
FILTER(contains(str(?metadatafile), "ro-crate-metadata.json"))
42-
}
43-
"""
44-
] ;
45-
46-
# Expand data graph with triples from the file data entity
47-
sh:rule [
48-
a sh:TripleRule ;
49-
sh:subject sh:this ;
50-
sh:predicate rdf:type ;
51-
sh:object ro-crate:WorkflowRun ;
52-
] .
53-
54-
5525
five-safes-crate:RootDataEntityMentionsWorkflowRun
5626
a sh:NodeShape ;
5727
sh:name "RootDataEntity" ;

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

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -22,36 +22,6 @@
2222
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
2323

2424

25-
ro-crate:FindWorkflowRunAction a sh:NodeShape, validator:HiddenShape;
26-
sh:name "Identify the CreateAction Entity that corresponds to the Workflow run" ;
27-
sh:description """The Workflow Run is the CreateAction entity that refers to Workflow run.
28-
This is identified by checking that the CreateAction entity has an `instrument` property
29-
that references the same entity as the `mainEntity` property of the Root Data Entity.""" ;
30-
sh:target [
31-
a sh:SPARQLTarget ;
32-
sh:prefixes ro-crate:sparqlPrefixes ;
33-
sh:select """
34-
SELECT ?this
35-
WHERE {
36-
?this a schema:CreateAction ;
37-
schema:instrument ?instrument .
38-
?root schema:mainEntity ?instrument ;
39-
a schema:Dataset .
40-
?metadatafile schema:about ?root .
41-
FILTER(contains(str(?metadatafile), "ro-crate-metadata.json"))
42-
}
43-
"""
44-
] ;
45-
46-
sh:rule [
47-
a sh:TripleRule ;
48-
sh:subject sh:this ;
49-
sh:predicate rdf:type ;
50-
sh:object ro-crate:WorkflowRun ;
51-
] .
52-
53-
54-
5525
five-safes-crate:WorkflowRunHasResultIfActionCompleted
5626
a sh:NodeShape ;
5727
sh:name "WorkflowRun" ;

rocrate_validator/profiles/five-safes-crate/should/11_workflow_execution_phase.ttl

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -23,36 +23,6 @@
2323
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
2424

2525

26-
ro-crate:FindWorkflowRunAction a sh:NodeShape, validator:HiddenShape;
27-
sh:name "Identify the CreateAction Entity that corresponds to the Workflow run" ;
28-
sh:description """The Workflow Run is the CreateAction entity that refers to Workflow run.
29-
This is identified by checking that the CreateAction entity has an `instrument` property
30-
that references the same entity as the `mainEntity` property of the Root Data Entity.""" ;
31-
sh:target [
32-
a sh:SPARQLTarget ;
33-
sh:prefixes ro-crate:sparqlPrefixes ;
34-
sh:select """
35-
SELECT ?this
36-
WHERE {
37-
?this a schema:CreateAction ;
38-
schema:instrument ?instrument .
39-
?root schema:mainEntity ?instrument ;
40-
a schema:Dataset .
41-
?metadatafile schema:about ?root .
42-
FILTER(contains(str(?metadatafile), "ro-crate-metadata.json"))
43-
}
44-
"""
45-
] ;
46-
47-
sh:rule [
48-
a sh:TripleRule ;
49-
sh:subject sh:this ;
50-
sh:predicate rdf:type ;
51-
sh:object ro-crate:WorkflowRun ;
52-
] .
53-
54-
55-
5626
five-safes-crate:RootDataEntityShouldMentionWorkflow
5727
a sh:NodeShape ;
5828
sh:name "RootDataEntity" ;

rocrate_validator/profiles/five-safes-crate/should/1_requesting_agent.ttl

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -22,35 +22,6 @@
2222
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
2323

2424

25-
ro-crate:FindWorkflowRunAction a sh:NodeShape, validator:HiddenShape;
26-
sh:name "Identify the CreateAction Entity that corresponds to the Workflow run" ;
27-
sh:description """The Workflow Run is the CreateAction entity that refers to Workflow run.
28-
This is identified by checking that the CreateAction entity has an `instrument` property
29-
that references the same entity as the `mainEntity` property of the Root Data Entity.""" ;
30-
sh:target [
31-
a sh:SPARQLTarget ;
32-
sh:prefixes ro-crate:sparqlPrefixes ;
33-
sh:select """
34-
SELECT ?this
35-
WHERE {
36-
?this a schema:CreateAction ;
37-
schema:instrument ?instrument .
38-
?root schema:mainEntity ?instrument ;
39-
a schema:Dataset .
40-
?metadatafile schema:about ?root .
41-
FILTER(contains(str(?metadatafile), "ro-crate-metadata.json"))
42-
}
43-
"""
44-
] ;
45-
46-
sh:rule [
47-
a sh:TripleRule ;
48-
sh:subject sh:this ;
49-
sh:predicate rdf:type ;
50-
sh:object ro-crate:WorkflowRun ;
51-
] .
52-
53-
5425
five-safes-crate:AgentIsMemberOf
5526
a sh:NodeShape ;
5627
sh:name "Requesting Agent" ;

rocrate_validator/profiles/five-safes-crate/should/1_responsible_project.ttl

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -22,35 +22,6 @@
2222
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
2323

2424

25-
ro-crate:FindWorkflowRunAction a sh:NodeShape, validator:HiddenShape;
26-
sh:name "Identify the CreateAction Entity that corresponds to the Workflow run" ;
27-
sh:description """The Workflow Run is the CreateAction entity that refers to Workflow run.
28-
This is identified by checking that the CreateAction entity has an `instrument` property
29-
that references the same entity as the `mainEntity` property of the Root Data Entity.""" ;
30-
sh:target [
31-
a sh:SPARQLTarget ;
32-
sh:prefixes ro-crate:sparqlPrefixes ;
33-
sh:select """
34-
SELECT ?this
35-
WHERE {
36-
?this a schema:CreateAction ;
37-
schema:instrument ?instrument .
38-
?root schema:mainEntity ?instrument ;
39-
a schema:Dataset .
40-
?metadatafile schema:about ?root .
41-
FILTER(contains(str(?metadatafile), "ro-crate-metadata.json"))
42-
}
43-
"""
44-
] ;
45-
46-
sh:rule [
47-
a sh:TripleRule ;
48-
sh:subject sh:this ;
49-
sh:predicate rdf:type ;
50-
sh:object ro-crate:WorkflowRun ;
51-
] .
52-
53-
5425
five-safes-crate:ResponsibleProjectMemberAndSourceOrganizationIntersection
5526
a sh:NodeShape ;
5627
sh:name "Organizations (members of Responsible Project)" ;

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

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -22,35 +22,6 @@
2222
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
2323

2424

25-
ro-crate:FindWorkflowRunAction a sh:NodeShape, validator:HiddenShape;
26-
sh:name "Identify the CreateAction Entity that corresponds to the Workflow run" ;
27-
sh:description """The Workflow Run is the CreateAction entity that refers to Workflow run.
28-
This is identified by checking that the CreateAction entity has an `instrument` property
29-
that references the same entity as the `mainEntity` property of the Root Data Entity.""" ;
30-
sh:target [
31-
a sh:SPARQLTarget ;
32-
sh:prefixes ro-crate:sparqlPrefixes ;
33-
sh:select """
34-
SELECT ?this
35-
WHERE {
36-
?this a schema:CreateAction ;
37-
schema:instrument ?instrument .
38-
?root schema:mainEntity ?instrument ;
39-
a schema:Dataset .
40-
?metadatafile schema:about ?root .
41-
FILTER(contains(str(?metadatafile), "ro-crate-metadata.json"))
42-
}
43-
"""
44-
] ;
45-
46-
sh:rule [
47-
a sh:TripleRule ;
48-
sh:subject sh:this ;
49-
sh:predicate rdf:type ;
50-
sh:object ro-crate:WorkflowRun ;
51-
] .
52-
53-
5425
# Person who is the agent of a WorkflowRun SHOULD have an affiliation
5526
five-safes-crate:PersonAgentHasAffiliation
5627
a sh:NodeShape ;

0 commit comments

Comments
 (0)