-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcountry-shacl.ttl
36 lines (30 loc) · 1007 Bytes
/
country-shacl.ttl
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
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix schema: <http://schema.org/> .
@prefix ex: <http://example.com/ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@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#> .
# <http://example.com/ns#> sh:declare [
# rdf:type sh:PrefixDeclaration;
# sh:namespace "http://example.com/ns#"^^xsd:anyURI ;
# sh:prefix "ex"
# ] .
ex:LanguageExampleShape
a sh:NodeShape ;
sh:targetClass ex:Country ;
sh:property [sh:path ex:germanLabel ; sh:minCount 2 ];
sh:sparql [
a sh:SPARQLConstraint ; # This triple is optional
sh:message "Values are literals with German language tag. ?value" ;
sh:prefixes ex: ;
sh:select """
PREFIX ex: <http://example.com/ns#>
SELECT $this ?value
WHERE {
$this ex:germanLabel ?value .
FILTER (!isLiteral(?value) || !langMatches(lang(?value), "de"))
}
""" ;
]
.