Skip to content

TIKA-4853: DWGReadParser emits the drawing thumbnail as THUMBNAIL - #3092

Merged
THausherr merged 3 commits into
apache:mainfrom
dschmidt:dwg-thumbnail
Aug 29, 2026
Merged

TIKA-4853: DWGReadParser emits the drawing thumbnail as THUMBNAIL#3092
THausherr merged 3 commits into
apache:mainfrom
dschmidt:dwg-thumbnail

Conversation

@dschmidt

Copy link
Copy Markdown
Contributor

The THUMBNAILIMAGE section is the drawing's preview image, not a picture placed in the drawing, so mark it THUMBNAIL like the preview image of the other container formats. One-line change plus the test assertion.

https://issues.apache.org/jira/browse/TIKA-4853

@dschmidt
dschmidt marked this pull request as ready for review August 29, 2026 11:17
The THUMBNAILIMAGE section is the drawing's preview image, not a picture
placed in the drawing, so mark it THUMBNAIL like the preview image of the
other container formats.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 DWGRead-based DWG parser to classify the DWG THUMBNAILIMAGE preview as a THUMBNAIL embedded document (rather than INLINE), aligning it with how other container formats expose preview images in Tika.

Changes:

  • Emit DWG preview thumbnails with TikaCoreProperties.EmbeddedResourceType.THUMBNAIL.
  • Update the DWG parser test to assert THUMBNAIL type and the expected embedded resource name.
  • Add a corresponding entry to CHANGES.txt for TIKA-4853.

Reviewed changes

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

File Description
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-cad-module/src/main/java/org/apache/tika/parser/dwg/DWGReadParser.java Switches embedded resource type for the preview image from INLINE to THUMBNAIL.
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-cad-module/src/test/java/org/apache/tika/parser/dwg/DWGParserTest.java Adjusts assertions to look for a THUMBNAIL embedded document and validate its name.
CHANGES.txt Documents the behavioral change for the upcoming release.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 3 out of 3 changed files in this pull request and generated no new comments.

Suppressed comments (1)

tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-cad-module/src/test/java/org/apache/tika/parser/dwg/DWGParserTest.java:279

  • Start this comment with a capital letter for consistency with the surrounding comments and standard sentence casing.
        // the THUMBNAILIMAGE section is the drawing's THUMBNAIL embedded document

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.

3 participants