Skip to content

Commit f1e4bf0

Browse files
Create places
1 parent ac4b60e commit f1e4bf0

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

  • sparql/beta/authority-record-generator
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# prefixes
2+
PREFIX wd: <https://catalog.digital-scriptorium.org/entity/>
3+
PREFIX wds: <https://catalog.digital-scriptorium.org/entity/statement/>
4+
PREFIX wdv: <https://catalog.digital-scriptorium.org/value/>
5+
PREFIX wdt: <https://catalog.digital-scriptorium.org/prop/direct/>
6+
PREFIX p: <https://catalog.digital-scriptorium.org/prop/>
7+
PREFIX ps: <https://catalog.digital-scriptorium.org/prop/statement/>
8+
PREFIX pq: <https://catalog.digital-scriptorium.org/prop/qualifier/>
9+
PREFIX wikibase: <http://wikiba.se/ontology#>
10+
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
11+
12+
SELECT ?authorityValue ?authorityValueLabel ?authorityTypeLabel ?externalID
13+
14+
WHERE {
15+
16+
BIND (wd:Q16 as ?authorityType) # place authority
17+
18+
?authorityValue wdt:P16 ?authorityType .
19+
# find authority records by authority type specified above
20+
OPTIONAL { ?authorityValue wdt:P44 ?externalID . }
21+
# find external IDs matched to authority value
22+
23+
SERVICE wikibase:label {
24+
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
25+
# allows English language labels to be returned for Wikibase items
26+
}
27+
}
28+
ORDER BY ASC (?authorityValueLabel)

0 commit comments

Comments
 (0)