-
Notifications
You must be signed in to change notification settings - Fork 1
/
feature.tarql.template
59 lines (53 loc) · 1.79 KB
/
feature.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
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX hito: <http://hitontology.eu/ontology/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX bb: <http://www.snik.eu/ontology/bb/>
CONSTRUCT
{
?f a hito:FeatureClassified;
hito:fClaFrom ?cat;
rdfs:comment ?co;
skos:definition ?def;
hito:internalId ?num;
dcterms:source ?dcts;
rdfs:label ?len;
rdfs:label ?lde.
}
FROM <file:../feature.csv>
WHERE
{
BIND (URI(CONCAT(tarql:expandPrefix('hito'),?uri)) AS ?f)
BIND (IF(?comment != '', STRLANG(?comment,"en"), ?nothing) AS ?co)
BIND (IF(?definition!= '', STRLANG(?definition,"en"), ?nothing) AS ?def)
BIND (IF(?en != '', STRLANG(?en,"en"), ?nothing) AS ?len)
BIND (IF(?de != '', STRLANG(?de,"de"), ?nothing) AS ?lde)
BIND (URI(CONCAT(tarql:expandPrefix('hito'),"{SUB}FeatureCatalogue")) AS ?cat)
BIND (IF(BOUND(?n)&&(?n != ''), ?n, ?nothing) AS ?num)
BIND (IF(BOUND(?dctsource)&&(?dctsource != ''), URI(tarql:expandPrefixedName(?dctsource)), ?nothing) AS ?dcts)
}
CONSTRUCT
{
?f ?suprel ?sup.
}
FROM <file:../feature.csv>
WHERE
{
BIND (URI(CONCAT(tarql:expandPrefix('hito'),?uri)) AS ?f)
BIND (IF(BOUND(?supertype)&&(?supertype="EnterpriseFunctionClassified"), hito:supportsFunctionClassified, hito:subFeatureOf) AS ?suprel)
?supe apf:strSplit (?super ";")
BIND (URI(CONCAT(tarql:expandPrefix('hito'),?supe)) AS ?sup)
}
CONSTRUCT
{
?f skos:altLabel ?synonymen.
}
FROM <file:../feature.csv>
WHERE
{
BIND (URI(CONCAT(tarql:expandPrefix('hito'),?uri)) AS ?f)
?synonym apf:strSplit (?synonyms ";")
BIND (STRLANG(?synonym,"en") AS ?synonymen)
}