Define a shopping cart reference
Define a way of referring to an item in a user's shopping that can be passed between components.
The metadata schema has the concept of a data-resource
that describes the concept of "some data that is needed for the task", e.g. "The set of images to be processed" and "The calibration data to use"
The user is invited to find the images and calibration data that they want and place them in the shopping cart.
In order to link the data items in the cart to their corresponding data-resources
we need to be able to refer to the different items in the shopping cart in a unique way that can be passed to the component staging the data and executing the task.
Suggestions:
- We could use a full HTTP URL to the data staged in the cart
https://sdc-dev.astron.nl/shopping-cart/9620d56c-eea1-4b98-aa85-ca5c7e439178
- Or we could define a URL scheme that refers to an item in the user's shopping cart
esap-cart://9620d56c-eea1-4b98-aa85-ca5c7e439178
If we use HTTP URLs, then we need to include a type
property to distinguish between a URL that points to a shopping cart item and an external HTTP download URL.
"data-resources": [
{
"uuid": "b77cc829-ac12-43b5-9dbe-48cfa727d14c",
"description": "The raw images to be processed.",
....
"location":{
"type": "urn:esap-shopping-cart",
"url": "https://sdc-dev.astron.nl/shopping-cart/9620d56c-eea1-4b98-aa85-ca5c7e439178"
}
}
]
If we define a URL prefix, esap-cart
, then we no longer need the type
property.
"data-resources": [
{
"uuid": "47a32306-84b4-4d48-8999-7795d841b838",
"description": "The data to use for calibration.",
....
"location":{
"url": "esap-cart://e7c89bcc-d512-40a9-b417-e856395e993f",
}
},
In reality, the software will expand the short form easp-cart://e7c89bcc-d512-40a9-b417-e856395e993f
into something like the long form to be able to access it, but using the short form keeps the details of how that is done internal to the ESAP portal.