diff --git a/tests/examples/information_resource_PASS_validation.ttl b/tests/examples/information_resource_PASS_validation.ttl index 2656c460..3c878b4c 100644 --- a/tests/examples/information_resource_PASS_validation.ttl +++ b/tests/examples/information_resource_PASS_validation.ttl @@ -12,10 +12,33 @@ [ a sh:ValidationResult ; sh:focusNode ; - sh:resultMessage "core:InformationResource and core:NeverInformationResource are disjoint classes. Assigning both types to a single node will be an error as of UCO 2.0.0."@en ; - sh:resultSeverity sh:Warning ; - sh:sourceConstraintComponent sh:NotConstraintComponent ; - sh:sourceShape core:InformationResource-disjointWith-NeverInformationResource-shape ; + sh:resultMessage "UcoThings are suggested to end with a UUID." ; + sh:resultSeverity sh:Info ; + sh:sourceConstraint [ + a sh:SPARQLConstraint ; + rdfs:seeAlso ; + sh:message "UcoThings are suggested to end with a UUID."@en ; + sh:select ''' + PREFIX rdfs: + PREFIX core: + SELECT $this + WHERE { + $this a/rdfs:subClassOf* core:UcoThing . + FILTER NOT EXISTS { + $this a/rdfs:subClassOf* core:InformationResource . + } + FILTER ( + ! REGEX ( + STR($this), + "[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12}$", + "i" + ) + ) + } + ''' ; + ] ; + sh:sourceConstraintComponent sh:SPARQLConstraintComponent ; + sh:sourceShape core:UcoThing-identifier-regex-shape ; sh:value ; ] , [ diff --git a/tests/examples/information_resource_XFAIL_validation.ttl b/tests/examples/information_resource_XFAIL_validation.ttl new file mode 100644 index 00000000..3d7bc871 --- /dev/null +++ b/tests/examples/information_resource_XFAIL_validation.ttl @@ -0,0 +1,21 @@ +@prefix core: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix xsd: . + +[] + a sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "core:InformationResource and core:NeverInformationResource are disjoint classes."@en ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NotConstraintComponent ; + sh:sourceShape core:InformationResource-disjointWith-NeverInformationResource-shape ; + sh:value ; + ] ; + . +