From 6a4ccdce57000d4283bcdc4d50b30ced697d8433 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Fri, 28 Jun 2024 12:36:47 -0400 Subject: [PATCH] Regenerate Make-managed files References: * https://github.com/ucoProject/UCO/issues/606 Signed-off-by: Alex Nelson --- .../information_resource_PASS_validation.ttl | 31 ++++++++++++++++--- .../information_resource_XFAIL_validation.ttl | 21 +++++++++++++ 2 files changed, 48 insertions(+), 4 deletions(-) create mode 100644 tests/examples/information_resource_XFAIL_validation.ttl 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 ; + ] ; + . +