Skip to content

Instantly share code, notes, and snippets.

@ewg118
Last active June 28, 2019 20:00
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/cd56f36d1cd8879aa5606881e0028c6c to your computer and use it in GitHub Desktop.
Save ewg118/cd56f36d1cd8879aa5606881e0028c6c to your computer and use it in GitHub Desktop.
New ResearchSpace British Museum Greek vase SPARQL query
PREFIX ecrm: <http://www.cidoc-crm.org/cidoc-crm/>
PREFIX thes: <http://collection.britishmuseum.org/id/thesauri/>
PREFIX rs: <http://www.researchspace.org/ontology/>
PREFIX bmo: <http://collection.britishmuseum.org/id/ontology/>
PREFIX object: <http://collection.britishmuseum.org/id/object/>
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#>
SELECT ?object ?shape ?codexid ?regno ?startDate ?endDate ?producedAt ?findspot ?desc ?height ?width ?length ?thickness ?weight ?img (group_concat(distinct ?ware;separator="|") as ?wares) (group_concat(distinct ?material;separator="|") as ?materials) (group_concat(distinct ?period;separator="|") as ?periods) (group_concat(distinct ?artist;separator="|") as ?artists) (group_concat(distinct ?technique;separator="|") as ?techniques) WHERE {
?object ecrm:P50_has_current_keeper <http://collection.britishmuseum.org/id/thesauri/department/G> ;
rs:PX_ware ?ware ;
rs:PX_object_type ?shape ;
ecrm:P45_consists_of ?material ;
ecrm:P108i_was_produced_by ?prod ;
ecrm:P1_is_identified_by ?id1 ;
ecrm:P1_is_identified_by ?id2 .
?id1 ecrm:P2_has_type <http://collection.britishmuseum.org/id/thesauri/identifier/codexid> ;
rdfs:label ?codexid .
?id2 ecrm:P2_has_type <http://collection.britishmuseum.org/id/thesauri/identifier/regno> ;
rdfs:label ?regno .
OPTIONAL {?prod ecrm:P9_consists_of/ecrm:P4_has_time-span ?span .
?span ecrm:P82a_begin_of_the_begin ?startDate ;
ecrm:P82b_end_of_the_end ?endDate}
OPTIONAL {?prod ecrm:P9_consists_of/ecrm:P10_falls_within ?period}
OPTIONAL {?prod ecrm:P9_consists_of/ecrm:P14_carried_out_by ?artist}
OPTIONAL {?prod ecrm:P9_consists_of/ecrm:P32_used_general_technique ?technique}
OPTIONAL {?prod ecrm:P9_consists_of/ecrm:P7_took_place_at ?producedAt}
OPTIONAL {?object ecrm:P12i_was_present_at ?foundAt .
?foundAt a rs:EX_Discovery ;
ecrm:P7_took_place_at ?findspot}
OPTIONAL {?object rs:PX_physical_description ?desc}
OPTIONAL {?object ecrm:P43_has_dimension ?dim1 .
?dim1 ecrm:P2_has_type <http://collection.britishmuseum.org/id/thesauri/dimension/height> ;
ecrm:P90_has_value ?height
}
OPTIONAL {?object ecrm:P43_has_dimension ?dim2 .
?dim2 ecrm:P2_has_type <http://collection.britishmuseum.org/id/thesauri/dimension/width> ;
ecrm:P90_has_value ?width
}
OPTIONAL {?object ecrm:P43_has_dimension ?dim3 .
?dim3 ecrm:P2_has_type <http://collection.britishmuseum.org/id/thesauri/dimension/weight> ;
ecrm:P90_has_value ?weight
}
OPTIONAL {?object ecrm:P43_has_dimension ?dim4 .
?dim4 ecrm:P2_has_type <http://collection.britishmuseum.org/id/thesauri/dimension/length> ;
ecrm:P90_has_value ?length
}
OPTIONAL {?object ecrm:P43_has_dimension ?dim5 .
?dim5 ecrm:P2_has_type <http://collection.britishmuseum.org/id/thesauri/dimension/thickness> ;
ecrm:P90_has_value ?thickness
}
OPTIONAL {?object rs:PX_has_main_representation ?img}
} GROUP BY ?object ?shape ?codexid ?regno ?startDate ?endDate ?producedAt ?findspot ?desc ?height ?width ?length ?thickness ?weight ?img
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment