TIKA-4853: DWGReadParser emits the drawing thumbnail as THUMBNAIL - #3092
Conversation
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.
b7f6f37 to
00a2aaf
Compare
There was a problem hiding this comment.
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
THUMBNAILtype and the expected embedded resource name. - Add a corresponding entry to
CHANGES.txtfor 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>
There was a problem hiding this comment.
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
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