UFAL/Separate CLARIN license payload from sections.license#1319
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the submission REST API to clearly separate the CLARIN resource-license payload (sections['clarin-license']) from the standard distribution/deposit license payload (sections.license), and ensures both the legacy top-level patch path and the new section-scoped patch path apply the same CLARIN-license logic.
Changes:
- Introduces a shared utility (
ClarinLicenseSubmissionUtils) to apply/clear CLARIN licenses consistently (metadata + bitstream mappings). - Refactors
ClarinLicenseResourceStepto expose CLARIN license data fromdc.rights*and accept updates via/sections/clarin-license/name. - Adds/extends integration tests and introduces a new DTO (
DataClarinLicense) for the CLARIN license section.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| dspace-server-webapp/src/test/java/org/dspace/app/rest/ClarinWorkspaceItemRestRepositoryIT.java | Adds integration tests for section-scoped CLARIN license patching and for distinct license section payloads. |
| dspace-server-webapp/src/main/java/org/dspace/app/rest/submit/step/ClarinLicenseSubmissionUtils.java | New shared helper encapsulating CLARIN license apply/clear behavior (metadata + mappings). |
| dspace-server-webapp/src/main/java/org/dspace/app/rest/submit/step/ClarinLicenseResourceStep.java | Refactors CLARIN license section to be metadata-based and patchable via section path. |
| dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/WorkspaceItemRestRepository.java | Delegates legacy top-level CLARIN license patch handling to the shared helper. |
| dspace-server-webapp/src/main/java/org/dspace/app/rest/model/step/DataClarinLicense.java | New section DTO representing CLARIN license name/definition/label/granted. |
…cense to ClarinDataLicense, and clean up comments
vidiecan
requested changes
May 25, 2026
vidiecan
approved these changes
May 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem description
The issue: https://github.com/dataquest-dev/dspace-customers/issues/617
Analysis
(Write here, if there is needed describe some specific problem. Erase it, when it is not needed.)
Problems
(Write here, if some unexpected problems occur during solving issues. Erase it, when it is not needed.)
Manual Testing (if applicable)
Copilot review