Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Remove validation requirement for dct_format_s for multiple downloads #277

Open
karenmajewicz opened this issue Aug 21, 2023 · 0 comments
Open
Labels

Comments

@karenmajewicz
Copy link
Member

Overview

GeoBlacklight was originally designed to have a single Download link per record. It uses the dct_format_s value to create the string that a user clicks on to download an item, such as "Original Shapefile". If FORMAT is missing and there is a single Download link, GeoBlacklight will throw an error. So, we added validation in GEOMG to make sure there is a FORMAT value when a Download link is present:

validates :dct_format_s, presence: true, if: :a_downloadable_resource?

We have since implemented multiple downloads, which uses an array of key:value pairs within the http://schema.org/downloadUrl reference URI. When using multiple downloads, the dct_format_svalue is no longer used by the application for constructing the download link text. Instead, it uses a custom label specified within the array.

The problem

I am finding that I prefer to use the multiple downloads option, as many of our resources have a variety of file formats available and I have more control over what to call them. However, the Format field is still being required by GEOMG, regardless of whether or not it is utilized. When there are several download formats, I don't always know what to put in this field. I have been adding generic default values, like "Multiple" or "Files" in the FORMAT field. However, this does not follow the guidelines for DCMI:Format and I do not really want to have hacky things in the metadata that are only there to conform to a tool configuration.

To replicate

  1. Upload a CSV of records to GEOMG with both the FORMAT and the DOWNLOAD column blank
  2. Upload an associated CSV of multiple downloads for these items
  3. Upload the original CSV of records to GEOMG again (commonly needed to make batch edits or updates) - these will all be rejected for missing a FORMAT

Options to resolve locally

  1. Remove the validation in Geomg entirely: this would risk ingesting some records with single downloads that are missing a format, which would cause errors in GeoBlacklight
  2. Remove the validation in Geomg for just downloads with arrays - something like:
    if http://schema.org/downloadUrl= array, then don't require FORMAT.

Options to consider community-wide

  1. Make the field multivalued. We could adjust the code in GeoBlacklight to always take the first value if a user only has a single download
  2. Deprecate the FORMAT field and require Aardvark to always use multiple downloads
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
No open projects
Status: No status
Development

No branches or pull requests

1 participant