lobid/lodmill — pull request #306 by fsteeg (2014-01-21 18:08:28+00:00)
Title: Identify primary topic in JSON-LD response and fix type information in views

Deployed to staging.

This pull requests adds additional information to identify the primary topic of JSON-LD responses. It uses the JSON-LD `@id` keyword on the top level of the JSON document to name the described graph as the resource's about page, and adds a `foaf:primaryTopic` property to identify the main resource ID. See:

http://staging.api.lobid.org/resource?id=HT002189125&format=full

This is equivalent to a triple with the about page as subject, `foaf:primaryTopic` as predicate, and the resource ID as object. See:

`curl -L --header "Accept: text/plain" http://staging.api.lobid.org/resource?id=HT002189125`

Which contains this triple:

`` `` ` .`

This is useful for API users in general. For instance, it should provide a fix for the issue mentioned in https://github.com/lobid/lodmill/issues/230#issuecomment-32290484 (ping @literarymachine).

At the same time, this pull request uses this new information to fix the wrong type information in the views (#257). See:

http://staging.api.lobid.org/resource?id=HT002189125