This repository has been archived by the owner on Feb 22, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
eclipse-rdf4j/rdf4j#1354 support for sh:or with sh:nodeKind
Signed-off-by: Håvard Ottestad <[email protected]>
- Loading branch information
1 parent
fdaa8b7
commit 232a70b
Showing
13 changed files
with
143 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 4 additions & 11 deletions
15
...hacl-sparql-inference/sh_or_node_shape.rq → ...indValidateTarget/invalid/case1/query1.rq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +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#> | ||
|
||
delete{ | ||
?a sh:or ?or. | ||
} | ||
insert { | ||
|
||
?a sh:property [ sh:or ?or ] . | ||
INSERT DATA { | ||
|
||
} where { | ||
ex:validPerson1 ex:knows "hello" . | ||
|
||
?a a sh:NodeShape ; | ||
sh:or ?or . | ||
|
||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
shacl/src/test/resources/test-cases/or/nodeKindValidateTarget/invalid/case2/query1.rq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ex:knows 3 . | ||
|
||
[] ex:knows ex:validPerson2 . | ||
} |
12 changes: 12 additions & 0 deletions
12
shacl/src/test/resources/test-cases/or/nodeKindValidateTarget/invalid/case3/query1.rq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ex:knows 3 . | ||
ex:validPerson1 ex:knows [] . | ||
} |
13 changes: 13 additions & 0 deletions
13
shacl/src/test/resources/test-cases/or/nodeKindValidateTarget/invalid/case4/query1.rq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ex:knows 3 . | ||
ex:validPerson1 ex:knows [] . | ||
[] ex:knows ex:validPerson2 . | ||
} |
13 changes: 13 additions & 0 deletions
13
shacl/src/test/resources/test-cases/or/nodeKindValidateTarget/shacl.ttl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
@base <http://example.com/ns> . | ||
@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#> . | ||
|
||
ex:PersonShape | ||
a sh:NodeShape ; | ||
sh:targetObjectsOf ex:knows ; | ||
sh:or ([sh:nodeKind sh:IRI] [sh:nodeKind sh:BlankNode]) . | ||
|
12 changes: 12 additions & 0 deletions
12
shacl/src/test/resources/test-cases/or/nodeKindValidateTarget/valid/case1/query1.rq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ex:knows ex:validPerson1 . | ||
|
||
} |
12 changes: 12 additions & 0 deletions
12
shacl/src/test/resources/test-cases/or/nodeKindValidateTarget/valid/case2/query1.rq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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:knows [] . | ||
|
||
} |