Skip to content

UFAL/Separate CLARIN license payload from sections.license#1319

Merged
milanmajchrak merged 9 commits into
dtq-devfrom
ufal/clarin-license-step-issue
May 26, 2026
Merged

UFAL/Separate CLARIN license payload from sections.license#1319
milanmajchrak merged 9 commits into
dtq-devfrom
ufal/clarin-license-step-issue

Conversation

@milanmajchrak
Copy link
Copy Markdown
Collaborator

@milanmajchrak milanmajchrak commented May 21, 2026

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

  • Requested review from Copilot

Copilot AI review requested due to automatic review settings May 21, 2026 11:39
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ClarinLicenseResourceStep to expose CLARIN license data from dc.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.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

@milanmajchrak milanmajchrak requested a review from vidiecan May 25, 2026 12:33
@milanmajchrak milanmajchrak requested a review from vidiecan May 26, 2026 12:35
@milanmajchrak milanmajchrak merged commit d0c04cb into dtq-dev May 26, 2026
6 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants