Skip to content

Instantly share code, notes, and snippets.

@ewg118
Last active October 23, 2015 12:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ewg118/6c574644a3341a80c7af to your computer and use it in GitHub Desktop.
Save ewg118/6c574644a3341a80c7af to your computer and use it in GitHub Desktop.
SPARQL query to get distinct findspots for a certain mint.
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dcmitype: <http://purl.org/dc/dcmitype/>
PREFIX nm: <http://nomisma.org/id/>
PREFIX nmo: <http://nomisma.org/ontology#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
SELECT DISTINCT ?findspot ?lat ?long ?count WHERE {
{ ?coinType nmo:hasMint <URI> ;
a nmo:TypeSeriesItem .
?object nmo:hasTypeSeriesItem ?coinType ;
rdf:type nmo:NumismaticObject ;
nmo:hasFindspot ?findspot }
UNION { ?coinType nmo:hasMint <URI> ;
a nmo:TypeSeriesItem .
?object nmo:hasTypeSeriesItem ?coinType ;
rdf:type nmo:NumismaticObject ;
dcterms:isPartOf ?hoard .
?hoard nmo:hasFindspot ?findspot }
UNION { ?coinType nmo:hasMint <URI> ;
a nmo:TypeSeriesItem .
?contents nmo:hasTypeSeriesItem ?coinType ;
a dcmitype:Collection .
?object dcterms:tableOfContents ?contents ;
nmo:hasFindspot ?findspot }
UNION { ?contents nmo:hasMint <URI> ;
a dcmitype:Collection .
?object dcterms:tableOfContents ?contents ;
nmo:hasFindspot ?findspot }
?findspot geo:lat ?lat ; geo:long ?long}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment