Monday, August 31, 2020

First pass at mapping to Linked Art JSON-LD

I have made some updates to both Numishare and's back-ends to facilitate improved and more consistent content negotiation. I have applied a Content-Language header to the response for coin/type pages in Numishare, based on whether the language passed via request parameter (?lang) or content negotiation by the browser settings (Accept-Language) is present within the Numishare translations. 

More importantly, though, is that the Link header has been added into the requests for coin/type URIs in Numishare (as well as the browse page, because a user can request the Atom XML or untransformed Solr XML via content negotiation). The Link headers have also been applied to the URI for any concept or concept scheme in 

This follows examples established W3C Content Negotiation by Profile draft.

A `curl -I` of a URI includes a a Link to itself as a text/html resource with rel="canonical", but it will also include a list of other comma separated  rel="alternate" resources found at the same URI, but with an array of acceptable content types (different serializations of RDF, the NUDS/XML document, KML, and/or GeoJSON) and, in some cases, an additional profile URI. 


Requesting headers for

For most serializations of RDF that are available (RDF/XML, Turtle, and JSON-LD), the profile URI is set to, to reflect the Nomisma data model for coins, types, and SKOS concepts. Another JSON-LD serialization is available in the Linked Art profile, It is now possible to request this profile for a Nomisma concept through content negotiation, e.g.:

curl -H "Accept: application/ld+json;profile=\"\""

Content negotiation was already possible in Numishare, but now the Link headers indicate to a script or robot that additional content types and profiles are available for consumption.

The Linked Art JSON-LD follows the spec for People and Organizations (including dynasties) and Places. For other types of concepts in Nomisma, they are defined generally as crm:E55_Type, but are not distinguished further by material, denomination, object type, etc. We will implement these classifications as they are documented in the Linked Art specification. Here's a representation of Seleucus I according to this model: This includes the preferred label in English, the English definition, matching URIs, and memberships in the Seleucid Empire and Seleucid Dynasty. A further conneg request of the latter two URIs include further context about those organizations, including the formation and dissolution dates.

In theory, a parser capable of reading Linked Art JSON-LD for a Human Made Object (for example, a coin in our collection) can crawl from the object data into any associated concept. A parser can request the HEAD for a Nomisma URI, read that a serialization for the Linked Art profile exists, request the data via content negotiation for the content type and profile, and then harvest or display additional contextual information about the entities related to the object.

I got these serializations up and running in about a day, and my next tasks will be to copy and paste these new functions into's back-end and xEAC, so that it will be possible to serialize EAC-CPF archival authorities into Linked Art JSON-LD for broader reuse in Linked Open Data systems.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.