8000 feat(rdf): describe the archive as linked data with Dublin Core by adeelahmad · Pull Request #79 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content

feat(rdf): describe the archive as linked data with Dublin Core - #79

Merged
adeelahmad merged 2 commits into
mainfrom
claude/project-thread-s9qndz
Oct 3, 2026
Merged

adeelahmad merged 2 commits into
mainfrom
claude/project-thread-s9qndz

Conversation

@adeelahmad
Copy link
Copy Markdown
Owner

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 new terms metadata 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.py builds rdflib graphs. app/api/linked_data.py serves /id/... and the /ns vocabulary, with the same access rules as IIIF for recordings and members-only access for everything else. GET /api/v1/recordings/{id}/rdf and GET /api/v1/namespaces/{name}/rdf are added to the API. The frontend proxies /id and /ns. rdflib is a new dependency (BSD-3). Docs are in docs/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 with make 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

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
@adeelahmad adeelahmad self-assigned this Oct 3, 2026
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.

2 participants

0