-
Notifications
You must be signed in to change notification settings - Fork 1
/
attribute.tarql.template
58 lines (51 loc) · 2.92 KB
/
attribute.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
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/>
PREFIX dbr: <http://dbpedia.org/resource/>
PREFIX swol: <http://www.ebi.ac.uk/swo/license/>
CONSTRUCT
{
?product a hito:SoftwareProduct;
rdfs:label ?labelO;
rdfs:comment ?commentO;
dcterms:source ?dctsourceO;
hito:repository ?repositoryO;
hito:programmingLibrary ?programmingLibraryO;
hito:homepage ?homepageO;
hito:language ?languageO;
hito:client ?clientO;
hito:databaseSystem ?databaseSystemO;
hito:interoperability ?interoperabilityO;
hito:programmingLanguage ?programmingLanguageO;
hito:operatingSystem ?operatingSystemO;
hito:softwareProductComponent ?componentO;
hito:license ?licenseO.
}
FROM <file:../attribute.csv>
WHERE
{
BIND (URI(CONCAT(tarql:expandPrefix('hito'),"{SUB}")) AS ?product)
# Datatype Properties
BIND (IF(BOUND(?label)&&(?label != ''), STRLANG(?label,"en"), ?nothing) AS ?labelO)
BIND (IF(BOUND(?comment)&&(?comment != ''), STRLANG(?comment,"en"), ?nothing) AS ?commentO)
# rdfs:Resource, any URL, no specific prefix
BIND (IF(BOUND(?dctsource)&&(?dctsource != ''), URI(?dctsource), ?nothing) AS ?dctsourceO)
BIND (IF(BOUND(?repository)&&(?repository != ''), URI(?repository), ?nothing) AS ?repositoryO)
BIND (IF(BOUND(?homepage)&&(?homepage != ''), URI(?homepage), ?nothing) AS ?homepageO)
# DBpedia resource namespace
BIND (IF(BOUND(?language)&&(?language != ''), URI(CONCAT(tarql:expandPrefix('dbr'),?language)), ?nothing) AS ?languageO)
BIND (IF(BOUND(?programmingLanguage)&&(?programmingLanguage != ''), URI(CONCAT(tarql:expandPrefix('dbr'),?programmingLanguage)), ?nothing) AS ?programmingLanguageO)
BIND (IF(BOUND(?operatingSystem)&&(?operatingSystem != ''), URI(CONCAT(tarql:expandPrefix('dbr'),?operatingSystem)), ?nothing) AS ?operatingSystemO)
# HITO namespace
BIND (IF(BOUND(?client)&&(?client != ''), URI(CONCAT(tarql:expandPrefix('hito'),?client)), ?nothing) AS ?clientO)
BIND (IF(BOUND(?databaseSystem)&&(?databaseSystem != ''), URI(CONCAT(tarql:expandPrefix('hito'),?databaseSystem)), ?nothing) AS ?databaseSystemO)
BIND (IF(BOUND(?interoperability)&&(?interoperability != ''), URI(CONCAT(tarql:expandPrefix('hito'),?interoperability)), ?nothing) AS ?interoperabilityO)
BIND (IF(BOUND(?license)&&(?license != ''), URI(CONCAT(tarql:expandPrefix('swol'),?license)), ?nothing) AS ?licenseO)
BIND (IF(BOUND(?component)&&(?component != ''), URI(CONCAT(tarql:expandPrefix('hito'),?component)), ?nothing) AS ?componentO)
# programming library not specified yet
BIND (IF(BOUND(?programmingLibrary)&&(?programmingLibrary != ''), URI(CONCAT(tarql:expandPrefix('hito'),?programmingLibrary)), ?nothing) AS ?programmingLibraryO)
}