forked from zbw/sparql-queries
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathware_categories_for_wikidata.rq
45 lines (43 loc) · 1.23 KB
/
ware_categories_for_wikidata.rq
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
# Extract information for creating ware category items in Wikidata
#
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX zbwext: <http://zbw.eu/namespaces/zbw-extensions/>
#
select ?notationLong ?labelDe ?labelEn
('Warensystematikstelle des Pressearchiv 20. Jahrhundert' as ?descrDe)
('commodities/wares category of the 20th Century Press Archives' as ?descrEn)
?wareId
('Q111973176' as ?classQid)
('Q113375556' as ?partOf)
where {
#
graph <http://zbw.eu/beta/ware/ng> {
?cat a skos:Concept ;
dct:identifier ?wareId .
#
?cat skos:prefLabel ?labelLangDe .
filter(lang(?labelLangDe) = 'de')
bind(str(?labelLangDe) as ?labelDe)
optional {
?cat skos:prefLabel ?labelLangEn .
filter(lang(?labelLangEn) = 'en')
bind(str(?labelLangEn) as ?labelEn)
}
optional {
?cat zbwext:folderCount ?folderCount .
}
# temporary restriction
filter(bound(?folderCount))
#
# filter out categories already existing in WD
} minus {
service <https://query.wikidata.org/sparql> {
?wd wdt:P10890 ?wareId .
}
}
}
order by ?labelDe
limit 100