Loading
Linked data APIs
Fixes Fixes for #126 (closed)
Description Set up APIs for linked data.
Type of PR This PR is a feature.
Technicalities
LinkedDataComponenthandles content negotiation- Entities have a
getCidocCrm()function which returns linked data (mainly using the CIDOC-CRM ontology) in parsed JSON-LD format - A number of tables have additional associations defined: composite ←→ witnesses, seal ←→ impressions, artifact → place of origin (
written_in), artifact → fragment (artifact can consist of multiple materials) Entity/LinkedDataTraithouses helper functions for creating JSON-LD- Views for JSON-LD, RDF/JSON, RDF/XML, N-Triples and Turtle are added
View/MetadataExportTraithouses helper functions for converting linked data formats (using EasyRDF for formatting)- Documentation pages are added for the various APIs (the linked data format still needs documentation)
Tests
- Request http://127.0.0.1:2354/proveniences/2 with HTTP header
Accept: text/turtle - Request http://127.0.0.1:2354/materials with HTTP header
Accept: application/n-triples - Request http://127.0.0.1:2354/P000001 with HTTP header
Accept: application/ld+json - Documentation at http://127.0.0.1:2354/docs/api
- Meta-ontology at http://127.0.0.1:2354/docs/vocab/1.0
Checklist:
- My pull request has a descriptive title (not a vague title like "Update
index.md"). - My pull request targets the
phoenix/developbranch of the repository. - My commit messages follow best practices.
- My code follows the established code style of the repository.
- I added or updated documentation (if applicable).
- I tried running the project locally and verified that there are no visible errors.