Search Mailing List Archives

Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[bioontology-support] Error in JSON-LD links context?

Clement Jonquet jonquet at
Mon Mar 28 12:23:03 PDT 2016

I understand design choices and the compromise is necessary certainly…  but I don’t see how having the type information e.g., owl#Class rather than the property information e.g., metadata/children actually make the hypermedia API more useful?




De : bioontology-support [mailto:bioontology-support-bounces at] De la part de Paul R Alexander
Envoyé : mardi 22 mars 2016 02:46
À : Emonet <vincent.emonet at>
Cc : bioontology-support at
Objet : Re: [bioontology-support] Error in JSON-LD links context?




Just a little history as to why it's done this way. We chose JSON-LD for the REST API because it provided a good compromise between proper RDF and developer usability. When we decided to make the API hypermedia-based we knew that it could clash a bit with the RDF in JSON-LD and this is the exact area where the clash occurs.


Exposing the links using the proper RDF would cause a usability problem for developers, the vast majority of whom don't care about the underlying RDF semantics and would be very confused by having to learn RDF to traverse the data we expose. When we designed the API there weren't great standards for using JSON-LD to expose hypermedia links, so that may have changed and there may be better solutions out there.


We also felt that the links weren't a part of the underlying data model we are exposing but something we were layering on top, IE if you put all of the data as RDF into a triplestore, the links would not be represented and would not be traversable because they aren't actually data within the system (there is no RDF object that corresponds to an ontology's roots, for example, even though there is a REST endpoint for that data).


I'll leave it to the current BioPortal team to offer an official recommendation here, but my sense is that it's just a quirk of trying to adhere to standards where we can while also trying to make the system usable by as many people as possible.






On Mar 21, 2016, at 8:53 AM, Emonet <vincent.emonet at <mailto:vincent.emonet at> > wrote:



It seems like there is an error in the JSON-LD @context for Links

The context should provide the properties URI. e.g.: " name":  <> "","
But instead it is providing the object type: " children":  <> "","


@context should be "traducing" the property terms used in the JSON as an IRI. For instance in

The @context defines that the predicate "obsolete" has as property
So it is representing the following triple: <"> <> false .

But the @context generated for "links" is it:

@context": { 

*         "self":  <> "",

*         "ontology":  <> "",

*         "children":  <> "",

*         "parents":  <> "",

*         "descendants":  <> "",

*         "ancestors":  <> "",

*         "tree":  <> "",

*         "notes":  <> "",

*         "mappings":  <> "",

*         "ui":  <> ""




These are not the properties that are defined here, but the types of the objects

This JSON is defining the following triple:
<node "links" of  <>> <> < <>> .

When it should define the following one:
<node "links" of  <>> < <> > < <>> .

If we want to define types we would have to do the following:

@context": { 

*         "parents": {@type:  <> ""},



This error is only in @context of link. If we look at how you define the context for the class, we have the following (that respects the w3c recommendation):


"@context": { 

*         "@vocab":  <> "",

*         "prefLabel":  <> "",

*         "synonym":  <> " ossynonym ",

*         "definition":  <> "",

*         "obsolete":  <> "",

*         "semanticType":  <> "",

*         "cui":  <> ""




It seems the Links context are generated here :

Note that to understand the use of @context I used the w3c recommendation :

Is it an expected behavior? Or is there a problem when generating the links context?

Have a good day,

Vincent Emonet



bioontology-support mailing list
bioontology-support at <mailto:bioontology-support at>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the bioontology-support mailing list