@netwerk-digitaal-erfgoed/network-of-terms-catalog 5.10.1 → 5.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5,43 +5,37 @@ PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
|
|
|
5
5
|
PREFIX wikibase: <http://wikiba.se/ontology#>
|
|
6
6
|
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
|
|
7
7
|
PREFIX wd: <http://www.wikidata.org/entity/>
|
|
8
|
+
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
|
8
9
|
|
|
9
10
|
CONSTRUCT {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
?item skos:altLabel ?fullName .
|
|
15
|
-
?item skos:altLabel ?altLabel .
|
|
16
|
-
?item skos:scopeNote ?description .
|
|
11
|
+
?item a skos:Concept ;
|
|
12
|
+
skos:prefLabel ?streetName ;
|
|
13
|
+
skos:altLabel ?altLabel ;
|
|
14
|
+
skos:scopeNote ?description .
|
|
17
15
|
}
|
|
18
16
|
WHERE {
|
|
19
17
|
SERVICE wikibase:mwapi {
|
|
20
18
|
bd:serviceParam wikibase:endpoint "www.wikidata.org" .
|
|
21
|
-
|
|
22
|
-
# where by default the English pref and alt labels are searched.
|
|
23
|
-
# Setting the required language to something else than "en"
|
|
24
|
-
# results in an additional search in the pref and alt labels for this language.
|
|
25
|
-
bd:serviceParam wikibase:api "EntitySearch" .
|
|
19
|
+
bd:serviceParam wikibase:api "Search" .
|
|
26
20
|
bd:serviceParam mwapi:language "nl" .
|
|
27
|
-
bd:serviceParam mwapi:
|
|
28
|
-
?item wikibase:apiOutputItem mwapi:
|
|
21
|
+
bd:serviceParam mwapi:srsearch ?query .
|
|
22
|
+
?item wikibase:apiOutputItem mwapi:title .
|
|
29
23
|
}
|
|
30
24
|
{
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
# select Streets
|
|
26
|
+
?item wdt:P31 wd:Q79007
|
|
33
27
|
}
|
|
34
|
-
UNION
|
|
28
|
+
UNION
|
|
35
29
|
{
|
|
36
|
-
|
|
37
|
-
|
|
30
|
+
# select Squares
|
|
31
|
+
?item wdt:P31 wd:Q174782
|
|
38
32
|
}
|
|
39
33
|
?item wdt:P17 wd:Q55 .
|
|
40
34
|
?item wdt:P131 ?administration .
|
|
41
35
|
OPTIONAL {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
36
|
+
?item wdt:P276 ?location .
|
|
37
|
+
?location rdfs:label ?locationName .
|
|
38
|
+
FILTER LANGMATCHES(LANG(?locationName),"nl")
|
|
45
39
|
}
|
|
46
40
|
OPTIONAL {
|
|
47
41
|
?item schema:description ?description
|
|
@@ -55,14 +49,17 @@ WHERE {
|
|
|
55
49
|
?administration rdfs:label ?administrationName .
|
|
56
50
|
FILTER LANGMATCHES(LANG(?streetName),"nl")
|
|
57
51
|
FILTER LANGMATCHES(LANG(?administrationName),"nl")
|
|
58
|
-
|
|
52
|
+
|
|
53
|
+
# Some streets come with altLabel ‘Street name (Place name)’. For those that don’t, construct the altLabel manually.
|
|
59
54
|
BIND(
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
55
|
+
COALESCE(
|
|
56
|
+
?altLabel,
|
|
57
|
+
IF(
|
|
58
|
+
BOUND(?locationName),
|
|
59
|
+
CONCAT(?streetName," (",?locationName,")"),
|
|
60
|
+
CONCAT(?streetName," (",?administrationName,")")
|
|
61
|
+
)
|
|
62
|
+
) as ?altLabel
|
|
66
63
|
)
|
|
67
64
|
}
|
|
68
|
-
LIMIT 1000
|
|
65
|
+
LIMIT 1000
|