Created
September 13, 2017 14:22
Star
You must be signed in to star a gist
Get IIIF services for coins connected to coin types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | |
PREFIX dcterms: <http://purl.org/dc/terms/> | |
PREFIX nm: <http://nomisma.org/id/> | |
PREFIX nmo: <http://nomisma.org/ontology#> | |
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> | |
PREFIX foaf: <http://xmlns.com/foaf/0.1/> | |
PREFIX void: <http://rdfs.org/ns/void#> | |
PREFIX svcs: <http://rdfs.org/sioc/services#> | |
SELECT ?object ?title ?identifier ?collection ?publisher ?dataset ?datasetTitle ?weight ?axis ?diameter ?obvService ?revService ?comService WHERE { | |
?object nmo:hasTypeSeriesItem <typeURI> ; | |
rdf:type nmo:NumismaticObject ; | |
dcterms:title ?title . | |
OPTIONAL { ?object dcterms:identifier ?identifier} | |
OPTIONAL { ?object nmo:hasCollection ?colUri . | |
?colUri skos:prefLabel ?collection FILTER(langMatches(lang(?collection), "EN"))} | |
?object void:inDataset ?dataset . | |
?dataset dcterms:publisher ?publisher ; | |
dcterms:title ?datasetTitle FILTER (lang(?datasetTitle) = "" || langMatches(lang(?datasetTitle), "en")) . | |
OPTIONAL { ?object nmo:hasWeight ?weight } | |
OPTIONAL { ?object nmo:hasAxis ?axis } | |
OPTIONAL { ?object nmo:hasDiameter ?diameter } | |
{ ?object foaf:depiction ?comRef . | |
?comRef svcs:has_service ?comService} | |
UNION { | |
{ ?object nmo:hasObverse/foaf:depiction ?obvRef. | |
?obvRef svcs:has_service ?obvService } | |
{ ?object nmo:hasReverse/foaf:depiction ?revRef . | |
?revRef svcs:has_service ?revService } | |
} | |
} ORDER BY ASC(?publisher) ASC(?collection) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment