@netwerk-digitaal-erfgoed/network-of-terms-catalog 6.13.1 → 6.14.0
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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
|
|
2
2
|
PREFIX gn: <https://www.geonames.org/ontology#>
|
|
3
|
+
PREFIX text: <http://jena.apache.org/text#>
|
|
3
4
|
|
|
4
5
|
CONSTRUCT {
|
|
5
6
|
?uri a skos:Concept ;
|
|
@@ -10,13 +11,14 @@ CONSTRUCT {
|
|
|
10
11
|
?broader skos:prefLabel ?broader_prefLabel .
|
|
11
12
|
}
|
|
12
13
|
WHERE {
|
|
13
|
-
?uri
|
|
14
|
+
?uri text:query (gn:name gn:alternateName ?query) ;
|
|
15
|
+
a gn:Feature ;
|
|
14
16
|
gn:featureClass ?featureClass ;
|
|
15
17
|
gn:name ?prefLabel ;
|
|
16
18
|
gn:countryCode ?countryCode ;
|
|
17
19
|
?names ?name .
|
|
18
20
|
|
|
19
|
-
BIND(CONCAT(?prefLabel," (",UCASE(?countryCode),")") as ?prefLabel_ext)
|
|
21
|
+
BIND(CONCAT(?prefLabel," (",UCASE(?countryCode),")") as ?prefLabel_ext)
|
|
20
22
|
|
|
21
23
|
# Search in names and alternative names.
|
|
22
24
|
VALUES ?names { gn:name gn:alternateName }
|
|
@@ -24,10 +26,6 @@ WHERE {
|
|
|
24
26
|
# Limit results to places (P), localities (L), administrative levels (A) and water surfaces (H).
|
|
25
27
|
VALUES ?featureClass { gn:P gn:L gn:A gn:H }
|
|
26
28
|
|
|
27
|
-
# Select results that start with the search string
|
|
28
|
-
# Using contains() leads to too much noise
|
|
29
|
-
FILTER(STRSTARTS(LCASE(?name), LCASE($query)))
|
|
30
|
-
|
|
31
29
|
OPTIONAL {
|
|
32
30
|
?uri gn:alternateName ?altLabel .
|
|
33
31
|
FILTER(?altLabel != "")
|