Skip to content

Instantly share code, notes, and snippets.

@ewg118
Created June 30, 2021 19:19
Show Gist options
  • Save ewg118/3a0e6e41595eead73421bb9367373e70 to your computer and use it in GitHub Desktop.
Save ewg118/3a0e6e41595eead73421bb9367373e70 to your computer and use it in GitHub Desktop.
SPARQL query of Getty vesses from before 300 BC
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/>
PREFIX getty: <https://data.getty.edu/>
prefix getty-media: <https://media.getty.edu/>
PREFIX aat: <http://vocab.getty.edu/aat/>
PREFIX la:<https://linked.art/ns/terms/>
PREFIX crmsci: <http://www.ics.forth.gr/isl/CRMsci/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?object ?accession ?name ?dor ?material ?shape ?artist ?place ?begin ?end ?height ?width ?diameter ?found ?manifest WHERE {
?object crm:P2_has_type aat:300193015 ;
crm:P1_is_identified_by ?id1, ?id2 ;
rdfs:label ?name;
rdf:type crm:E22_Human-Made_Object .
OPTIONAL {?object crm:P67i_is_referred_to_by ?ref1 .
?ref1 crm:P2_has_type aat:300435448 ;
crm:P190_has_symbolic_content ?place}
OPTIONAL {?object crm:P67i_is_referred_to_by ?ref2 .
?ref2 crm:P2_has_type aat:300435429 ;
crm:P190_has_symbolic_content ?material}
OPTIONAL {?object crm:P67i_is_referred_to_by ?ref3 .
?ref3 crm:P2_has_type aat:300435443 ;
crm:P190_has_symbolic_content ?shape}
?object crm:P108i_was_produced_by ?prod .
OPTIONAL {?prod crm:P14_carried_out_by/rdfs:label ?artist}
OPTIONAL {?prod crm:P4_has_time-span ?timespan .
?timespan crm:P82a_begin_of_the_begin ?begin ;
crm:P82b_end_of_the_end ?end FILTER (?end < "-0300-12-31T00:00:00"^^xsd:dateTime)}
OPTIONAL {?object crm:P43_has_dimension ?dim1 .
?dim1 crm:P2_has_type aat:300055644 ;
crm:P91_has_unit aat:300379098;
crm:P90_has_value ?height}
OPTIONAL {?object crm:P43_has_dimension ?dim2 .
?dim2 crm:P2_has_type aat:300055624 ;
crm:P90_has_value ?diameter}
OPTIONAL {?object crm:P43_has_dimension ?dim3 .
?dim3 crm:P2_has_type aat:300055647 ;
crm:P91_has_unit aat:300379098;
crm:P90_has_value ?width}
OPTIONAL {?object crmsci:O19i_was_object_found_by ?found}
?id1 crm:P2_has_type <https://data.getty.edu/museum/ontology/linked-data/dor-id> ;
crm:P190_has_symbolic_content ?dor.
?id2 crm:P2_has_type aat:300312355 ;
crm:P190_has_symbolic_content ?accession.
?object crm:P129i_is_subject_of ?manifest .
?manifest crm:P2_has_type <https://data.getty.edu/local/thesaurus/iiif-manifest>
} LIMIT 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment