UNPKG

shacl-engine

Version:
92 lines (90 loc) 2.33 kB
@prefix dash: <http://datashapes.org/dash#> . @prefix ex: <http://datashapes.org/sh/tests/core/node/or-001.test#> . @prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix sh: <http://www.w3.org/ns/shacl#> . @prefix sht: <http://www.w3.org/ns/shacl-test#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . ex:InvalidRectangle1 rdf:type ex:RectangleWithArea ; ex:height 3 ; . ex:InvalidRectangle2 rdf:type ex:RectangleWithArea ; . ex:RectangleWithArea rdf:type rdfs:Class ; rdf:type sh:NodeShape ; rdfs:subClassOf rdfs:Resource ; sh:or ( [ sh:property [ sh:path ex:height ; sh:minCount 1 ; ] ; sh:property [ sh:path ex:width ; sh:minCount 1 ; ] ; ] [ sh:property [ sh:path ex:area ; sh:minCount 1 ; ] ; ] ) ; . ex:ValidRectangle1 rdf:type ex:RectangleWithArea ; ex:height 3 ; ex:width 2 ; . ex:ValidRectangle2 rdf:type ex:RectangleWithArea ; ex:area 6 ; ex:height 3 ; ex:width 2 ; . ex:ValidRectangle3 rdf:type ex:RectangleWithArea ; ex:area 6 ; ex:height 3 ; . <> rdf:type mf:Manifest ; mf:entries ( <or-001> ) ; . <or-001> rdf:type sht:Validate ; rdfs:label "Test of sh:or at node shape 001" ; mf:action [ sht:dataGraph <> ; sht:shapesGraph <> ; ] ; mf:result [ rdf:type sh:ValidationReport ; sh:conforms "false"^^xsd:boolean ; sh:result [ rdf:type sh:ValidationResult ; sh:focusNode ex:InvalidRectangle1 ; sh:resultSeverity sh:Violation ; sh:sourceConstraintComponent sh:OrConstraintComponent ; sh:sourceShape ex:RectangleWithArea ; sh:value ex:InvalidRectangle1 ; ] ; sh:result [ rdf:type sh:ValidationResult ; sh:focusNode ex:InvalidRectangle2 ; sh:resultSeverity sh:Violation ; sh:sourceConstraintComponent sh:OrConstraintComponent ; sh:sourceShape ex:RectangleWithArea ; sh:value ex:InvalidRectangle2 ; ] ; ] ; mf:status sht:approved ; .