Skip to content

Commit 240b509

Browse files
committed
Merged 8_disclosure_phase.tll files.
1 parent 8fc209e commit 240b509

3 files changed

Lines changed: 120 additions & 159 deletions

File tree

rocrate_validator/profiles/five-safes-crate/should/8_disclosure_phase.ttl renamed to rocrate_validator/profiles/five-safes-crate/8_disclosure_phase.ttl

Lines changed: 120 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,93 @@
2323
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
2424

2525

26+
#=== MUST shapes ===#
27+
28+
five-safes-crate:DisclosureObjectHasDescriptiveNameAndIsAssessAction
29+
a sh:NodeShape ;
30+
sh:name "DisclosureCheck" ;
31+
sh:description "DisclosureCheck" ;
32+
33+
sh:target [
34+
a sh:SPARQLTarget ;
35+
sh:select """
36+
PREFIX schema: <http://schema.org/>
37+
PREFIX shp: <https://w3id.org/shp#>
38+
39+
SELECT ?this
40+
WHERE {
41+
?this schema:additionalType shp:DisclosureCheck .
42+
}
43+
""" ;
44+
] ;
45+
46+
sh:property [
47+
a sh:PropertyShape ;
48+
sh:name "AssessAction" ;
49+
sh:description "`DisclosureCheck` MUST be a `AssessAction`." ;
50+
sh:path rdf:type ;
51+
sh:minCount 1 ;
52+
sh:hasValue schema:AssessAction;
53+
sh:severity sh:Violation ;
54+
sh:message "`DisclosureCheck` MUST be a `AssessAction`." ;
55+
] ;
56+
57+
sh:property [
58+
a sh:PropertyShape ;
59+
sh:name "name" ;
60+
sh:description "`DisclosureCheck` MUST have a name string of at least 10 characters." ;
61+
sh:minCount 1 ;
62+
sh:path schema:name ;
63+
sh:datatype xsd:string ;
64+
sh:minLength 10 ;
65+
sh:severity sh:Violation ;
66+
sh:message "`DisclosureCheck` MUST have a name string of at least 10 characters." ;
67+
] .
68+
69+
70+
five-safes-crate:DisclosureObjectHasActionStatusWithAcceptedValue
71+
a sh:NodeShape ;
72+
sh:name "DisclosureCheck" ;
73+
sh:description "`DisclosureCheck` MUST have an actionStatus with an allowed value (see https://schema.org/ActionStatusType)." ;
74+
75+
sh:target [
76+
a sh:SPARQLTarget ;
77+
sh:select """
78+
PREFIX schema: <http://schema.org/>
79+
PREFIX shp: <https://w3id.org/shp#>
80+
81+
SELECT ?this
82+
WHERE {
83+
?this schema:additionalType shp:DisclosureCheck ;
84+
schema:actionStatus ?status .
85+
}
86+
""" ;
87+
] ;
88+
89+
sh:property [
90+
a sh:PropertyShape ;
91+
sh:name "actionStatus" ;
92+
sh:description "`DisclosureCheck` MUST have an actionStatus with an allowed value (see https://schema.org/ActionStatusType)." ;
93+
sh:path schema:actionStatus ;
94+
sh:in (
95+
"http://schema.org/PotentialActionStatus"
96+
"http://schema.org/ActiveActionStatus"
97+
"http://schema.org/CompletedActionStatus"
98+
"http://schema.org/FailedActionStatus"
99+
) ;
100+
sh:severity sh:Violation ;
101+
sh:message "`DisclosureCheck` MUST have an actionStatus with an allowed value (see https://schema.org/ActionStatusType)." ;
102+
] .
103+
104+
105+
#=== SHOULD shapes ===#
106+
26107
five-safes-crate:RootDataEntityShouldMentionDisclosureObject
27108
a sh:NodeShape ;
28109
sh:name "RootDataEntity" ;
29110
sh:targetClass ro-crate:RootDataEntity ;
30111
sh:description "RootDataEntity SHOULD mention a disclosure object." ;
112+
sh:severity sh:Warning ;
31113

32114
sh:sparql [
33115
a sh:SPARQLConstraint ;
@@ -45,7 +127,6 @@ five-safes-crate:RootDataEntityShouldMentionDisclosureObject
45127
}
46128
}
47129
""" ;
48-
sh:severity sh:Warning ;
49130
sh:message "`RootDataEntity` SHOULD mention a disclosure object." ;
50131
] .
51132

@@ -111,4 +192,42 @@ five-safes-crate:DisclosureObjectHasEndTimeIfcompletedOrFailed
111192
sh:severity sh:Warning ;
112193
sh:description "`DisclosureCheck` SHOULD have the `endTime` property if `actionStatus` is either CompletedActionStatus or FailedActionStatus." ;
113194
sh:message "`DisclosureCheck` SHOULD have the `endTime` property if `actionStatus` is either CompletedActionStatus or FailedActionStatus." ;
195+
] .
196+
197+
198+
#=== MAY shapes ===#
199+
200+
five-safes-crate:DisclosureObjectHasStartTimeIfBegun
201+
a sh:NodeShape ;
202+
sh:name "DisclosureCheck" ;
203+
sh:description "DisclosureCheck" ;
204+
205+
sh:target [
206+
a sh:SPARQLTarget ;
207+
sh:select """
208+
PREFIX schema: <http://schema.org/>
209+
PREFIX shp: <https://w3id.org/shp#>
210+
211+
SELECT ?this
212+
WHERE {
213+
?this schema:additionalType shp:DisclosureCheck ;
214+
schema:actionStatus ?status .
215+
FILTER(?status IN (
216+
"http://schema.org/CompletedActionStatus",
217+
"http://schema.org/FailedActionStatus",
218+
"http://schema.org/ActiveActionStatus"
219+
))
220+
}
221+
""" ;
222+
] ;
223+
224+
sh:property [
225+
a sh:PropertyShape ;
226+
sh:name "StartTime" ;
227+
sh:path schema:startTime ;
228+
sh:minCount 1 ;
229+
sh:maxCount 1 ;
230+
sh:severity sh:Info ;
231+
sh:description "`DisclosureCheck` MAY have the `startTime` property if `actionStatus` is either ActiveActionStatus, CompletedActionStatus or FailedActionStatus." ;
232+
sh:message "`DisclosureCheck` MAY have the `startTime` property if `actionStatus` is either ActiveActionStatus, CompletedActionStatus or FailedActionStatus." ;
114233
] .

rocrate_validator/profiles/five-safes-crate/may/8_disclosure_phase.ttl

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

rocrate_validator/profiles/five-safes-crate/must/8_disclosure_phase.ttl

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

0 commit comments

Comments
 (0)