Repository navigation
feat(rdf): describe the archive as linked data with Dublin Core - #79
Merged
Merged
Conversation
Every recording, collection, namespace, entity and speaker gets a URI under /id/ that answers with Turtle, JSON-LD, N-Triples or RDF/XML (or sends a browser to its page). Recordings are described with DCMI Metadata Terms, entities as SKOS concepts, speakers with FOAF; a small Lens vocabulary is served at /ns. Recordings gain a `terms` metadata field for every other DCMI term, also carried into oai_dc. The API exports a recording or a whole namespace as RDF. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RtRigWmLLWqBHqWmJ8CvA1
This was referenced Oct 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Adeel · project thread
Before: Lens published a recording's metadata only as an oai_dc XML file and a schema.org record. Collections, entities and speakers had no machine-readable form, and the only Dublin Core terms a recording could hold were those its existing fields map to.
After: every recording, collection, namespace, entity and speaker has a URI under
/id/. An RDF client gets Turtle, JSON-LD, N-Triples or RDF/XML from it, and a browser is sent to the page (303). Recordings are described with DCMI Metadata Terms, entities as SKOS concepts (also typed with FOAF, dcterms:Location or dcmitype:Event), and speakers as foaf:Person with owl:sameAs links. A whole namespace can be exported as one graph. Recordings get a newtermsmetadata field that holds every other DCMI term (spatial, temporal, alternative, source, audience and so on), and these also appear in oai_dc.The RDF is generated from the data Lens already has, so nothing is migrated and nothing goes stale. Existing behaviour is unchanged.
How:
app/domain/rdf.pybuilds rdflib graphs.app/api/linked_data.pyserves/id/...and the/nsvocabulary, with the same access rules as IIIF for recordings and members-only access for everything else.GET /api/v1/recordings/{id}/rdfandGET /api/v1/namespaces/{name}/rdfare added to the API. The frontend proxies/idand/ns.rdflibis a new dependency (BSD-3). Docs are indocs/rdf.md.Tests:
tests/api/test_rdf.py. The full backend suite passes (373 passed), except the known environmental LibreOffice conversion test. Frontend jest (557), lint and tsc all pass. The client was regenerated withmake openapi.Next PRs: RDF import (Turtle and JSON-LD, with a preview, through the metadata history), Dublin Core fields and RDF buttons in the UI, and a read-only SPARQL endpoint.
🤖 Generated with Claude Code
https://claude.ai/code/session_01RtRigWmLLWqBHqWmJ8CvA1
Generated by Claude Code