Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hmottestad committed Sep 20, 2024
1 parent 4167f4d commit 5ce21f0
Show file tree
Hide file tree
Showing 36 changed files with 349 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ PREFIX sh: <http://www.w3.org/ns/shacl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

INSERT DATA {
ex:validPerson1 a ex:Person ;
ex:knows [ ex:knows [ ex:knows "1234" ]].
ex:validPerson1 a ex:Person ;
ex:knows1 ex:p2.

ex:p2 ex:knows2 ex:p3.
ex:p3 ex:knows3 "1234".

}
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
rsx:dataGraph rdf4j:nil;
rsx:shapesGraph rdf4j:nil;
sh:focusNode ex:validPerson1;
sh:resultPath _:e6bc97aad3a0460c9710ad6f22a9570d15019;
sh:resultPath _:2efb3d13c1264a1e82f94864ebbc900614999;
sh:resultSeverity sh:Violation;
sh:sourceConstraintComponent sh:NodeKindConstraintComponent;
sh:sourceShape [ a sh:PropertyShape;
sh:nodeKind sh:BlankNodeOrIRI;
sh:path _:e6bc97aad3a0460c9710ad6f22a9570d15019
sh:path _:2efb3d13c1264a1e82f94864ebbc900614999
];
sh:value "1234"
] .

_:e6bc97aad3a0460c9710ad6f22a9570d15019 sh:oneOrMorePath ex:knows .
_:2efb3d13c1264a1e82f94864ebbc900614999 sh:oneOrMorePath (ex:knows1 ex:knows2 ex:knows3) .
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@ PREFIX sh: <http://www.w3.org/ns/shacl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

INSERT DATA {
ex:validPerson1 ex:knows [ ex:knows [ ex:knows "1234" ]].
ex:validPerson1 a ex:Person ;
ex:knows1 ex:p2.

ex:p3 ex:knows3 "1234".

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,5 @@ PREFIX sh: <http://www.w3.org/ns/shacl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

INSERT DATA {
ex:validPerson1 a ex:Person .


ex:p2 ex:knows2 ex:p3.
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
rsx:dataGraph rdf4j:nil;
rsx:shapesGraph rdf4j:nil;
sh:focusNode ex:validPerson1;
sh:resultPath _:e6bc97aad3a0460c9710ad6f22a9570d15035;
sh:resultPath _:2efb3d13c1264a1e82f94864ebbc900614999;
sh:resultSeverity sh:Violation;
sh:sourceConstraintComponent sh:NodeKindConstraintComponent;
sh:sourceShape [ a sh:PropertyShape;
sh:nodeKind sh:BlankNodeOrIRI;
sh:path _:e6bc97aad3a0460c9710ad6f22a9570d15035
sh:path _:2efb3d13c1264a1e82f94864ebbc900614999
];
sh:value "1234"
] .

_:e6bc97aad3a0460c9710ad6f22a9570d15035 sh:oneOrMorePath ex:knows .
_:2efb3d13c1264a1e82f94864ebbc900614999 sh:oneOrMorePath (ex:knows1 ex:knows2 ex:knows3) .
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
PREFIX ex: <http://example.com/ns#>
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 xsd: <http://www.w3.org/2001/XMLSchema#>

INSERT DATA {
ex:validPerson1 a ex:Person .


ex:p2 ex:knows2 ex:p3.
ex:p3 ex:knows3 "1234".

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
PREFIX ex: <http://example.com/ns#>
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 xsd: <http://www.w3.org/2001/XMLSchema#>

INSERT DATA {
ex:validPerson1 ex:knows1 ex:p2.

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
@prefix ex: <http://example.com/ns#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rsx: <http://rdf4j.org/shacl-extensions#> .
@prefix rdf4j: <http://rdf4j.org/schema/rdf4j#> .

[] a sh:ValidationReport;
rdf4j:truncated false;
sh:conforms false;
sh:result [ a sh:ValidationResult;
rsx:dataGraph rdf4j:nil;
rsx:shapesGraph rdf4j:nil;
sh:focusNode ex:validPerson1;
sh:resultPath _:2efb3d13c1264a1e82f94864ebbc900614999;
sh:resultSeverity sh:Violation;
sh:sourceConstraintComponent sh:NodeKindConstraintComponent;
sh:sourceShape [ a sh:PropertyShape;
sh:nodeKind sh:BlankNodeOrIRI;
sh:path _:2efb3d13c1264a1e82f94864ebbc900614999
];
sh:value "1234"
] .

_:2efb3d13c1264a1e82f94864ebbc900614999 sh:oneOrMorePath (ex:knows1 ex:knows2 ex:knows3) .
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
PREFIX ex: <http://example.com/ns#>
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 xsd: <http://www.w3.org/2001/XMLSchema#>

INSERT DATA {
ex:validPerson1 a ex:Person ;
ex:knows1 ex:p2.

ex:p2 ex:knows2 ex:p3.

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
PREFIX ex: <http://example.com/ns#>
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 xsd: <http://www.w3.org/2001/XMLSchema#>

INSERT DATA {
ex:p3 ex:knows3 "1234".
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
@prefix ex: <http://example.com/ns#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rsx: <http://rdf4j.org/shacl-extensions#> .
@prefix rdf4j: <http://rdf4j.org/schema/rdf4j#> .

[] a sh:ValidationReport;
rdf4j:truncated false;
sh:conforms false;
sh:result [ a sh:ValidationResult;
rsx:dataGraph rdf4j:nil;
rsx:shapesGraph rdf4j:nil;
sh:focusNode ex:validPerson1;
sh:resultPath _:2efb3d13c1264a1e82f94864ebbc900614999;
sh:resultSeverity sh:Violation;
sh:sourceConstraintComponent sh:NodeKindConstraintComponent;
sh:sourceShape [ a sh:PropertyShape;
sh:nodeKind sh:BlankNodeOrIRI;
sh:path _:2efb3d13c1264a1e82f94864ebbc900614999
];
sh:value "1234"
] .

_:2efb3d13c1264a1e82f94864ebbc900614999 sh:oneOrMorePath (ex:knows1 ex:knows2 ex:knows3) .
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
PREFIX ex: <http://example.com/ns#>
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 xsd: <http://www.w3.org/2001/XMLSchema#>

INSERT DATA {
ex:validPerson1 ex:knows1 ex:p2.

ex:p2 ex:knows2 ex:p3.
ex:p3 ex:knows3 "1234".

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
PREFIX ex: <http://example.com/ns#>
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 xsd: <http://www.w3.org/2001/XMLSchema#>

INSERT DATA {
ex:validPerson1 a ex:Person .

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
@prefix ex: <http://example.com/ns#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rsx: <http://rdf4j.org/shacl-extensions#> .
@prefix rdf4j: <http://rdf4j.org/schema/rdf4j#> .

[] a sh:ValidationReport;
rdf4j:truncated false;
sh:conforms false;
sh:result [ a sh:ValidationResult;
rsx:dataGraph rdf4j:nil;
rsx:shapesGraph rdf4j:nil;
sh:focusNode ex:validPerson1;
sh:resultPath _:2efb3d13c1264a1e82f94864ebbc900614999;
sh:resultSeverity sh:Violation;
sh:sourceConstraintComponent sh:NodeKindConstraintComponent;
sh:sourceShape [ a sh:PropertyShape;
sh:nodeKind sh:BlankNodeOrIRI;
sh:path _:2efb3d13c1264a1e82f94864ebbc900614999
];
sh:value "1234"
] .

_:2efb3d13c1264a1e82f94864ebbc900614999 sh:oneOrMorePath (ex:knows1 ex:knows2 ex:knows3) .
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
ex:PersonShape a sh:NodeShape;
sh:targetClass ex:Person;
sh:property [
sh:path [ sh:oneOrMorePath ex:knows ];
sh:path [ sh:oneOrMorePath (ex:knows1 ex:knows2 ex:knows3) ];
sh:nodeKind sh:BlankNodeOrIRI
] .
rdf4j:nil sh:shapesGraph rdf4j:nil.


}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ PREFIX sh: <http://www.w3.org/ns/shacl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

INSERT DATA {
ex:validPerson1 a ex:Person ;
ex:knows [ ex:knows [ ex:knows [] ]].
ex:validPerson1 a ex:Person ;
ex:knows1 ex:p2.

ex:p2 ex:knows2 ex:p3.
ex:p3 ex:knows3 ex:p4.

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ PREFIX sh: <http://www.w3.org/ns/shacl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

INSERT DATA {
ex:validPerson1 ex:knows [ ex:knows [ ex:knows [] ]].
ex:validPerson1 a ex:Person ;
ex:knows1 ex:p2.

ex:p3 ex:knows3 ex:p4.

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ PREFIX sh: <http://www.w3.org/ns/shacl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

INSERT DATA {
ex:validPerson1 a ex:Person .

ex:p2 ex:knows2 ex:p3.
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
PREFIX ex: <http://example.com/ns#>
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 xsd: <http://www.w3.org/2001/XMLSchema#>

INSERT DATA {
ex:validPerson1 a ex:Person ;
ex:knows [ ex:knows [ ex:knows "1234" ]].


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
@prefix ex: <http://example.com/ns#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rsx: <http://rdf4j.org/shacl-extensions#> .
@prefix rdf4j: <http://rdf4j.org/schema/rdf4j#> .

[] a sh:ValidationReport;
rdf4j:truncated false;
sh:conforms false;
sh:result [ a sh:ValidationResult;
rsx:dataGraph rdf4j:nil;
rsx:shapesGraph rdf4j:nil;
sh:focusNode ex:validPerson1;
sh:resultPath _:e6bc97aad3a0460c9710ad6f22a9570d15019;
sh:resultSeverity sh:Violation;
sh:sourceConstraintComponent sh:NodeKindConstraintComponent;
sh:sourceShape [ a sh:PropertyShape;
sh:nodeKind sh:BlankNodeOrIRI;
sh:path _:e6bc97aad3a0460c9710ad6f22a9570d15019
];
sh:value "1234"
] .

_:e6bc97aad3a0460c9710ad6f22a9570d15019 sh:oneOrMorePath ex:knows .
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
PREFIX ex: <http://example.com/ns#>
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 xsd: <http://www.w3.org/2001/XMLSchema#>

INSERT DATA {
ex:validPerson1 ex:knows [ ex:knows [ ex:knows "1234" ]].
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
PREFIX ex: <http://example.com/ns#>
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 xsd: <http://www.w3.org/2001/XMLSchema#>

INSERT DATA {
ex:validPerson1 a ex:Person .


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
@prefix ex: <http://example.com/ns#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rsx: <http://rdf4j.org/shacl-extensions#> .
@prefix rdf4j: <http://rdf4j.org/schema/rdf4j#> .

[] a sh:ValidationReport;
rdf4j:truncated false;
sh:conforms false;
sh:result [ a sh:ValidationResult;
rsx:dataGraph rdf4j:nil;
rsx:shapesGraph rdf4j:nil;
sh:focusNode ex:validPerson1;
sh:resultPath _:e6bc97aad3a0460c9710ad6f22a9570d15035;
sh:resultSeverity sh:Violation;
sh:sourceConstraintComponent sh:NodeKindConstraintComponent;
sh:sourceShape [ a sh:PropertyShape;
sh:nodeKind sh:BlankNodeOrIRI;
sh:path _:e6bc97aad3a0460c9710ad6f22a9570d15035
];
sh:value "1234"
] .

_:e6bc97aad3a0460c9710ad6f22a9570d15035 sh:oneOrMorePath ex:knows .
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@prefix ex: <http://example.com/ns#> .
@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 xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf4j: <http://rdf4j.org/schema/rdf4j#> .

{
ex:PersonShape a sh:NodeShape;
sh:targetClass ex:Person;
sh:property [
sh:path [ sh:oneOrMorePath ex:knows ];
sh:nodeKind sh:BlankNodeOrIRI
] .
rdf4j:nil sh:shapesGraph rdf4j:nil.

}
Loading

0 comments on commit 5ce21f0

Please sign in to comment.