Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ five-safes-crate:DisclosureObjectHasStartTimeIfBegun
sh:path schema:startTime ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:pattern "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(Z|[+-][0-9]{2}:[0-9]{2})$" ;
sh:severity sh:Info ;
sh:description "Disclosure object MAY have startTime property with RFC 3339 full datetime string if action began." ;
sh:message "Disclosure object MAY have startTime property with RFC 3339 full datetime string if action began." ;
sh:description "`DisclosureCheck` MAY have the `startTime` property if `actionStatus` is either ActiveActionStatus, CompletedActionStatus or FailedActionStatus." ;
sh:message "`DisclosureCheck` MAY have the `startTime` property if `actionStatus` is either ActiveActionStatus, CompletedActionStatus or FailedActionStatus." ;
] .
Original file line number Diff line number Diff line change
Expand Up @@ -44,30 +44,31 @@ five-safes-crate:DisclosureObjectHasDescriptiveNameAndIsAssessAction
sh:property [
a sh:PropertyShape ;
sh:name "AssessAction" ;
sh:description "DisclosureCheck MUST be a `schema:AssessAction`." ;
sh:description "`DisclosureCheck` MUST be a `schema:AssessAction`." ;
sh:path rdf:type ;
sh:minCount 1 ;
sh:hasValue schema:AssessAction;
sh:severity sh:Violation ;
sh:message "DisclosureCheck MUST be a `schema:AssessAction`." ;
sh:message "`DisclosureCheck` MUST be a `schema:AssessAction`." ;
] ;

sh:property [
a sh:PropertyShape ;
sh:name "name" ;
sh:description "DisclosureCheck MUST have a name string of at least 20 characters." ;
sh:description "`DisclosureCheck` MUST have a name string of at least 10 characters." ;
sh:minCount 1 ;
sh:path schema:name ;
sh:datatype xsd:string ;
sh:minLength 20 ;
sh:minLength 10 ;
sh:severity sh:Violation ;
sh:message "DisclosureCheck MUST have a name string of at least 20 characters." ;
sh:message "`DisclosureCheck` MUST have a name string of at least 10 characters." ;
] .


five-safes-crate:DisclosureObjectHasActionStatus
five-safes-crate:DisclosureObjectHasActionStatusWithAcceptedValue
a sh:NodeShape ;
sh:name "DisclosureCheck" ;
sh:description "DisclosureCheck" ;
sh:description "`DisclosureCheck` MUST have an actionStatus with an allowed value (see https://schema.org/ActionStatusType)." ;

sh:target [
a sh:SPARQLTarget ;
Expand All @@ -86,7 +87,7 @@ five-safes-crate:DisclosureObjectHasActionStatus
sh:property [
a sh:PropertyShape ;
sh:name "actionStatus" ;
sh:description "The value of actionStatus MUST be one of the allowed values." ;
sh:description "`DisclosureCheck` MUST have an actionStatus with an allowed value (see https://schema.org/ActionStatusType)." ;
sh:path schema:actionStatus ;
sh:in (
"http://schema.org/PotentialActionStatus"
Expand All @@ -95,5 +96,63 @@ five-safes-crate:DisclosureObjectHasActionStatus
"http://schema.org/FailedActionStatus"
) ;
sh:severity sh:Violation ;
sh:message "The value of actionStatus MUST be one of the allowed values." ;
sh:message "`DisclosureCheck` MUST have an actionStatus with an allowed value (see https://schema.org/ActionStatusType)." ;
] .


five-safes-crate:DisclosureObjectHasCompliantStartTimeFormat
a sh:NodeShape ;
sh:name "DisclosureCheck" ;
sh:description "`DisclosureCheck` --> `startTime` MUST follow the RFC 3339 standard (YYYY-MM-DD'T'hh:mm:ss[.fraction](Z | ±hh:mm))." ;
sh:target [
a sh:SPARQLTarget ;
sh:select """
PREFIX schema: <http://schema.org/>
PREFIX shp: <https://w3id.org/shp#>

SELECT ?this
WHERE {
?this schema:additionalType shp:DisclosureCheck ;
schema:startTime ?o
}
""" ;
] ;

sh:property [
a sh:PropertyShape ;
sh:name "StartTime" ;
sh:path schema:startTime ;
sh:minCount 0 ;
sh:pattern "^[0-9]{4}-[0-9]{2}-[0-9]{2}[Tt][0-9]{2}:[0-9]{2}:[0-9]{2}([.|,][0-9]+)?(Z|z|[+-][0-9]{2}:[0-9]{2})$" ;
sh:severity sh:Violation ;
sh:message "`DisclosureCheck` --> `startTime` MUST follow the RFC 3339 standard (YYYY-MM-DD'T'hh:mm:ss[.fraction](Z | ±hh:mm))." ;
] .


five-safes-crate:DisclosureObjectHasCompliantEndTimeFormat
a sh:NodeShape ;
sh:name "DisclosureCheck" ;
sh:description "`DisclosureCheck` --> `endTime` MUST follow the RFC 3339 standard (YYYY-MM-DD'T'hh:mm:ss[.fraction](Z | ±hh:mm))." ;
sh:target [
a sh:SPARQLTarget ;
sh:select """
PREFIX schema: <http://schema.org/>
PREFIX shp: <https://w3id.org/shp#>

SELECT ?this
WHERE {
?this schema:additionalType shp:DisclosureCheck ;
schema:endTime ?o
}
""" ;
] ;

sh:property [
a sh:PropertyShape ;
sh:name "EndTime" ;
sh:path schema:endTime ;
sh:minCount 0 ;
sh:pattern "^[0-9]{4}-[0-9]{2}-[0-9]{2}[Tt][0-9]{2}:[0-9]{2}:[0-9]{2}([.|,][0-9]+)?(Z|z|[+-][0-9]{2}:[0-9]{2})$" ;
sh:severity sh:Violation ;
sh:message "`DisclosureCheck` --> `endTime` MUST follow the RFC 3339 standard (YYYY-MM-DD'T'hh:mm:ss[.fraction](Z | ±hh:mm))." ;
] .
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ five-safes-crate:RootDataEntityShouldMentionDisclosureObject
sh:sparql [
a sh:SPARQLConstraint ;
sh:name "mentions" ;
sh:description "RootDataEntity SHOULD mention a disclosure object." ;
sh:description "`RootDataEntity` SHOULD mention a disclosure object." ;
sh:select """
PREFIX schema: <http://schema.org/>
PREFIX shp: <https://w3id.org/shp#>
Expand All @@ -46,14 +46,14 @@ five-safes-crate:RootDataEntityShouldMentionDisclosureObject
}
""" ;
sh:severity sh:Warning ;
sh:message "RootDataEntity SHOULD mention a disclosure object." ;
sh:message "`RootDataEntity` SHOULD mention a disclosure object." ;
] .


five-safes-crate:DisclosureObjectHasActionStatus
a sh:NodeShape ;
sh:name "DisclosureCheck" ;
sh:description "DisclosureCheck" ;
sh:description "The `DisclosureCheck` SHOULD have `actionStatus` property." ;

sh:target [
a sh:SPARQLTarget ;
Expand All @@ -71,11 +71,11 @@ five-safes-crate:DisclosureObjectHasActionStatus
sh:property [
a sh:PropertyShape ;
sh:name "ActionStatus" ;
sh:description "The DisclosureCheck SHOULD have actionStatus property." ;
sh:description "The `DisclosureCheck` SHOULD have `actionStatus` property." ;
sh:path schema:actionStatus ;
sh:minCount 1 ;
sh:severity sh:Warning ;
sh:message "The DisclosureCheck SHOULD have actionStatus property." ;
sh:message "The `DisclosureCheck` SHOULD have `actionStatus` property." ;
] .


Expand Down Expand Up @@ -108,8 +108,7 @@ five-safes-crate:DisclosureObjectHasEndTimeIfcompletedOrFailed
sh:path schema:endTime ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:pattern "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(Z|[+-][0-9]{2}:[0-9]{2})$" ;
sh:severity sh:Warning ;
sh:description "Disclosure object SHOULD have endTime property with a valid datetetime if action completed of failed." ;
sh:message "Disclosure object SHOULD have endTime property with a valid datetime if action completed of failed." ;
sh:description "`DisclosureCheck` SHOULD have the `endTime` property if `actionStatus` is either CompletedActionStatus or FailedActionStatus." ;
sh:message "`DisclosureCheck` SHOULD have the `endTime` property if `actionStatus` is either CompletedActionStatus or FailedActionStatus." ;
] .
Loading