Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
SPARQL query of (old) BM data model, running locally, for the coins of Philip II from Le Rider 1977
PREFIX bmo: <>
PREFIX dcmitype: <>
PREFIX ecrm: <>
PREFIX foaf: <>
PREFIX object: <>
PREFIX rdf: <>
PREFIX rdfs: <>
PREFIX skos: <>
PREFIX thes: <>
PREFIX xsd: <>
PREFIX thesDimension: <>
SELECT ?s ?regno ?ref ?image ?weight ?axis ?diameter ?objectId ?hoard WHERE {
?s ecrm:P108i_was_produced_by/ecrm:P9_consists_of/ecrm:P17_was_motivated_by <> ;
bmo:PX_display_wrap ?ref . FILTER regex(?ref, "le\\sRider\\s1977\\s[0-9]").
?s ecrm:P1_is_identified_by ?id1 .
?s ecrm:P1_is_identified_by ?id2 .
?id1 ecrm:P2_has_type <>;
rdfs:label ?regno .
?id2 ecrm:P2_has_type <> ;
rdfs:label ?objectId
FILTER (contains(str(?s), 'CGR'))
OPTIONAL {?s bmo:PX_has_main_representation ?image }
OPTIONAL { ?s ecrm:P43_has_dimension ?wDim .
?wDim ecrm:P2_has_type thesDimension:weight .
?wDim ecrm:P90_has_value ?weight}
OPTIONAL { ?s ecrm:P43_has_dimension ?wAxis .
?wAxis ecrm:P2_has_type thesDimension:die-axis .
?wAxis ecrm:P90_has_value ?axis}
OPTIONAL {?s ecrm:P43_has_dimension ?wDiameter .
?wDiameter ecrm:P2_has_type thesDimension:diameter .
?wDiameter ecrm:P90_has_value ?diameter}
OPTIONAL {?s bmo:PX_display_wrap ?hoard . FILTER contains(?hoard, "IGCH")}
} ORDER BY ?ref
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment