Skip to content

feat: RegionPreviewValue support (DEV-6300)#4110

Open
siers wants to merge 12 commits into
mainfrom
feat/DEV-6300-annotation-preview
Open

feat: RegionPreviewValue support (DEV-6300)#4110
siers wants to merge 12 commits into
mainfrom
feat/DEV-6300-annotation-preview

Conversation

@siers

@siers siers commented May 6, 2026

Copy link
Copy Markdown
Contributor

RegionPreviewValue support (DEV-6300)

New value type: a resource points at a Region via hasRegionPreview. Only the link (isRegionPreviewOf) is stored. The IIIF preview URL is computed at read time, never persisted.

Pipeline

Write: JSON-LD isRegionPreviewOf  →  persist  <value> kb:isRegionPreviewOf <region>
Read:  RegionPreviewValue (iiifUrl = None)  →  fetch region (geometry) + still image (filename)
       →  iiifUrl = …/pct:x,y,w,h/full/0/default.jpg     (fetched resources not returned)

Change summary

  • knora-base.ttl & OntologyConstants.scalaRegionPreviewValue / hasRegionPreview / isRegionPreviewOf / iiifUrl; v51 → v52
  • ValueMessagesV2.scalaRegionPreviewValueContentV2 (value type, JSON-LD, parser); GeomValueContentV2.parsePoints
  • ApiComplexV2JsonLdRequestParser.scala, ResourceCreateModels.scala, ResourcesRepoLive.scala — write path: parse + persist isRegionPreviewOf
  • ConstructResponseUtilV2.scala — read path: dispatch RegionPreviewValue; iiifUrl = None (deferred to the service)
  • ReadResourcesServiceLive.scalaaugmentRegionPreviewValues: region geometry → pct:x,y,w,h, still-image filename → IIIF URL
  • ReadResourcesServiceLiveSpec.scala – finally has a standalone test! previously implicitly tested
  • GravsearchTypeInspectionUtil.scala, ResourceMessagesV2.scala, Vocabulary.scala — supporting constants/accessors
  • acceptance test fixture updates

@linear-code

linear-code Bot commented May 6, 2026

Copy link
Copy Markdown

@codecov

codecov Bot commented May 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.12977% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.06%. Comparing base (a978c50) to head (c0ba1f7).

Files with missing lines Patch % Lines
...e/resources/service/ReadResourcesServiceLive.scala 96.05% 3 Missing ⚠️
...ice/resources/repo/service/ResourcesRepoLive.scala 0.00% 2 Missing ⚠️
...ervice/value/queries/InsertValueQueryBuilder.scala 50.00% 2 Missing ⚠️
...webapi/messages/util/ConstructResponseUtilV2.scala 88.88% 1 Missing ⚠️
...ponders/v2/resources/CreateResourceV2Handler.scala 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4110      +/-   ##
==========================================
+ Coverage   85.98%   86.06%   +0.07%     
==========================================
  Files         538      538              
  Lines       30571    30586      +15     
  Branches     3559     3554       -5     
==========================================
+ Hits        26286    26323      +37     
+ Misses       4285     4263      -22     
Flag Coverage Δ
e2e 86.06% <93.12%> (+0.07%) ⬆️
integration 86.06% <93.12%> (+0.07%) ⬆️
unit 86.06% <93.12%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@siers siers force-pushed the feat/DEV-6300-annotation-preview branch 2 times, most recently from e1d5a32 to 0ca1d79 Compare May 11, 2026 14:31
@siers siers force-pushed the feat/DEV-6300-annotation-preview branch from 0ca1d79 to 0e90fe7 Compare May 29, 2026 09:15
@siers siers force-pushed the feat/DEV-6300-annotation-preview branch 2 times, most recently from 45d3564 to bebe8ae Compare June 23, 2026 09:51
@siers siers force-pushed the feat/DEV-6300-annotation-preview branch from bebe8ae to 3ef462d Compare June 23, 2026 09:57
@siers siers marked this pull request as ready for review June 23, 2026 09:57
@siers siers requested a review from BalduinLandolt June 23, 2026 15:04
@siers

siers commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

Ran claude as the reviewer, there are two things

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.

1 participant