-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathLinkedGeoData-Triplify-IndividualViews-Wiki.sml
84 lines (71 loc) · 2.44 KB
/
LinkedGeoData-Triplify-IndividualViews-Wiki.sml
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
77
78
79
80
81
82
83
// Sparqlify supports using multiple mapping files using the -m file1 -m file2
// This file adds wikipedia resources
// Its a separate file because it relies on views that rely on the URL extension,
// which is not shipped as a package and needs to be compiled
// So it will not work out of the box
/**
* Sparqlify configuration file for LinkedGeoData
*
* Triplify flavour
*
*/
// Prefixes (these will also be used in the query responses)
Prefix spy:<http://aksw.org/sparqlify/>
Prefix owl:<http://www.w3.org/2002/07/owl#>
Prefix lgdm:<http://linkedgeodata.org/meta/>
Create View nodes_wiki_en As
Construct {
?w a lgdm:WikiLink .
?w owl:sameAs ?l .
?l owl:sameAs ?d .
}
With
?w = uri('http://linkedgeodata.org/wp/', ?v)
?l = uri(lgd:node, ?node_id)
?d = uri('http://dbpedia.org/resource/', ?v)
From
[[SELECT node_id, k, v FROM lgd_node_tags_wiki WHERE k = 'wikipedia' OR k = 'wikipedia:en']]
Create View ways_wiki_en As
Construct {
?w a lgdm:WikiLink .
?w owl:sameAs ?l .
?l owl:sameAs ?d .
}
With
?w = uri('http://linkedgeodata.org/wp/', ?v)
?l = uri(lgd:way, ?way_id)
?d = uri('http://dbpedia.org/resource/', ?v)
From
[[SELECT way_id, k, v FROM lgd_way_tags_wiki WHERE k = 'wikipedia' OR k = 'wikipedia:en']]
Create View relations_wiki_en As
Construct {
?w a lgdm:WikiLink .
?w owl:sameAs ?l .
?l owl:sameAs ?d .
}
With
?w = uri('http://linkedgeodata.org/wp/', ?v)
?l = uri(lgd:relation, ?relation_id)
?d = uri('http://dbpedia.org/resource/', ?v)
From
[[SELECT relation_id, k, v FROM lgd_relation_tags_wiki WHERE k = 'wikipedia' OR k = 'wikipedia:en']]
/**
* Copyright (C) 2009-2012, LinkedGeoData team at the MOLE research
* group at AKSW / University of Leipzig
*
* This file is part of LinkedGeoData.
*
* LinkedGeoData is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* LinkedGeoData is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/