Read license information from licenseNote in premis access condition #2695
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this change?
This PR updates how license information can be derived from METS where the PREMIS element is used to provide access conditions.
Currently where the
rightsBasis
is "License" we ignore thelicenseNote
field when parsing METS that contains the PREMIS element (i.e. Works sourced from Archivematica AKA anything "Born Digital"). This change addresses that problem to ensure the correct license information is available on Works.See this Slack thread: https://wellcome.slack.com/archives/C02ANCYL90E/p1724408305952489
Addresses wellcomecollection/wellcomecollection.org#11016
Note
This change is currently deployed manually to a
dev
tag here. Ensure it is returned to the correct tag after release.How to test
Here is an example of a work with the CC-BY-NC license added by this process.
When the born digital toggle is turned on, this is what it looks like in the front-end:
How can we measure success?
Born Digital items have the correct license information and can be made available to the public for viewing.
Have we considered potential risks?
This change updates how we read existing licenses, referring to the
rightsBasis
for which field to read, this opens the possibility existing correctly licensed works will be changed. This risk is mitigated by falling back to existing behaviour and spot checking METS to see that the behaviour will remain as expected.