Skip to content

Expose value annotations via the API (search and read only) - #2479

Open
jimsafley wants to merge 2 commits into
developfrom
feature/value-annotation-api
Open

jimsafley wants to merge 2 commits into
developfrom
feature/value-annotation-api

Conversation

@jimsafley

@jimsafley jimsafley commented Apr 22, 2026

Copy link
Copy Markdown
Member

Summary

Value annotations are a special kind of resource: like items, media, and item sets they can be described by RDF values, but unlike those resources they have no independent lifecycle - an annotation derives its meaning entirely from the value it describes. For this reason, direct CRUD operations have always been intentionally blocked. This PR exposes search and read as read-only operations, which have no bearing on that design constraint.

Design notes

  • Value annotations inherit visibility from their parent resource. The standard per-resource visibility flag is insufficient here because a public annotation on a private item would otherwise be exposed; parent resource visibility is enforced at both search and read.
  • The JSON-LD representation follows W3C OA and RDF reification to express the annotated triple in a way that is interoperable with existing annotation tooling.

This should fix #2468

Adds search and read operations to the value annotation adapter, with
transitive visibility filtering to ensure annotations on private resources
are not accessible to unauthorized users. Adds o:resource and o:value to
the JSON-LD representation.
@jimsafley
jimsafley requested a review from zerocrates April 22, 2026 22:26
Replaces the ad hoc o:resource/o:value properties in the value annotation
JSON-LD output with a standards-based oa:hasTarget/rdf:Statement structure
that identifies the annotated triple by subject, predicate, and object.
Also declares oa:Annotation as a co-type and registers the oa and rdf
namespace prefixes in the API context.
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.

Permission denied for the current user to read the Omeka\Api\Adapter\ValueAnnotationAdapter

1 participant