2323@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
2424
2525
26+ # === MUST shapes ===#
27+
28+ five-safes-crate:CheckValueObjectHasDescriptiveNameAndIsAssessAction
29+ a sh:NodeShape ;
30+ sh:name " CheckValue" ;
31+ sh:description " " ;
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:CheckValue .
42+ }
43+ """ ;
44+ ] ;
45+
46+ sh:property [
47+ sh:path rdf:type ;
48+ sh:minCount 1 ;
49+ sh:hasValue schema:AssessAction;
50+ sh:severity sh:Violation ;
51+ sh:message " CheckValue MUST be a `AssessAction`." ;
52+ ] ;
53+
54+ sh:property [
55+ sh:a sh:PropertyShape ;
56+ sh:name " name" ;
57+ sh:description " CheckValue MUST have a human readable name string." ;
58+ sh:path schema:name ;
59+ sh:datatype xsd:string ;
60+ sh:severity sh:Violation ;
61+ sh:message " CheckValue MUST have a human readable name string." ;
62+ ] .
63+
64+
65+ five-safes-crate:CheckValueActionStatusMustHaveAllowedValues
66+ a sh:NodeShape ;
67+ sh:name " CheckValue" ;
68+ sh:description " " ;
69+
70+ sh:target [
71+ a sh:SPARQLTarget ;
72+ sh:select """
73+ PREFIX schema: <http://schema.org/>
74+ PREFIX shp: <https://w3id.org/shp#>
75+
76+ SELECT ?this
77+ WHERE {
78+ ?this schema:additionalType shp:CheckValue ;
79+ schema:actionStatus ?status .
80+ }
81+ """ ;
82+ ] ;
83+
84+ sh:property [
85+ a sh:PropertyShape ;
86+ sh:name " ActionStatus" ;
87+ sh:path schema:actionStatus ;
88+ sh:in (
89+ " http://schema.org/PotentialActionStatus"
90+ " http://schema.org/ActiveActionStatus"
91+ " http://schema.org/CompletedActionStatus"
92+ " http://schema.org/FailedActionStatus"
93+ ) ;
94+ sh:severity sh:Violation ;
95+ sh:message " `CheckValue` --> `actionStatus` MUST have one of the allowed values." ;
96+ ] .
97+
98+
99+ # === SHOULD shapes ===#
100+
26101five-safes-crate:RootDataEntityShouldMentionCheckValueObject
27102 a sh:NodeShape ;
28103 sh:name " RootDataEntity" ;
29104 sh:targetClass ro-crate:RootDataEntity ;
30105 sh:description " " ;
106+ sh:severity sh:Warning ;
31107
32108 sh:sparql [
33109 a sh:SPARQLConstraint ;
@@ -44,7 +120,6 @@ five-safes-crate:RootDataEntityShouldMentionCheckValueObject
44120 }
45121 }
46122 """ ;
47- sh:severity sh:Warning ;
48123 sh:message " RootDataEntity SHOULD mention a check value object." ;
49124 ] .
50125
@@ -188,3 +263,38 @@ five-safes-crate:CheckValueShouldHaveActionStatus
188263 sh:severity sh:Warning ;
189264 sh:message " CheckValue SHOULD have actionStatus property." ;
190265 ] .
266+
267+
268+ # === MAY shapes ===#
269+
270+ five-safes-crate:CheckValueMayHaveStartTime
271+ a sh:NodeShape ;
272+ sh:name " CheckValue" ;
273+ sh:description " " ;
274+ sh:target [
275+ a sh:SPARQLTarget ;
276+ sh:select """
277+ PREFIX schema: <http://schema.org/>
278+ PREFIX shp: <https://w3id.org/shp#>
279+ SELECT ?this
280+ WHERE {
281+ ?this schema:additionalType shp:CheckValue ;
282+ schema:actionStatus ?status .
283+ FILTER(?status IN (
284+ "http://schema.org/CompletedActionStatus",
285+ "http://schema.org/FailedActionStatus",
286+ "http://schema.org/ActiveActionStatus"
287+ ))
288+ }
289+ """ ;
290+ ] ;
291+
292+ sh:property [
293+ a sh:PropertyShape ;
294+ sh:name " StartTime" ;
295+ sh:path schema:startTime ;
296+ sh:minCount 1 ;
297+ sh:maxCount 1 ;
298+ sh:severity sh:Info ;
299+ sh:message " `CheckValue` MAY have the `startTime` property." ;
300+ ] .
0 commit comments