-
Notifications
You must be signed in to change notification settings - Fork 44
Expand file tree
/
Copy pathuniqueValuesFor-003.ttl
More file actions
60 lines (59 loc) · 1.65 KB
/
uniqueValuesFor-003.ttl
File metadata and controls
60 lines (59 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
@prefix ex: <http://example.com/ns#> .
@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#> .
ex:TestShape
rdf:type sh:NodeShape ;
sh:targetSubjectsOf ex:id ;
sh:uniqueValuesFor ex:id ;
.
ex:ValidInstance1
ex:id "001" ;
.
ex:ValidInstance2
ex:id "002" ;
.
ex:InvalidInstance1
ex:id "DUP" ;
.
ex:InvalidInstance2
ex:id "DUP" ;
.
<>
rdf:type mf:Manifest ;
mf:entries (
<uniqueValuesFor-003>
) ;
.
<uniqueValuesFor-003>
rdf:type sht:Validate ;
rdfs:label "Test of sh:uniqueValuesFor at node shape 003 (targetSubjectsOf, global uniqueness)" ;
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:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:UniqueValuesForConstraintComponent ;
sh:sourceShape ex:TestShape ;
sh:value ex:InvalidInstance2 ;
] ;
sh:result [
rdf:type sh:ValidationResult ;
sh:focusNode ex:InvalidInstance2 ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:UniqueValuesForConstraintComponent ;
sh:sourceShape ex:TestShape ;
sh:value ex:InvalidInstance1 ;
] ;
] ;
mf:status sht:approved ;
.