-
Notifications
You must be signed in to change notification settings - Fork 1
/
function.tarql.template
53 lines (49 loc) · 1.46 KB
/
function.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
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:EnterpriseFunctionClassified;
hito:efClaFrom ?cat;
rdfs:comment ?co;
hito:internalId ?num;
dcterms:source ?dcts;
rdfs:label ?len;
rdfs:label ?lde.
}
FROM <file:../function.csv>
WHERE
{
BIND (URI(CONCAT(tarql:expandPrefix('hito'),?uri)) AS ?f)
BIND (IF(?comment != '', STRLANG(?comment,"en"), ?nothing) AS ?co)
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}FunctionCatalogue")) 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 dc:source ?dce.
}
FROM <file:../function.csv>
WHERE
{
BIND (URI(CONCAT(tarql:expandPrefix('hito'),?uri)) AS ?f)
?dce apf:strSplit (?dcesource ";")
}
CONSTRUCT
{
?f hito:subFunctionOf ?sup.
}
FROM <file:../function.csv>
WHERE
{
BIND (URI(CONCAT(tarql:expandPrefix('hito'),?uri)) AS ?f)
?supe apf:strSplit (?superfunction ";")
BIND (URI(CONCAT(tarql:expandPrefix('hito'),?supe)) AS ?sup)
}