Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JSON-LD 1.1 exports for NIDM-Results examples #479

Merged
merged 67 commits into from
Jul 8, 2019

Conversation

cmaumet
Copy link
Member

@cmaumet cmaumet commented Sep 28, 2018

This PR converts all our turtle examples into JSON-LD using an automatically generated context (from the OWL file) with type-indexing (JSON-LD 1.1 feature) to ease readability of the NIDM documents.

@cmaumet
Copy link
Member Author

cmaumet commented Sep 28, 2018

@satra: Here is a complete demo. There is more cleanup to do, in particular with:

  • Boolean types (e.g. here)
  • Strings (e.g. here).
  • Object properties (e.g. here)
  • more?

that are not condensed according to the context. Could this be an issue in the conversion ttl > JSON-LD via rdflib?

@cmaumet cmaumet changed the title [WIP] Add simplified JSON-LD export for all examples Add JSON-LD 1.1 exports for NIDM-Results examples Jul 2, 2019
@cmaumet
Copy link
Member Author

cmaumet commented Jul 2, 2019

Hi everyone! I think that this long-lasting pull request is now ready to merge. Thank you to @natachaperez for providing so many fixes!

No changes have been made to the data model, this PR focuses exclusively on updating our set of examples for NIDM-Results.

More specifically, in this PR we:

To ease the conversion, a couple of changes have been made to the turtle templates (used to generate the examples) and the owl file:

  • There is now a "preferred label" attribute for all NIDM-R terms (that are used as keys in the JSON-LD serialisation) (cf. nidm-results.owl)
  • To avoid ambiguity when indexing by type in JSON-LD, our turtle examples no longer include the more generic PROV type in addition to the specific NIDM type (cf. e.g. ContrastMap.txt).

Please let us know if you have any comments/feedback. If not, I'll merge at the end of the week. Thanks!

@satra
Copy link
Contributor

satra commented Jul 3, 2019

@cmaumet and @natachaperez - nice work - the one thing i would suggest changing is to first have a PR that generates the context, merge that and then use the purl for that context in the example files. it would be nice to not have really large contexts embedded in the json files.

also to generate the cleanest looking files, you may need to tweak @context more, which means updating the converter. but first i would recommend simply playing with updating the context manually in the playground/python console to see the impact on the compact output.

@cmaumet
Copy link
Member Author

cmaumet commented Jul 3, 2019

@satra: Thanks that's a good point! This is now fixed (cf. 78dd6fd, ae60daf).

I'll update the context purl to redirect to master once this PR is merged.

@cmaumet
Copy link
Member Author

cmaumet commented Jul 5, 2019

Hi everyone! Last call: any additional comment on this PR? Or +1's for merge?

@khelm
Copy link
Contributor

khelm commented Jul 5, 2019

I only have a comment on the removal of the prov assignments. Is the assumption that you'll be able to tell whether the item is an entity, agent, or activity by tracing the term's parents up the tree, so it doesn't need to be explicit? (This is what I'm assuming in NIDM-E).

@cmaumet
Copy link
Member Author

cmaumet commented Jul 8, 2019

@khelm: yes, that's exactly right :)

@cmaumet cmaumet merged commit 1637a3a into incf-nidash:master Jul 8, 2019
@cmaumet cmaumet deleted the jsonld_export branch July 8, 2019 07:23
@cmaumet
Copy link
Member Author

cmaumet commented Jul 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants