Skip to content

Commit f520d72

Browse files
committed
simplify & correct sparql check for validation phase object
1 parent a46198a commit f520d72

1 file changed

Lines changed: 5 additions & 13 deletions

File tree

rocrate_validator/profiles/five-safes-crate/should/13_validation_phase.ttl

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -65,24 +65,16 @@ five-safes-crate:ValidationCheckObjectShouldPointToRootDataEntity
6565
""" ;
6666
] ;
6767

68-
sh:sparql [
69-
a sh:SPARQLConstraint ;
68+
sh:property [
69+
a sh:PropertyShape ;
7070
sh:name "object" ;
71-
sh:select """
72-
PREFIX schema: <http://schema.org/>
73-
PREFIX rocrate: <https://github.com/crs4/rocrate-validator/profiles/ro-crate/>
74-
SELECT $this
75-
WHERE {
76-
FILTER NOT EXISTS {
77-
$this schema:object rocrate:RootDataEntity .
78-
}
79-
}
80-
""" ;
71+
sh:path schema:object ;
72+
sh:minCount 1 ;
73+
sh:class ro-crate:RootDataEntity ;
8174
sh:severity sh:Warning ;
8275
sh:message "`ValidationCheck` --> `object` SHOULD point to the root of the RO-Crate" ;
8376
] .
8477

85-
8678
five-safes-crate:ValidationCheckInstrumentShouldPointToEntityWithSpecificId
8779
a sh:NodeShape ;
8880
sh:name "ValidationCheck" ;

0 commit comments

Comments
 (0)