Skip to content

Instantly share code, notes, and snippets.

@ewg118
Created July 12, 2023 18:11
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/1fda994c8a743c0a9fe98a513e4218bf to your computer and use it in GitHub Desktop.
Save ewg118/1fda994c8a743c0a9fe98a513e4218bf to your computer and use it in GitHub Desktop.
Corpus Nummorus query of coins related to types
PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/>
PREFIX dcmitype: <http://purl.org/dc/dcmitype/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
PREFIX nm: <http://nomisma.org/id/>
PREFIX nmo: <http://nomisma.org/ontology#>
PREFIX org: <http://www.w3.org/ns/org#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX void: <http://rdfs.org/ns/void#>
CONSTRUCT {?coin a nmo:NumismaticObject ;
dcterms:title ?title ;
dcterms:source ?source ;
nmo:hasTypeSeriesItem ?type ;
nmo:hasAxis ?axis ;
nmo:hasWeight ?weight ;
nmo:hasDiameter ?diameter ;
nmo:hasObverse ?obv ;
nmo:hasReverse ?rev ;
nmo:hasCollection ?collection ;
void:inDataset <https://www.corpus-nummorum.eu/> .
?obv foaf:thumbnail ?obvThumb ;
foaf:depiction ?obvRef .
?rev foaf:thumbnail ?revThumb ;
foaf:depiction ?revRef .}
WHERE {
SELECT * WHERE {
?coin a nmo:NumismaticObject ;
dcterms:title ?title ;
nmo:hasTypeSeriesItem ?type .
OPTIONAL {?coin nmo:hasDiameter|nmo:hasMaxDiameter ?diameter}
OPTIONAL {?coin nmo:hasWeight ?weight}
OPTIONAL {?coin nmo:hasAxis ?axis}
OPTIONAL {?coin dcterms:isPartOf ?hoard}
OPTIONAL {?coin nmo:hasObverse ?obv
OPTIONAL {?obv foaf:depiction ?obvRef}
OPTIONAL {?obv foaf:thumbnail ?obvThumb}}
OPTIONAL {?coin nmo:hasReverse ?rev
OPTIONAL {?rev foaf:depiction ?revRef}
OPTIONAL {?rev foaf:thumbnail ?revThumb}}
OPTIONAL {?coin nmo:hasCollection/rdf:value/skos:exactMatch ?collection}
}} LIMIT 30000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment