Skip to content
Draft
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 @@ -23,11 +23,119 @@
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .


#=== MUST shapes ===#

five-safes-crate:ValidationCheckObjectHasDescriptiveNameAndIsAssessAction
a sh:NodeShape ;
sh:name "ValidationCheck" ;
sh:description "" ;

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:ValidationCheck .
}
""" ;
] ;

sh:property [
sh:path rdf:type ;
sh:minCount 1 ;
sh:hasValue schema:AssessAction;
sh:severity sh:Violation ;
sh:message "ValidationCheck MUST be a `AssessAction`." ;
] ;

sh:property [
sh:a sh:PropertyShape ;
sh:name "name" ;
sh:description "ValidationCheck MUST have a human readable name string." ;
sh:path schema:name ;
sh:datatype xsd:string ;
sh:severity sh:Violation ;
sh:message "ValidationCheck MUST have a human readable name string." ;
] .


five-safes-crate:ValidationCheckActionStatusMustHaveAllowedValue
a sh:NodeShape ;
sh:name "ValidationCheck" ;
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:ValidationCheck ;
schema:actionStatus ?status .
}
""" ;
] ;

sh:property [
a sh:PropertyShape ;
sh:name "actionStatus" ;
sh:description "The `actionStatus` of ValidationCheck MUST have an allowed value (see https://schema.org/ActionStatusType)." ;
sh:path schema:actionStatus ;
sh:in (
"http://schema.org/PotentialActionStatus"
"http://schema.org/ActiveActionStatus"
"http://schema.org/CompletedActionStatus"
"http://schema.org/FailedActionStatus"
) ;
sh:severity sh:Violation ;
sh:message "The `actionStatus` of ValidationCheck MUST have an allowed value (see https://schema.org/ActionStatusType)." ;
] .


five-safes-crate:ValidationCheckActionStatusMustHaveAllowedValue
a sh:NodeShape ;
sh:name "ValidationCheck" ;
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:ValidationCheck .
}
""" ;
] ;

sh:property [
a sh:PropertyShape ;
sh:minCount 1 ;
sh:name "actionStatus" ;
sh:description "actionStatus MUST be either PotentialActionStatus, ActiveActionStatus, CompletedActionStatus, or FailedActionStatus." ;
sh:path schema:actionStatus ;
sh:in (
"http://schema.org/PotentialActionStatus"
"http://schema.org/ActiveActionStatus"
"http://schema.org/CompletedActionStatus"
"http://schema.org/FailedActionStatus"
) ;
sh:severity sh:Violation ;
sh:message "actionStatus MUST be either PotentialActionStatus, ActiveActionStatus, CompletedActionStatus, or FailedActionStatus." ;
] .


#=== SHOULD shapes ===#

five-safes-crate:RootDataEntityShouldMentionValidationCheckObject
a sh:NodeShape ;
sh:name "RootDataEntity" ;
sh:targetClass ro-crate:RootDataEntity ;
sh:description "" ;
sh:severity sh:Warning ;

sh:sparql [
a sh:SPARQLConstraint ;
Expand All @@ -44,7 +152,6 @@ five-safes-crate:RootDataEntityShouldMentionValidationCheckObject
}
}
""" ;
sh:severity sh:Warning ;
sh:message "RootDataEntity SHOULD mention a ValidationCheck object." ;
] .

Expand Down Expand Up @@ -163,3 +270,39 @@ five-safes-crate:DownloadActionShouldHaveEndTimeIfBegun
sh:description "ValidationCheck SHOULD have the `endTime` property if `actionStatus` is either CompletedActionStatus or FailedActionStatus." ;
sh:message "ValidationCheck SHOULD have the `endTime` property if `actionStatus` is either CompletedActionStatus or FailedActionStatus." ;
] .


#=== MAY shapes ===#

five-safes-crate:DownloadActionMayHaveStartTimeIfBegun
a sh:NodeShape ;
sh:name "ValidationCheck" ;
sh:description "" ;
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:ValidationCheck ;
schema:actionStatus ?status .
FILTER(?status IN (
"http://schema.org/CompletedActionStatus",
"http://schema.org/FailedActionStatus",
"http://schema.org/ActiveActionStatus"
))
}
""" ;
] ;

sh:property [
a sh:PropertyShape ;
sh:name "StartTime" ;
sh:path schema:startTime ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:severity sh:Info ;
sh:description "ValidationCheck MAY have the `startTime` property if `actionStatus` is either ActiveActionStatus, CompletedActionStatus or FailedActionStatus." ;
sh:message "ValidationCheck MAY have the `startTime` property if `actionStatus` is either ActiveActionStatus, CompletedActionStatus or FailedActionStatus." ;
] .

This file was deleted.

This file was deleted.

Loading