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 22
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#1362 normalised targets with SPARQL
Signed-off-by: Håvard Ottestad <hmottestad@gmail.com>
- Loading branch information
1 parent
22cbab7
commit 9d60014
Showing
6 changed files
with
77 additions
and
1 deletion.
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
31 changes: 31 additions & 0 deletions
31
shacl/src/main/resources/shacl-sparql-inference/propertyShapeWithTarget.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,31 @@ | ||
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 ?p ?target . | ||
} | ||
|
||
insert { | ||
|
||
[ | ||
a sh:NodeShape ; | ||
?p ?target ; | ||
sh:property ?a ; | ||
] | ||
|
||
} | ||
|
||
where { | ||
|
||
?a | ||
sh:path ?path ; | ||
?p ?target ; | ||
. | ||
|
||
FILTER(?p in (sh:targetClass, sh:targetNode, sh:targetSubjectsOf, sh:targetObjectsOf )) | ||
} |
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
13 changes: 13 additions & 0 deletions
13
shacl/src/test/resources/test-cases/propertyShapeWithTarget/simple/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 |
---|---|---|
@@ -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:bigCo a ex:Company ; | ||
rdfs:label "Big Co", "Big Co"@en, "Big Company"@en, "Stor bedrift"@no. | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
shacl/src/test/resources/test-cases/propertyShapeWithTarget/simple/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,14 @@ | ||
@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#> . | ||
|
||
[ | ||
sh:targetClass ex:Company ; | ||
sh:path rdfs:label ; | ||
sh:uniqueLang true ; | ||
] . | ||
|
13 changes: 13 additions & 0 deletions
13
shacl/src/test/resources/test-cases/propertyShapeWithTarget/simple/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,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:bigCo a ex:Company ; | ||
rdfs:label "Big Co", "Big Co"@en, "Stor bedrift"@no. | ||
|
||
} |