Skip to content

Commit 7277042

Browse files
authored
Merge pull request crs4#149 from nfdi4plants/isa-profile-setup
ISA Profile Setup
2 parents 2251168 + 70ae91d commit 7277042

32 files changed

+4671
-10
lines changed

CITATION.cff

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ authors:
1919
- family-names: Bauer
2020
given-names: Daniel
2121
orcid: https://orcid.org/0000-0001-9447-460X
22+
- family-names: "Wetzels"
23+
given-names: "Florian"
24+
orcid: https://orcid.org/0000-0002-5526-7138
25+
- family-names: "Weil"
26+
given-names: "Heinrich Lukas"
27+
orcid: https://orcid.org/0000-0003-1945-6342
2228
repository-code: "https://github.com/crs4/rocrate-validator"
2329
url: "https://github.com/crs4/rocrate-validator"
2430
keywords:
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
# Copyright (c) 2026 DataPLANT
2+
# Copyright (c) 2026 The University of Manchester
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
@prefix ro: <./> .
17+
@prefix ro-crate: <https://github.com/crs4/rocrate-validator/profiles/ro-crate/> .
18+
@prefix isa-ro-crate: <https://github.com/crs4/rocrate-validator/profiles/isa-ro-crate/> .
19+
@prefix bioschemas: <https://bioschemas.org/> .
20+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
21+
@prefix schema: <http://schema.org/> .
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+
isa-ro-crate:RootDataEntityMustBeInvestigation a sh:NodeShape ;
27+
sh:name "Root Data Entity must be Investigation" ;
28+
sh:description "The root data entity must follow the investigation profile" ;
29+
sh:targetClass ro-crate:RootDataEntity ;
30+
sh:property [
31+
a sh:PropertyShape ;
32+
sh:path schema:additionalType ;
33+
sh:minCount 1 ;
34+
sh:hasValue "Investigation";
35+
sh:description "Check if the root data entity is specified as an investigation through additionalType" ;
36+
sh:message "The root data entity must have additionalType of `Investigation`" ;
37+
sh:severity sh:Violation ;
38+
] ;
39+
sh:property [
40+
a sh:PropertyShape ;
41+
sh:path schema:identifier ;
42+
sh:minCount 1 ;
43+
sh:datatype xsd:string ;
44+
sh:not [
45+
sh:hasValue ""
46+
] ;
47+
sh:description "Check if the root data entity (investigation) has an identifier" ;
48+
sh:message "The root data entity must have a non-empty identifier" ;
49+
sh:severity sh:Violation ;
50+
] ;
51+
# sh:property [
52+
# a sh:PropertyShape ;
53+
# sh:path schema:name ;
54+
# sh:minCount 1 ;
55+
# sh:not [
56+
# sh:hasValue ""
57+
# ] ;
58+
# sh:description "Check if the root data entity (investigation) has a name" ;
59+
# sh:message "The root data entity must have a non-empty name" ;
60+
# sh:severity sh:Violation ;
61+
# ] ;
62+
# sh:property [
63+
# a sh:PropertyShape ;
64+
# sh:path schema:description ;
65+
# sh:minCount 1 ;
66+
# sh:not [
67+
# sh:hasValue ""
68+
# ] ;
69+
# sh:description "Check if the root data entity (investigation) has a description" ;
70+
# sh:message "The root data entity must have a non-empty description" ;
71+
# sh:severity sh:Violation ;
72+
# ] ;
73+
# sh:property [
74+
# a sh:PropertyShape ;
75+
# sh:path schema:license ;
76+
# sh:minCount 1 ;
77+
# sh:description "Check if the root data entity (investigation) specifies a license" ;
78+
# sh:message "The root data entity must specify a license" ;
79+
# sh:severity sh:Violation ;
80+
# ] ;
81+
# sh:property [
82+
# a sh:PropertyShape ;
83+
# sh:path schema:datePublished ;
84+
# sh:minCount 1 ;
85+
# sh:nodeKind sh:Literal ;
86+
# sh:pattern "^([\\+-]?\\d{4})((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))|W([0-4]\\d|5[0-2])(-?[1-7])|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)?[0-5]\\d)?|24:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)$" ;
87+
# sh:description "Check if the root data entity (investigation) has a datePublished" ;
88+
# sh:message "The root data entity must have a datePublished" ;
89+
# sh:severity sh:Violation ;
90+
# ] ;
91+
.
92+
93+
isa-ro-crate:InvestigationShouldHaveCreator a sh:NodeShape ;
94+
sh:name "Investigation SHOULD have creator" ;
95+
sh:description "An Investigation SHOULD have a creator" ;
96+
sh:targetClass ro-crate:RootDataEntity ;
97+
sh:property [
98+
a sh:PropertyShape ;
99+
sh:path schema:creator ;
100+
sh:minCount 1 ;
101+
sh:description "Check that investigation does have at least one creator" ;
102+
sh:message "Investigation entity SHOULD have a creator" ;
103+
sh:severity sh:Warning ;
104+
] ;
105+
sh:property [
106+
a sh:PropertyShape ;
107+
sh:path schema:creator ;
108+
sh:class schema:Person ;
109+
sh:description "Check that if investigation does have at least one creator, it MUST be of type Person" ;
110+
sh:message "Investigation creator MUST be of type Person" ;
111+
sh:severity sh:Violation ;
112+
]
113+
.
114+
115+
isa-ro-crate:InvestigationShouldHaveDateCreated a sh:NodeShape ;
116+
sh:name "Investigation SHOULD have dateCreated" ;
117+
sh:description "An Investigation SHOULD have a dateCreated" ;
118+
sh:targetClass ro-crate:RootDataEntity ;
119+
sh:property [
120+
a sh:PropertyShape ;
121+
sh:path schema:dateCreated ;
122+
sh:minCount 1 ;
123+
sh:description "Check that investigation does have at least one dateCreated" ;
124+
sh:message "Investigation entity SHOULD have a dateCreated" ;
125+
sh:severity sh:Warning ;
126+
] ;
127+
sh:property [
128+
a sh:PropertyShape ;
129+
sh:path schema:dateCreated ;
130+
sh:nodeKind sh:Literal ;
131+
sh:pattern "^([\\+-]?\\d{4})((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))|W([0-4]\\d|5[0-2])(-?[1-7])|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)?[0-5]\\d)?|24:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)$" ;
132+
sh:description "Check that if investigation does have at least one dateCreated, it MUST be a valid ISO 8601 date." ;
133+
sh:message "Investigation dateCreated MUST be a valid ISO 8601 date" ;
134+
sh:severity sh:Violation ;
135+
]
136+
.
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Copyright (c) 2026 DataPLANT
2+
# Copyright (c) 2026 The University of Manchester
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
@prefix ro: <./> .
17+
@prefix ro-crate: <https://github.com/crs4/rocrate-validator/profiles/ro-crate/> .
18+
@prefix isa-ro-crate: <https://github.com/crs4/rocrate-validator/profiles/isa-ro-crate/> .
19+
@prefix bioschemas: <https://bioschemas.org/> .
20+
@prefix bioschemas-prop: <https://bioschemas.org/properties/> .
21+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
22+
@prefix schema: <http://schema.org/> .
23+
@prefix sh: <http://www.w3.org/ns/shacl#> .
24+
@prefix validator: <https://github.com/crs4/rocrate-validator/> .
25+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
26+
27+
28+
isa-ro-crate:DefinedTermMustHaveName a sh:NodeShape ;
29+
sh:name "DefinedTerm MUST have a name" ;
30+
sh:description "A DefinedTerm MUST have a name" ;
31+
sh:targetClass schema:DefinedTerm ;
32+
sh:property [
33+
a sh:PropertyShape ;
34+
sh:path schema:name ;
35+
sh:datatype xsd:string ;
36+
sh:minCount 1 ;
37+
sh:maxCount 1 ;
38+
sh:not [
39+
sh:hasValue ""
40+
] ;
41+
sh:description "Check that DefinedTerm does have non-empty name and it's a string" ;
42+
sh:message "DefinedTerm entity MUST have a non-empty name of type string" ;
43+
sh:severity sh:Violation ;
44+
]
45+
.
46+
47+
isa-ro-crate:DefinedTermShouldHaveTermCodeOfCorrectType a sh:NodeShape ;
48+
sh:name "DefinedTerm SHOULD have termCode of correct type" ;
49+
sh:description "A DefinedTerm SHOULD have at least one termCode of correct type" ;
50+
sh:targetClass schema:DefinedTerm ;
51+
sh:property [
52+
a sh:PropertyShape ;
53+
sh:path schema:termCode ;
54+
sh:minCount 1 ;
55+
sh:not [
56+
sh:hasValue ""
57+
] ;
58+
sh:description "Check that DefinedTerm does have at least one termCode" ;
59+
sh:message "DefinedTerm entity SHOULD have at least one termCode" ;
60+
sh:severity sh:Warning ;
61+
] ;
62+
sh:property [
63+
a sh:PropertyShape ;
64+
sh:path schema:termCode ;
65+
sh:datatype xsd:string ;
66+
sh:description "The termCode of a DefinedTerm MUST be of type string" ;
67+
sh:message "DefinedTerm termCode MUST be of type string" ;
68+
sh:severity sh:Violation ;
69+
]
70+
.
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# Copyright (c) 2026 DataPLANT
2+
# Copyright (c) 2026 The University of Manchester
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
@prefix ro: <./> .
17+
@prefix ro-crate: <https://github.com/crs4/rocrate-validator/profiles/ro-crate/> .
18+
@prefix isa-ro-crate: <https://github.com/crs4/rocrate-validator/profiles/isa-ro-crate/> .
19+
@prefix bioschemas: <https://bioschemas.org/> .
20+
@prefix bioschemas-prop: <https://bioschemas.org/properties/> .
21+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
22+
@prefix schema: <http://schema.org/> .
23+
@prefix sh: <http://www.w3.org/ns/shacl#> .
24+
@prefix validator: <https://github.com/crs4/rocrate-validator/> .
25+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
26+
27+
28+
ro-crate:FindPropertyValueSubtypes a sh:NodeShape, validator:HiddenShape;
29+
sh:name "Identify PropertyValue subtypes within the RO-Crate" ;
30+
sh:description "A PropertyValue has type Parameter, Characteristic, Factor or Component if additionalType is set accordingly." ;
31+
sh:targetClass schema:PropertyValue ;
32+
# Expand data graph with triples from the file data entity
33+
sh:rule [
34+
a sh:TripleRule ;
35+
sh:subject sh:this ;
36+
sh:predicate rdf:type ;
37+
sh:object isa-ro-crate:Parameter ;
38+
# The condition: additionalType == "Parameter"
39+
sh:condition [
40+
sh:property [
41+
sh:path schema:additionalType ;
42+
sh:hasValue "Parameter" ;
43+
] ;
44+
] ;
45+
] ;
46+
sh:rule [
47+
a sh:TripleRule ;
48+
sh:subject sh:this ;
49+
sh:predicate rdf:type ;
50+
sh:object isa-ro-crate:Characteristic ;
51+
# The condition: additionalType == "Characteristic"
52+
sh:condition [
53+
sh:property [
54+
sh:path schema:additionalType ;
55+
sh:hasValue "Characteristic" ;
56+
] ;
57+
] ;
58+
] ;
59+
sh:rule [
60+
a sh:TripleRule ;
61+
sh:subject sh:this ;
62+
sh:predicate rdf:type ;
63+
sh:object isa-ro-crate:Factor ;
64+
# The condition: additionalType == "Factor"
65+
sh:condition [
66+
sh:property [
67+
sh:path schema:additionalType ;
68+
sh:hasValue "Factor" ;
69+
] ;
70+
] ;
71+
] ;
72+
sh:rule [
73+
a sh:TripleRule ;
74+
sh:subject sh:this ;
75+
sh:predicate rdf:type ;
76+
sh:object isa-ro-crate:Component ;
77+
# The condition: additionalType == "Component"
78+
sh:condition [
79+
sh:property [
80+
sh:path schema:additionalType ;
81+
sh:hasValue "Component" ;
82+
] ;
83+
] ;
84+
]
85+
.
86+
87+
isa-ro-crate:PropertyValueMustHaveName a sh:NodeShape ;
88+
sh:name "PropertyValue MUST have a name" ;
89+
sh:description "A PropertyValue MUST have a name" ;
90+
sh:targetClass schema:PropertyValue ;
91+
sh:property [
92+
a sh:PropertyShape ;
93+
sh:path schema:name ;
94+
sh:datatype xsd:string ;
95+
sh:minCount 1 ;
96+
sh:maxCount 1 ;
97+
sh:not [
98+
sh:hasValue ""
99+
] ;
100+
sh:description "Check that PropertyValue does have non-empty name and it's a string" ;
101+
sh:message "PropertyValue entity MUST have a non-empty name of type string" ;
102+
sh:severity sh:Violation ;
103+
]
104+
.
105+
106+
isa-ro-crate:PropertyValueShouldHaveValueOfCorrectType a sh:NodeShape ;
107+
sh:name "PropertyValue SHOULD have value of correct type" ;
108+
sh:description "A PropertyValue SHOULD have at least one value of correct type" ;
109+
sh:targetClass schema:PropertyValue ;
110+
sh:property [
111+
a sh:PropertyShape ;
112+
sh:path schema:value ;
113+
sh:minCount 1 ;
114+
sh:not [
115+
sh:hasValue ""
116+
] ;
117+
sh:description "Check that PropertyValue does have at least one value" ;
118+
sh:message "PropertyValue entity SHOULD have at least one value" ;
119+
sh:severity sh:Warning ;
120+
] ;
121+
sh:property [
122+
a sh:PropertyShape ;
123+
sh:path schema:value ;
124+
sh:or(
125+
[ sh:datatype xsd:string ]
126+
[ sh:datatype xsd:float ]
127+
[ sh:datatype xsd:integer ]
128+
) ;
129+
sh:description "The value of a PropertyValue MUST be of type string or a number" ;
130+
sh:message "PropertyValue value MUST be of type string, float, or integer" ;
131+
sh:severity sh:Violation ;
132+
]
133+
.

0 commit comments

Comments
 (0)