Beacon metadata as linked data (JSON-LD) #201
M-casado
started this conversation in
Show and tell
Replies: 1 comment 1 reply
-
Thank you for starting the discussion @M-casado. I would say this is important for beacon but would need the community to review all the schemas and would take its time. Anyway, let's see what the people say. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
Addition of
@context
to Beacon's JSON files to transform them into RDF-compliant linked data.Description
After seeing the Beacon v2's JSON Schema models and its examples , it seems apparent that the addition of Linked Data to the JSON documents is the next logical step.
While doing something similar for the FEGA-metadata model (still in dev.), I thought of the benefit that Beacon's model would gain with the addition of
@context
. For the properties that the FEGA model and Beacon overlap entirely (e.g.,cohort
), I was drafting this context already, so you can quickly see already how the context can be added with the addition of one single line to the JSON files. This can be done by referencing the@context
already present in the FEGA metadata schemas (e.g., cohort).Visual example
Grab one of the JSON examples from Beacon v2:
cohorts-MAX-example.json
Paste the JSON content into the JSON-LD Playground as input.
Observe how, in the absence of context, the input is a plain JSON, with no expanded
@id
s or IRIs.Now add, at the root level
@context
pointing towards the FEGA-model schema of the same entity (cohorts) and observe how immediately the context allows for the JSON file, without further modification, to be expanded.I would recommend to play around in the JSON Playground, and to add an
@id
to the root of the JSON. Either that, or the handy solution I got with aliases:"id": "@id"
in the common-definitions. I added this alias to comply with Beacon's root propertyid
. Of course, this only works if the@id
is an IRI, but that can easily be done with adding a prefix to the ID (e.g., from"id": "cohort0001"
to"id": "ega:cohort0001"
). The moment you do this, you can visualize properly the RDF triplets in the "Table" format.Additional notes
The
@context
I created so far in the FEGA model is lacking, as it doesn't deepen into all the entities in the Beacon model. If such context was created by Beacon v2, it would be great for us too: we would just have to add a reference to Beacon's context, rather than creating it myself.Beta Was this translation helpful? Give feedback.
All reactions