Conversation
There was a problem hiding this comment.
Pull request overview
This PR implements PDF tagging/accessibility metadata support (MIG-428) for document objects in the migration library. It allows users to define PDF metadata fields (title, author, subject, keywords, producer) that can be composed of static strings and variable references, which are then exported as variables in the WFD-XML format and mapped to sheet names at specific indices (37-41).
Changes:
- Added
PdfMetadatadata model with support for variable string content composition - Extended WFD-XML API to support sheet name variables in the Pages element
- Implemented database migration and persistence layer for PDF metadata
- Created builder APIs for constructing PDF metadata with mixed static and variable content
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| wfd-xml/api/src/main/java/com/quadient/wfdxml/api/layoutnodes/SheetNameType.java | New enum defining PDF metadata field indices (37-41) |
| wfd-xml/api/src/main/java/com/quadient/wfdxml/api/layoutnodes/Pages.java | Added addSheetName method to Pages interface |
| wfd-xml/impl/src/main/java/com/quadient/wfdxml/internal/layoutnodes/PagesImpl.java | Implemented sheet name export logic that creates placeholder elements for all indices up to max |
| wfd-xml/impl/src/main/java/com/quadient/wfdxml/internal/module/layout/LayoutImpl.java | Added Pages to layout delta allowed groups and filters out Page children in delta export |
| wfd-xml/impl/src/test/groovy/com/quadient/wfdxml/internal/layoutnodes/PagesImplTest.groovy | Added comprehensive tests for sheet name export with all/partial metadata |
| wfd-xml/impl/src/test/groovy/com/quadient/wfdxml/internal/module/LayoutImplTest.groovy | Updated test expectation to include Pages element in delta layout export |
| wfd-xml/impl/src/test/resources/com/quadient/wfdxml/workflow/*.xml | Updated test resources to include Pages element with default values |
| migration-library/src/main/kotlin/com/quadient/migration/api/dto/migrationmodel/PdfMetadata.kt | New data class for PDF metadata with ref validation support |
| migration-library/src/main/kotlin/com/quadient/migration/api/dto/migrationmodel/VariableStringContent.kt | New sealed interface for content that can be strings or variable references |
| migration-library/src/main/kotlin/com/quadient/migration/api/dto/migrationmodel/Ref.kt | Updated StringValue and VariableRef to implement VariableStringContent |
| migration-library/src/main/kotlin/com/quadient/migration/api/dto/migrationmodel/DocumentObject.kt | Added pdfMetadata field and updated collectRefs to include PDF metadata references |
| migration-library/src/main/kotlin/com/quadient/migration/api/dto/migrationmodel/builder/*.kt | Added PdfMetadataBuilder and VariableStringContentBuilder for fluent API |
| migration-library/src/main/kotlin/com/quadient/migration/persistence/upgrade/V11__pdf_metadata.kt | Database migration adding pdf_metadata column |
| migration-library/src/main/kotlin/com/quadient/migration/persistence/table/DocumentObjectTable.kt | Added pdf_metadata column to document object table |
| migration-library/src/main/kotlin/com/quadient/migration/persistence/migrationmodel/*.kt | Added entity classes for PDF metadata persistence |
| migration-library/src/main/kotlin/com/quadient/migration/service/inspirebuilder/InspireDocumentObjectBuilder.kt | Implemented PDF metadata to WFD-XML sheet names conversion with script generation |
| migration-library/src/main/kotlin/com/quadient/migration/service/inspirebuilder/InspireBuilderUtils.kt | Added toScriptStringLiteral utility for proper string escaping in JavaScript |
| migration-library/src/main/kotlin/com/quadient/migration/service/inspirebuilder/DesignerDocumentObjectBuilder.kt | Integrated PDF metadata processing for Designer output |
| migration-library/src/main/kotlin/com/quadient/migration/service/inspirebuilder/InteractiveDocumentObjectBuilder.kt | Integrated PDF metadata processing and updated image alternate text to use new escaping |
| migration-library/src/test/kotlin/com/quadient/migration/service/inspirebuilder/InspireDocumentObjectBuilderTest.kt | Added tests for PDF metadata variable generation and script concatenation |
| migration-library/src/test/kotlin/com/quadient/migration/persistence/DocumentObjectRepositoryTest.kt | Added roundtrip test for PDF metadata persistence |
| migration-examples/src/main/groovy/com/quadient/migration/example/example/Import.groovy | Added example usage of PDF metadata builder |
| migration-examples/src/main/groovy/com/quadient/migration/example/common/report/ComplexityReport.groovy | Updated to collect variable references from PDF metadata |
| CHANGELOG.md | Documented the new feature |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...rc/main/kotlin/com/quadient/migration/service/inspirebuilder/InspireDocumentObjectBuilder.kt
Show resolved
Hide resolved
...est/kotlin/com/quadient/migration/service/inspirebuilder/InspireDocumentObjectBuilderTest.kt
Show resolved
Hide resolved
...library/src/main/kotlin/com/quadient/migration/service/inspirebuilder/InspireBuilderUtils.kt
Show resolved
Hide resolved
wfd-xml/impl/src/main/java/com/quadient/wfdxml/internal/layoutnodes/PagesImpl.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 34 out of 34 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.