This repository has been archived by the owner on May 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
property.tarql.template
76 lines (69 loc) · 2.02 KB
/
property.tarql.template
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX {SUB}: <http://www.snik.eu/ontology/{SUB}/>
PREFIX meta: <http://www.snik.eu/ontology/meta/>
PREFIX apf: <http://jena.apache.org/ARQ/property#>
PREFIX ov: <http://open.vocab.org/terms/>
CONSTRUCT
{
<http://www.snik.eu/ontology/{SUB}> ov:defines ?p.
?p
a owl:ObjectProperty;
rdfs:label ?lde,?len;
rdfs:domain ?domain;
rdfs:range ?range;
skos:definition ?def;
{SUB}:page ?page;
rdfs:comment ?comment.
}
FROM <file:../property.csv>
WHERE
{
BIND (uri(concat(tarql:expandPrefix('{SUB}'),?PropertyUri)) AS ?p)
BIND (STRLANG(?PropertyDe,"de") AS ?lde)
BIND (STRLANG(?PropertyEn,"en") AS ?len)
BIND (uri(tarql:expandPrefixedName(?Domain)) AS ?domain)
BIND (uri(tarql:expandPrefixedName(?Range)) AS ?range)
BIND (STRLANG(?Definition,"de") AS ?def)
BIND (STRLANG(?Kommentar,"de") AS ?comment)
}
# Alterative Labels ##################################################
CONSTRUCT
{
?p skos:altLabel ?laen.
}
FROM <file:../property.csv>
WHERE
{
BIND (uri(concat(tarql:expandPrefix('{SUB}'),?PropertyUri)) AS ?p)
?laens apf:strSplit (?PropertyAltEn ";")
BIND (STRLANG(?laens,"en") AS ?laen)
FILTER(BOUND(?PropertyAltEn))
}
CONSTRUCT
{
?p skos:altLabel ?lade.
}
FROM <file:../property.csv>
WHERE
{
BIND (uri(concat(tarql:expandPrefix('{SUB}'),?PropertyUri)) AS ?p)
?lades apf:strSplit (?PropertyAltDe ";")
BIND (STRLANG(?lades,"de") AS ?lade)
FILTER(BOUND(?PropertyAltDe))
}
# Page #################################################################
CONSTRUCT
{
?p {SUB}:page ?pd.
}
FROM <file:../property.csv>
WHERE
{
BIND (uri(concat(tarql:expandPrefix('{SUB}'),?PropertyUri)) AS ?p)
?pdd apf:strSplit (?Seite ";")
BIND(xsd:positiveInteger(?pdd) as ?pd)
FILTER(BOUND(?Seite) && ?pd > 0)
}