Configure References Links (dct_references_s)¶
This page provides guidance on how to format the References field in either GBL 1.0 or OGM Aardvark.
JSON formatting¶
The field dct_references_s
defines external services and references using the Cat-Interop approach. The field value is a serialized JSON array of key/value pairs. Keys represent XML namespace URIs, and values represent the URL.
- key:value 1 = "URI":"https://example.com"
- key:value 2 = "URI":"https://otherexample.com"
To format this field in JSON, double quotations "
must be escaped with a backslash \
.
{
"dct_references_s": "{
\"http://schema.org/url\":\"http://purl.stanford.edu/bm662dm5913\",
\"http://schema.org/downloadUrl\":\"http://stacks.stanford.edu/file/druid:bm662dm5913/data.zip\"
}"
}
Multiple downloads¶
Beginning with GeoBlacklight version 3.0, multiple download links and file formats can be included in the dct_references_s
field. For more details on this update, see this pull request.
To enable multiple downloads:
- Make the value for the download file URI (
http://schema.org/downloadUrl
) into an array. This means it is enclosed in [square brackets]. - Create one or more objects inside the array. These are enclosed in {curly brackets}.
- Inside the object, define two
key:value
pairs separated by a comma. - Enclose each key and each value in double quotes.
- Escape double quotations
"
with a backslash\
In formatted JSON, this would look like:
{
"dct_references_s": "{\"http://schema.org/downloadUrl\":[
{
\"url\":\"https://example.com\",
\"label\":\"Shapefile\"
},
{
\"url\":\"https://otherexample.com\",
\"label\":\"KMZ\"
}]
}"
}
Examples¶
For an exmaple of a complete JSON file with multiple downloads, see this record.
Single download
{
"dct_references_s": "{\"http://schema.org/downloadUrl\":\"https://cugir-data.s3.amazonaws.com/00/79/50/cugir-007950.zip\"}"
}
Single download as an array
When using an array for downloads, the value after the "label"
key will be used as the text in the Download panel button.
{
"dct_references_s": "{\"http://schema.org/downloadUrl\":[
{
\"url\":\"https://cugir-data.s3.amazonaws.com/00/79/50/cugir-007950.zip\",
\"label\":\"Shapefile\"
}]
}"
}
Multiple downloads
{
"dct_references_s": "{\"http://schema.org/downloadUrl\":[
{
\"url\":\"https://cugir-data.s3.amazonaws.com/00/79/50/cugir-007950.zip\",
\"label\":\"Shapefile\"
},
{
\"url\":\"https://cugir-data.s3.amazonaws.com/00/79/50/agBROO.pdf\",
\"label\":\"PDF\"
},
{
\"url\":\"https://cugir-data.s3.amazonaws.com/00/79/50/agBROO2011.kmz\",
\"label\":\"KMZ\"
}]
}"
}