Skip to content

MODLD-998: Create TitleLabelGenerator#155

Draft
pkjacob wants to merge 1 commit intomasterfrom
pjacob/MODLD-998
Draft

MODLD-998: Create TitleLabelGenerator#155
pkjacob wants to merge 1 commit intomasterfrom
pjacob/MODLD-998

Conversation

@pkjacob
Copy link
Contributor

@pkjacob pkjacob commented Feb 23, 2026

No description provided.

Copilot AI review requested due to automatic review settings February 23, 2026 22:21
@pkjacob pkjacob marked this pull request as draft February 23, 2026 22:21
@sonarqubecloud
Copy link

Copy link

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

Adds support for generating human-readable labels for Title-like resources (Title/Variant/Parallel/Abbreviated) based on structured title properties in the resource doc, and refactors shared JSON-property extraction into a helper.

Changes:

  • Introduces TitleLabelGenerator to build a label from mainTitle, subTitle, partNumber, and partName.
  • Extracts reusable JSON doc property lookup into LabelHelper and reuses it in HubLabelGenerator.
  • Registers the new generator in LabelGeneratorService and adds unit tests covering spacing/missing-property behavior.

Reviewed changes

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

Show a summary per file
File Description
src/test/java/org/folio/ld/dictionary/label/TitleLabelGeneratorTest.java Adds tests verifying title label composition and spacing behavior.
src/main/java/org/folio/ld/dictionary/label/generators/TitleLabelGenerator.java Implements title label generation by joining available title properties.
src/main/java/org/folio/ld/dictionary/label/generators/HubLabelGenerator.java Refactors property extraction to use the shared helper.
src/main/java/org/folio/ld/dictionary/label/LabelHelper.java Adds shared helper for reading the first string value from a JSON doc property.
src/main/java/org/folio/ld/dictionary/label/LabelGeneratorService.java Registers TitleLabelGenerator in the generator chain.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants