|
| 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 | +# find holding and dated information for manuscripts with DS records |
| 13 | +SELECT |
| 14 | +?record |
| 15 | +?holdingLabel |
| 16 | +?link |
| 17 | +?recordLabel |
| 18 | +?datedStatusLabel |
| 19 | +(GROUP_CONCAT(?dateRecorded;separator="|") as ?datesAsRecorded) |
| 20 | + |
| 21 | +WHERE |
| 22 | +{ |
| 23 | +# statement: record is an instance of a DS record |
| 24 | + ?record wdt:P16 wd:Q3 . |
| 25 | +# statements: record may have a date recorded and may have a dated status |
| 26 | + OPTIONAL { ?record wdt:P23 ?dateRecorded } |
| 27 | + OPTIONAL { ?record wdt:P26 ?datedStatus } |
| 28 | +# statement: record describes manuscript object |
| 29 | + ?record wdt:P3 ?ms . |
| 30 | +# statement: manuscript object has holding information |
| 31 | + ?ms wdt:P2 ?holding . |
| 32 | +# statement: holding information may have link to online institutional record |
| 33 | + OPTIONAL { ?holding wdt:P9 ?link } |
| 34 | + |
| 35 | +# return English language labels |
| 36 | +SERVICE wikibase:label { |
| 37 | + bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . } |
| 38 | + } |
| 39 | +GROUP BY ?record ?holdingLabel ?link ?recordLabel ?datedStatusLabel |
| 40 | +ORDER BY DESC (?datedStatusLabel) |
0 commit comments