UNPKG

shacl-engine

Version:
70 lines (68 loc) 1.77 kB
@prefix dash: <http://datashapes.org/dash#> . @prefix ex: <http://datashapes.org/sh/tests/core/property/in-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:InvalidInstance1 rdf:type ex:ShapeClass ; ex:property "D" ; rdfs:label "Invalid instance1" ; . ex:ShapeClass rdf:type rdfs:Class ; rdf:type sh:NodeShape ; sh:property ex:ShapeClass-property ; . ex:ShapeClass-property sh:path ex:property ; sh:datatype xsd:string ; sh:in ( "A" "B" "C" ) ; . ex:ValidInstance1 rdf:type ex:ShapeClass ; ex:property "A" ; rdfs:label "Valid instance1" ; . ex:ValidInstance2 rdf:type ex:ShapeClass ; ex:property "A" ; ex:property "B" ; ex:property "C" ; rdfs:label "Valid instance2" ; . <> rdf:type mf:Manifest ; mf:entries ( <in-001> ) ; . <in-001> rdf:type sht:Validate ; rdfs:label "Test of sh:in at property 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:InvalidInstance1 ; sh:resultPath ex:property ; sh:resultSeverity sh:Violation ; sh:sourceConstraintComponent sh:InConstraintComponent ; sh:sourceShape ex:ShapeClass-property ; sh:value "D" ; ] ; ] ; mf:status sht:approved ; .