forked from zbw/sparql-queries
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpm20_references_for_property.rq
45 lines (44 loc) · 1.33 KB
/
pm20_references_for_property.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
# Properties with reference from PM20
#
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX hint: <http://www.bigdata.com/queryHints#>
#
select ?item ?prop ?propLabel
where
{
hint:Query hint:optimizer "None" .
values ( ?pid ) {
( 'P569' )
}
# stated in 20th century press archives and/or
# references a certain PM20 folder
{
?provenance pr:P248 wd:Q36948990 .
} union {
?provenance pr:P4293 [] .
}
?object prov:wasDerivedFrom ?provenance .
#
bind(uri(concat('http://www.wikidata.org/prop/',?pid)) as ?property)
?item ?property ?object .
#
# restrict to a selected archive
##?item wdt:P4293 ?pm20Id .
##filter(strstarts(?pm20Id, 'co/'))
#
# check if the item was created after start of the PM20 companies' linking phase
# at 2021-04-26, first new item Q106647030
##bind(xsd:integer(strafter(str(?wd), concat(str(wd:), 'Q'))) as ?qidNum)
##filter(?qidNum < 106647030)
#
# q&d property label
bind(uri(concat('http://www.wikidata.org/entity/', ?pid)) as ?prop)
?prop rdfs:label ?propLabelEn .
filter(lang(?propLabelEn) = 'en')
bind(str( ?propLabelEn) as ?propLabel)
}