This query helps the user navigate the Provenance model from auction events to lots. This is trickier than you might think, and requires some backwards and forward querying.
Introduction
The challenge of getting from an auction-event to a lot is several-fold.
- There is a level between the auction-event and the lot (i.e., the auction-of-lot).
- The directionality is not two-way, and it is not even consistently up or down the hierarchy. What do I mean by that? Look at this diagram below. Much depends on the one-way, divergent relationship between the three objects. A proper hierarchy would clearly connect either
auction-events
toauction-of-lot
tolot
, or vice versa. However, GPI does not do that. Rather,auction-of-lot
connect UP toauction-event
(but not vice versa), andauction-of-lot
connects DOWN tolot
(but not vice versa). In this graph relationship, counter-intuitively, theauction-of-lot
is the central node. So the user needs to take this into account, and focus on theauction-of-lot
as the connective tissue connecting all three. - The
auction-event
andauction-of-lot
are both events, but the lot is not—it is a set. - The relevant CRM properties (that is, the relationship between these entities) are also different. In this case, the
auction-of-lot
forms part of (P9i_forms_part_of
) theauction-event
. On the other hand, theauction-of-lot
“uses” a specified object (P16_used_specified_object
)—that is, thelot
.
🔴 = E7_Activity 🟦 = Set
With that in mind, let’s write a SPARQL query that takes us from one particular auction-event
down to all of the associated lots
.
Query
PREFIX la: <https://linked.art/ns/terms/>
PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?auction_of_lot ?lot ?lot_label ?auction_of_lot_time_label ?lot_creation ?lot_creation_timespan_begin ?lot_auction_combined WHERE {
# Step One: Let's get from our chosen lot to the auction-of-lot and then the lot
?auction_of_lot crm:P9i_forms_part_of <https://data.getty.edu/provenance/b50ee872-a6f0-3cf4-9152-978833633541> .
?auction_of_lot crm:P16_used_specific_object ?lot .
?auction_of_lot a crm:E7_Activity .
?auction_of_lot crm:P4_has_time-span ?auction_of_lot_time .
?auction_of_lot_time rdfs:label ?auction_of_lot_time_label .
?lot a la:Set .
?lot rdfs:label ?lot_label .
# Step Two: Let's fill in some details about these lots
?lot crm:P1_is_identified_by ?lot_id .
?lot_id a crm:E42_Identifier .
?lot_id crm:P190_has_symbolic_content ?lot_id_content .
?auction_of_lot rdfs:label ?auction_of_lot_label .
}
Commentary
This is still under construction. For clarity’s sake, commentary proceeds step-by-step (see the comment lines in the query, which start with #s) and line numbers are relative to that section. As we develop our Gists development toolkit, we may implement better ways to mark up lines in the code block.
Step One
- Line 1: This query starts with one particular auction-event—that is, “Auction Event Br-A944 (1773-03-31 to 1773-04-03)”. There’s no particular reason for this: This can be replaced with any other
auction-event
. We have to proceed backwards to get from this to theauction-of-lot
(see Figure 1 for this relationship). This means putting theauction-event
into the Object position of the first line of the query. That relationship is specified by the CRM propertyP9i_forms_part_of
. - Line 2: Thereafter, we switch directions and go from the
auction-of-lots
to the associatedsets
—i.e., thelots
. This relationship can also be seen in Figure 1. As we noted above,auction-of-lot
is the hinge on whichauction-event
andlot
connect. In this case, the connection goes fromauction-of-lot
tolot
throughP16_used_specific_object
. - Line 4: We do some work to draw the timespan out of the
auction-of-lot
. One reason to do this is because theauction-event
can contain a timespan that spans multiple days (reflecting the real length of big auctions, which do sometimes simply take a long time to complete). Butauction-of-lots
andlots
should have single-day timespans.⚀
Notes
⚀: Right now, we have some problems with the lot
level timespans (they have taken on the auction-event
timespans’ begin-of-begin programmatically—but that isn’t always accurate for the lot
). This will be fixed. For now, as the query is written, we get dates for lots
from auction-of-lot
. (05-30-2025)