From b1a5b7f9230a28173e9662778a57ac74f6003ea2 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Thu, 8 Feb 2024 20:16:06 -0500 Subject: [PATCH] Regenerate Make-managed files References: * https://github.com/ucoProject/UCO/issues/591 Signed-off-by: Alex Nelson --- ...rdinality_restrictions_PASS_validation.ttl | 11 + ...dinality_restrictions_XFAIL_validation.ttl | 297 ++++++++++++++++++ 2 files changed, 308 insertions(+) create mode 100644 tests/examples/owl_cardinality_restrictions_PASS_validation.ttl create mode 100644 tests/examples/owl_cardinality_restrictions_XFAIL_validation.ttl diff --git a/tests/examples/owl_cardinality_restrictions_PASS_validation.ttl b/tests/examples/owl_cardinality_restrictions_PASS_validation.ttl new file mode 100644 index 00000000..33496ff0 --- /dev/null +++ b/tests/examples/owl_cardinality_restrictions_PASS_validation.ttl @@ -0,0 +1,11 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix xsd: . + +[] + a sh:ValidationReport ; + sh:conforms "true"^^xsd:boolean ; + . + diff --git a/tests/examples/owl_cardinality_restrictions_XFAIL_validation.ttl b/tests/examples/owl_cardinality_restrictions_XFAIL_validation.ttl new file mode 100644 index 00000000..2d99c5e2 --- /dev/null +++ b/tests/examples/owl_cardinality_restrictions_XFAIL_validation.ttl @@ -0,0 +1,297 @@ +@prefix ns1: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix uco-owl: . +@prefix xsd: . + +[] + a sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result + [ + a sh:ValidationResult ; + sh:focusNode "1"^^xsd:integer ; + sh:resultMessage "Value is not Literal with datatype xsd:nonNegativeInteger" ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; + sh:sourceShape uco-owl:maxQualifiedCardinality-objects-shape ; + sh:value "1"^^xsd:integer ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode "1"^^xsd:integer ; + sh:resultMessage "Value is not Literal with datatype xsd:nonNegativeInteger" ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; + sh:sourceShape uco-owl:minQualifiedCardinality-objects-shape ; + sh:value "1"^^xsd:integer ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode "1"^^xsd:integer ; + sh:resultMessage "Value is not Literal with datatype xsd:nonNegativeInteger" ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; + sh:sourceShape uco-owl:qualifiedCardinality-objects-shape ; + sh:value "1"^^xsd:integer ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "Value is not of Node Kind sh:BlankNode" ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape uco-owl:Restriction-shape ; + sh:value ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "Value is not of Node Kind sh:BlankNode" ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape uco-owl:Restriction-shape ; + sh:value ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode ; + sh:resultMessage "Value is not of Node Kind sh:BlankNode" ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape uco-owl:Restriction-shape ; + sh:value ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode [ + a owl:Restriction ; + rdfs:comment "This Restriction will trigger a failure from not having a class specified." ; + owl:onProperty ; + ns1:identifier "http://example.org/kb/Thing-exact-xfail-3/Restriction" ; + owl:qualifiedCardinality "1"^^xsd:nonNegativeInteger ; + ] ; + sh:resultMessage 'Node [ dcterms:identifier Literal("http://example.org/kb/Thing-exact-xfail-3/Restriction") ; owl:onProperty kb:object-property-1 ; owl:qualifiedCardinality Literal("1", datatype=xsd:nonNegativeInteger) ; rdf:type owl:Restriction ; rdfs:comment Literal("This Restriction will trigger a failure from not having a class specified.") ] does not conform to exactly one shape in uco-owl:DataExactCardinalityQualified-shape , uco-owl:ObjectExactCardinalityQualified-shape' ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:XoneConstraintComponent ; + sh:sourceShape uco-owl:qualifiedCardinality-subjects-shape ; + sh:value [ + a owl:Restriction ; + rdfs:comment "This Restriction will trigger a failure from not having a class specified." ; + owl:onProperty ; + ns1:identifier "http://example.org/kb/Thing-exact-xfail-3/Restriction" ; + owl:qualifiedCardinality "1"^^xsd:nonNegativeInteger ; + ] ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode [ + a owl:Restriction ; + rdfs:comment "This Restriction will trigger a failure from not having a property specified." ; + owl:onClass ; + ns1:identifier "http://example.org/kb/Thing-exact-xfail-4/Restriction" ; + owl:qualifiedCardinality "1"^^xsd:nonNegativeInteger ; + ] ; + sh:resultMessage 'Node [ dcterms:identifier Literal("http://example.org/kb/Thing-exact-xfail-4/Restriction") ; owl:onClass kb:Other-Thing ; owl:qualifiedCardinality Literal("1", datatype=xsd:nonNegativeInteger) ; rdf:type owl:Restriction ; rdfs:comment Literal("This Restriction will trigger a failure from not having a property specified.") ] does not conform to exactly one shape in uco-owl:DataExactCardinalityQualified-shape , uco-owl:ObjectExactCardinalityQualified-shape' ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:XoneConstraintComponent ; + sh:sourceShape uco-owl:qualifiedCardinality-subjects-shape ; + sh:value [ + a owl:Restriction ; + rdfs:comment "This Restriction will trigger a failure from not having a property specified." ; + owl:onClass ; + ns1:identifier "http://example.org/kb/Thing-exact-xfail-4/Restriction" ; + owl:qualifiedCardinality "1"^^xsd:nonNegativeInteger ; + ] ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode [ + a owl:Restriction ; + rdfs:comment "This Restriction will trigger a failure from not having a class specified." ; + owl:onProperty ; + ns1:identifier "http://example.org/kb/Thing-max-xfail-3/Restriction" ; + owl:maxQualifiedCardinality "1"^^xsd:nonNegativeInteger ; + ] ; + sh:resultMessage 'Node [ dcterms:identifier Literal("http://example.org/kb/Thing-max-xfail-3/Restriction") ; owl:maxQualifiedCardinality Literal("1", datatype=xsd:nonNegativeInteger) ; owl:onProperty kb:object-property-1 ; rdf:type owl:Restriction ; rdfs:comment Literal("This Restriction will trigger a failure from not having a class specified.") ] does not conform to exactly one shape in uco-owl:DataMaxCardinalityQualified-shape , uco-owl:ObjectMaxCardinalityQualified-shape' ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:XoneConstraintComponent ; + sh:sourceShape uco-owl:maxQualifiedCardinality-subjects-shape ; + sh:value [ + a owl:Restriction ; + rdfs:comment "This Restriction will trigger a failure from not having a class specified." ; + owl:onProperty ; + ns1:identifier "http://example.org/kb/Thing-max-xfail-3/Restriction" ; + owl:maxQualifiedCardinality "1"^^xsd:nonNegativeInteger ; + ] ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode [ + a owl:Restriction ; + rdfs:comment "This Restriction will trigger a failure from not having a property specified." ; + owl:onClass ; + ns1:identifier "http://example.org/kb/Thing-max-xfail-4/Restriction" ; + owl:maxQualifiedCardinality "1"^^xsd:nonNegativeInteger ; + ] ; + sh:resultMessage 'Node [ dcterms:identifier Literal("http://example.org/kb/Thing-max-xfail-4/Restriction") ; owl:maxQualifiedCardinality Literal("1", datatype=xsd:nonNegativeInteger) ; owl:onClass kb:Other-Thing ; rdf:type owl:Restriction ; rdfs:comment Literal("This Restriction will trigger a failure from not having a property specified.") ] does not conform to exactly one shape in uco-owl:DataMaxCardinalityQualified-shape , uco-owl:ObjectMaxCardinalityQualified-shape' ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:XoneConstraintComponent ; + sh:sourceShape uco-owl:maxQualifiedCardinality-subjects-shape ; + sh:value [ + a owl:Restriction ; + rdfs:comment "This Restriction will trigger a failure from not having a property specified." ; + owl:onClass ; + ns1:identifier "http://example.org/kb/Thing-max-xfail-4/Restriction" ; + owl:maxQualifiedCardinality "1"^^xsd:nonNegativeInteger ; + ] ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode [ + a owl:Restriction ; + rdfs:comment "This Restriction will trigger a failure from not having a class specified." ; + owl:onProperty ; + ns1:identifier "http://example.org/kb/Thing-min-xfail-3/Restriction" ; + owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ; + ] ; + sh:resultMessage 'Node [ dcterms:identifier Literal("http://example.org/kb/Thing-min-xfail-3/Restriction") ; owl:minQualifiedCardinality Literal("1", datatype=xsd:nonNegativeInteger) ; owl:onProperty kb:object-property-1 ; rdf:type owl:Restriction ; rdfs:comment Literal("This Restriction will trigger a failure from not having a class specified.") ] does not conform to exactly one shape in uco-owl:DataMinCardinalityQualified-shape , uco-owl:ObjectMinCardinalityQualified-shape' ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:XoneConstraintComponent ; + sh:sourceShape uco-owl:minQualifiedCardinality-subjects-shape ; + sh:value [ + a owl:Restriction ; + rdfs:comment "This Restriction will trigger a failure from not having a class specified." ; + owl:onProperty ; + ns1:identifier "http://example.org/kb/Thing-min-xfail-3/Restriction" ; + owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ; + ] ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode [ + a owl:Restriction ; + rdfs:comment "This Restriction will trigger a failure from not having a property specified." ; + owl:onClass ; + ns1:identifier "http://example.org/kb/Thing-min-xfail-4/Restriction" ; + owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ; + ] ; + sh:resultMessage 'Node [ dcterms:identifier Literal("http://example.org/kb/Thing-min-xfail-4/Restriction") ; owl:minQualifiedCardinality Literal("1", datatype=xsd:nonNegativeInteger) ; owl:onClass kb:Other-Thing ; rdf:type owl:Restriction ; rdfs:comment Literal("This Restriction will trigger a failure from not having a property specified.") ] does not conform to exactly one shape in uco-owl:DataMinCardinalityQualified-shape , uco-owl:ObjectMinCardinalityQualified-shape' ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:XoneConstraintComponent ; + sh:sourceShape uco-owl:minQualifiedCardinality-subjects-shape ; + sh:value [ + a owl:Restriction ; + rdfs:comment "This Restriction will trigger a failure from not having a property specified." ; + owl:onClass ; + ns1:identifier "http://example.org/kb/Thing-min-xfail-4/Restriction" ; + owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ; + ] ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode [ + a owl:Restriction ; + rdfs:comment "This Restriction will trigger two failures, from specifying both a minimum and maximum unqualified cardinality. (These should be in separate restrictions instead.)" ; + owl:onProperty ; + ns1:identifier "http://example.org/kb/Thing-plural-cardinality-xfail-1/Restriction" ; + owl:maxCardinality "2"^^xsd:nonNegativeInteger ; + owl:minCardinality "1"^^xsd:nonNegativeInteger ; + ] ; + sh:resultMessage 'More than 0 values on [ dcterms:identifier Literal("http://example.org/kb/Thing-plural-cardinality-xfail-1/Restriction") ; owl:maxCardinality Literal("2", datatype=xsd:nonNegativeInteger) ; owl:minCardinality Literal("1", datatype=xsd:nonNegativeInteger) ; owl:onProperty kb:object-property-1 ; rdf:type owl:Restriction ; rdfs:comment Literal("This Restriction will trigger two failures, from specifying both a minimum and maximum unqualified cardinality. (These should be in separate restrictions instead.)") ]->owl:maxCardinality' ; + sh:resultPath owl:maxCardinality ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:MaxCountConstraintComponent ; + sh:sourceShape [ + a sh:PropertyShape ; + sh:maxCount "0"^^xsd:integer ; + sh:path owl:maxCardinality ; + ] ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode [ + a owl:Restriction ; + rdfs:comment "This Restriction will trigger two failures, from specifying both a minimum and maximum unqualified cardinality. (These should be in separate restrictions instead.)" ; + owl:onProperty ; + ns1:identifier "http://example.org/kb/Thing-plural-cardinality-xfail-1/Restriction" ; + owl:maxCardinality "2"^^xsd:nonNegativeInteger ; + owl:minCardinality "1"^^xsd:nonNegativeInteger ; + ] ; + sh:resultMessage 'More than 0 values on [ dcterms:identifier Literal("http://example.org/kb/Thing-plural-cardinality-xfail-1/Restriction") ; owl:maxCardinality Literal("2", datatype=xsd:nonNegativeInteger) ; owl:minCardinality Literal("1", datatype=xsd:nonNegativeInteger) ; owl:onProperty kb:object-property-1 ; rdf:type owl:Restriction ; rdfs:comment Literal("This Restriction will trigger two failures, from specifying both a minimum and maximum unqualified cardinality. (These should be in separate restrictions instead.)") ]->owl:minCardinality' ; + sh:resultPath owl:minCardinality ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:MaxCountConstraintComponent ; + sh:sourceShape [ + a sh:PropertyShape ; + sh:maxCount "0"^^xsd:integer ; + sh:path owl:minCardinality ; + ] ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode [ + a owl:Restriction ; + rdfs:comment "This Restriction will trigger two failures, from specifying both a minimum and maximum qualified cardinality. (These should be in separate restrictions instead.)" ; + owl:onProperty ; + owl:onClass ; + ns1:identifier "http://example.org/kb/Thing-plural-qualified-cardinality-xfail-1/Restriction" ; + owl:maxQualifiedCardinality "2"^^xsd:nonNegativeInteger ; + owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ; + ] ; + sh:resultMessage 'More than 0 values on [ dcterms:identifier Literal("http://example.org/kb/Thing-plural-qualified-cardinality-xfail-1/Restriction") ; owl:maxQualifiedCardinality Literal("2", datatype=xsd:nonNegativeInteger) ; owl:minQualifiedCardinality Literal("1", datatype=xsd:nonNegativeInteger) ; owl:onClass kb:Other-Thing ; owl:onProperty kb:object-property-1 ; rdf:type owl:Restriction ; rdfs:comment Literal("This Restriction will trigger two failures, from specifying both a minimum and maximum qualified cardinality. (These should be in separate restrictions instead.)") ]->owl:maxQualifiedCardinality' ; + sh:resultPath owl:maxQualifiedCardinality ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:MaxCountConstraintComponent ; + sh:sourceShape [ + a sh:PropertyShape ; + sh:maxCount "0"^^xsd:integer ; + sh:path owl:maxQualifiedCardinality ; + ] ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode [ + a owl:Restriction ; + rdfs:comment "This Restriction will trigger two failures, from specifying both a minimum and maximum qualified cardinality. (These should be in separate restrictions instead.)" ; + owl:onProperty ; + owl:onClass ; + ns1:identifier "http://example.org/kb/Thing-plural-qualified-cardinality-xfail-1/Restriction" ; + owl:maxQualifiedCardinality "2"^^xsd:nonNegativeInteger ; + owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ; + ] ; + sh:resultMessage 'More than 0 values on [ dcterms:identifier Literal("http://example.org/kb/Thing-plural-qualified-cardinality-xfail-1/Restriction") ; owl:maxQualifiedCardinality Literal("2", datatype=xsd:nonNegativeInteger) ; owl:minQualifiedCardinality Literal("1", datatype=xsd:nonNegativeInteger) ; owl:onClass kb:Other-Thing ; owl:onProperty kb:object-property-1 ; rdf:type owl:Restriction ; rdfs:comment Literal("This Restriction will trigger two failures, from specifying both a minimum and maximum qualified cardinality. (These should be in separate restrictions instead.)") ]->owl:minQualifiedCardinality' ; + sh:resultPath owl:minQualifiedCardinality ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:MaxCountConstraintComponent ; + sh:sourceShape [ + a sh:PropertyShape ; + sh:maxCount "0"^^xsd:integer ; + sh:path owl:minQualifiedCardinality ; + ] ; + ] , + [ + a sh:ValidationResult ; + sh:focusNode [ + a owl:Restriction ; + rdfs:comment "This Restriction will trigger a failure from specifying a class on an unqualified cardinality." ; + owl:onProperty ; + owl:onClass ; + ns1:identifier "http://example.org/kb/Thing-unqualified-cardinality-with-class-xfail-1/Restriction" ; + owl:cardinality "1"^^xsd:nonNegativeInteger ; + ] ; + sh:resultMessage 'More than 0 values on [ dcterms:identifier Literal("http://example.org/kb/Thing-unqualified-cardinality-with-class-xfail-1/Restriction") ; owl:cardinality Literal("1", datatype=xsd:nonNegativeInteger) ; owl:onClass kb:Other-Thing ; owl:onProperty kb:object-property-1 ; rdf:type owl:Restriction ; rdfs:comment Literal("This Restriction will trigger a failure from specifying a class on an unqualified cardinality.") ]->owl:onClass' ; + sh:resultPath owl:onClass ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:MaxCountConstraintComponent ; + sh:sourceShape [ + a sh:PropertyShape ; + sh:maxCount "0"^^xsd:integer ; + sh:path owl:onClass ; + ] ; + ] + ; + . +