shacl-engine
Version:
A fast RDF/JS SHACL engine
40 lines (34 loc) • 1.2 kB
text/turtle
@prefix ex: <http://example.org/>.
@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#>.
@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#>.
<> a mf:Manifest;
mf:entries (<from-shape-property>).
<from-shape-property> a sht:Validate;
rdfs:label "Test of severity from shape property";
mf:action [
sht:dataGraph <>;
sht:shapesGraph <>
];
mf:result [ a sh:ValidationReport;
sh:conforms false;
sh:result [ a sh:ValidationResult;
sh:focusNode ex:Alice;
sh:resultPath ex:name;
sh:resultSeverity sh:Warning;
sh:sourceConstraintComponent sh:MinCountConstraintComponent;
sh:sourceShape ex:ShapeWithoutSeverityProperty
]
].
ex:Alice a ex:Person;.
ex:ShapeWithoutSeverity a sh:NodeShape;
sh:property ex:ShapeWithoutSeverityProperty;
sh:targetClass ex:Person.
ex:ShapeWithoutSeverityProperty
sh:datatype xsd:string;
sh:minCount 1;
sh:path ex:name;
sh:severity sh:Warning.