Skip to content

Linked data APIs

Lars Willighagen requested to merge phoenix/feature/metadata-apis into phoenix/develop

Fixes Fixes for #126 (closed)

Description Set up APIs for linked data.

Type of PR This PR is a feature.

Technicalities

  • LinkedDataComponent handles 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/LinkedDataTrait houses helper functions for creating JSON-LD
  • Views for JSON-LD, RDF/JSON, RDF/XML, N-Triples and Turtle are added
  • View/MetadataExportTrait houses 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

Checklist:

  • My pull request has a descriptive title (not a vague title like "Update index.md").
  • My pull request targets the phoenix/develop branch 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.

Merge request reports