Skip to content

Commit a8632a7

Browse files
committed
chore: make sourceShape a property shape where applicable
1 parent e3a91de commit a8632a7

File tree

4 files changed

+30
-17
lines changed

4 files changed

+30
-17
lines changed

shacl12-test-suite/tests/core/property/maxListLength-001.ttl

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@
1111
ex:PersonShape
1212
rdf:type sh:NodeShape ;
1313
sh:targetClass ex:Person ;
14-
sh:property [
15-
sh:path ex:hobbies ;
16-
sh:maxListLength 2 ;
17-
] ;
14+
sh:property ex:PersonShape-hobbies ;
15+
.
16+
17+
ex:PersonShape-hobbies
18+
rdf:type sh:PropertyShape ;
19+
sh:path ex:hobbies ;
20+
sh:maxListLength 2 ;
1821
.
1922

2023
# Satisfies all constraints
@@ -66,7 +69,7 @@ _:b1
6669
sh:resultPath ex:hobbies ;
6770
sh:resultSeverity sh:Violation ;
6871
sh:sourceConstraintComponent sh:MaxListLengthConstraintComponent ;
69-
sh:sourceShape ex:PersonShape ;
72+
sh:sourceShape ex:PersonShape-hobbies ;
7073
sh:value _:b1 ;
7174
] ;
7275
sh:result [
@@ -75,7 +78,7 @@ _:b1
7578
sh:resultPath ex:hobbies ;
7679
sh:resultSeverity sh:Violation ;
7780
sh:sourceConstraintComponent sh:MaxListLengthConstraintComponent ;
78-
sh:sourceShape ex:PersonShape ;
81+
sh:sourceShape ex:PersonShape-hobbies ;
7982
sh:value ex:notAList ;
8083
] ;
8184
] ;

shacl12-test-suite/tests/core/property/memberShape-001.ttl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ _:b1
7171
sh:resultPath ex:testProperty ;
7272
sh:resultSeverity sh:Violation ;
7373
sh:sourceConstraintComponent sh:MemberShapeConstraintComponent ;
74-
sh:sourceShape ex:TestShape ;
74+
sh:sourceShape ex:TestShape-testProperty ;
7575
sh:value _:b1 ;
7676
sh:detail [
7777
rdf:type sh:ValidationResult ;

shacl12-test-suite/tests/core/property/minListLength-001.ttl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ ex:PersonShape
1717
] ;
1818
.
1919

20+
ex:PersonShape-skills
21+
rdf:type sh:PropertyShape ;
22+
sh:path ex:skills ;
23+
sh:minListLength 1 ;
24+
.
25+
2026
# Satisfies all constraints
2127
ex:person1
2228
rdf:type ex:Person ;
@@ -57,7 +63,7 @@ ex:person3
5763
sh:resultPath ex:skills ;
5864
sh:resultSeverity sh:Violation ;
5965
sh:sourceConstraintComponent sh:MinListLengthConstraintComponent ;
60-
sh:sourceShape ex:PersonShape ;
66+
sh:sourceShape ex:PersonShape-skills ;
6167
sh:value rdf:nil ;
6268
] ;
6369
sh:result [
@@ -66,7 +72,7 @@ ex:person3
6672
sh:resultPath ex:skills ;
6773
sh:resultSeverity sh:Violation ;
6874
sh:sourceConstraintComponent sh:MinListLengthConstraintComponent ;
69-
sh:sourceShape ex:PersonShape ;
75+
sh:sourceShape ex:PersonShape-skills ;
7076
sh:value ex:notAList ;
7177
] ;
7278
] ;

shacl12-test-suite/tests/core/property/uniqueMembers-001.ttl

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@
1111
ex:PersonShape
1212
rdf:type sh:NodeShape ;
1313
sh:targetClass ex:Person ;
14-
sh:property [
15-
sh:path ex:preferences ;
16-
sh:uniqueMembers true ;
17-
] ;
14+
sh:property ex:PersonShape-preferences
15+
;
16+
.
17+
18+
ex:PersonShape-preferences
19+
rdf:type sh:PropertyShape ;
20+
sh:path ex:preferences ;
21+
sh:uniqueMembers true ;
1822
.
1923

2024
# Satisfies all constraints
@@ -66,23 +70,23 @@ _:b1
6670
sh:resultPath ex:preferences ;
6771
sh:resultSeverity sh:Violation ;
6872
sh:sourceConstraintComponent sh:UniqueMembersConstraintComponent ;
69-
sh:sourceShape ex:PersonShape ;
73+
sh:sourceShape ex:PersonShape-preferences ;
7074
sh:value _:b1 ;
7175
sh:detail [
7276
rdf:type sh:ValidationResult ;
7377
sh:focusNode ex:person3 ;
7478
sh:resultPath ex:preferences ;
7579
sh:resultSeverity sh:Violation ;
7680
sh:sourceConstraintComponent sh:UniqueMembersConstraintComponent ;
77-
sh:sourceShape ex:PersonShape ;
81+
sh:sourceShape ex:PersonShape-preferences ;
7882
sh:value "coffee" ;
7983
], [
8084
rdf:type sh:ValidationResult ;
8185
sh:focusNode ex:person3 ;
8286
sh:resultPath ex:preferences ;
8387
sh:resultSeverity sh:Violation ;
8488
sh:sourceConstraintComponent sh:UniqueMembersConstraintComponent ;
85-
sh:sourceShape ex:PersonShape ;
89+
sh:sourceShape ex:PersonShape-preferences ;
8690
sh:value "tea" ;
8791
]
8892
] ;
@@ -92,7 +96,7 @@ _:b1
9296
sh:resultPath ex:preferences ;
9397
sh:resultSeverity sh:Violation ;
9498
sh:sourceConstraintComponent sh:UniqueMembersConstraintComponent ;
95-
sh:sourceShape ex:PersonShape ;
99+
sh:sourceShape ex:PersonShape-preferences ;
96100
sh:value ex:notAList ;
97101
] ;
98102
] ;

0 commit comments

Comments
 (0)