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?

Paul R Alexander palexand at
Mon Mar 28 13:48:25 PDT 2016

There is no property information that exists in the underlying RDF that can be used for hypermedia links. As you suggest, we could have created link types ( and a whole RDF schema to handle the hypermedia linking, but from a developer perspective when writing a hypermedia client I want to know at a minimum 1) the name of the link, 2) the type of object I can expect at that link.

That allows me to write a client that understands that there is a thing typed as owl#Class and it should be handled in a certain way (deserialized, serialized, created, deleted, etc). To get to that minimum level of information using a RDF approach that includes typing the links was seen as a barrier to usage.

Even now, the RDF model isn't broken in my opinion. For example, the links for a class look like this in RDF:
<> <> _:b0 .
_:b0 <> "" .
_:b0 <> "" .
_:b0 <> "" .

So class has links represented by _:b0. Link _:b0 connects to objects at URL<>. It's not super intuitive but it also doesn't seem broken to me.

Again, I would defer to the current BioPortal team on any of this. I'm just providing my perspective.


On Mar 28, 2016, at 12:23 PM, Clement Jonquet <jonquet at<mailto:jonquet at>> wrote:

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<mailto:vincent.emonet at>>
Cc : bioontology-support at<mailto: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