ejp-rd-vp / resource-metadata-schema

Metadata model and schemas for the EJP virtual platform
https://ejp-rd-vp.github.io/resource-metadata-schema/
Creative Commons Zero v1.0 Universal
14 stars 10 forks source link

RDF version of json-schema #21

Closed matentzn closed 3 years ago

matentzn commented 4 years ago

To have a single point of reference for defining SPARQL queries over our schema, it would be good to have a canonical representation of the json-version of the schema in SPARQL. @rajaram5 @S2Ola before we start getting our hands dirty, could you both write up your proposal on how to maintain an RDF representation of the schema that is automatically updated wrt to changes in the json schema please?

matentzn commented 4 years ago

Also someone remind me what this is: https://github.com/ejp-rd-vp/resource-metadata-schema/blob/master/ejp_vocabulary_context.json

S2Ola commented 4 years ago

To do :

rajaram5 commented 4 years ago

@matentzn Shouldn't we do other way? I mean represent our model in RDF and generate JSON from the RDF

matentzn commented 4 years ago

What would be the advantage? I don’t mind either way, but I like the simplicity of the JSON representation - easy to read an edit without semweb tools. Hit me with your arguments though :P

rajaram5 commented 4 years ago

Ah, I am trying to separate semantic model and implementation of it here :-), don't you agree ShEx/shcal or rdf should be used for model representation. In my option JSON, JSON+LD and turtle are on the implementation or serialization side

matentzn commented 4 years ago

@S2Ola Do you have a draft implementation of the model in RDF? So @rajaram5 you suggest managing the source of truth in RDF (which will then also serve as the schema for the queries over our SPARQL instance), and then define a number of shapes and serialization of that model (including the simple JSON one that is currently there)?

S2Ola commented 4 years ago

@matentzn Draft implementation of the model in RDF here based on the json files here .

rajaram5 commented 4 years ago

My proposals are

  1. Use shex/schal for representing the model. We can use existing tools to generate a model figure.

  2. Use turtle for providing example instance data of the model and use existing tools to generate JSON+LD from turtle.

  3. JSON schema, we should do it outside of the modelling activity. My understanding about this artifact is that in case implementor(s) can't generate any serialization of RDF then, at least if they can generate JSON according to our JSON schema then we can generate RDF from these JSON files. I see this process as a separate activity.

matentzn commented 4 years ago

Do you suggest shex or shacl?

matentzn commented 4 years ago

We can try that. So basically we use the same modularisation as the JSON, and create a bunch of shapes. We still need to provide a standard export from shape->json, and we still need the RDF version as a schema for defining the SPARQL queries I think, but yeah, probably shex makes sense as a semantic source of truth.

rajaram5 commented 4 years ago

Ah finally we are reaching an agreement ;-). For the shape -> json process we can use schema blocks approach. I think in theory it is possible to go from shape blocks to schema blocks. But this step is semi automatic.

matentzn commented 4 years ago

Ok I am a bit hazy on the details of shape blocks. Can you share one example? @S2Ola and I will take care of the shape representation, but I would like to at least do it correctly from the onset.

rajaram5 commented 4 years ago

@S2Ola Do you know how this figure generated?

S2Ola commented 4 years ago

@matentzn those where generated by Simon during the hackthon I guess.

S2Ola commented 4 years ago

@rajaram5 The figure was the works of Simon from delibrations after the hackhatons, I guess

S2Ola commented 4 years ago

@matentzn @rajaram5 Do we agree first with this figure as a starting point? If yes then I will go ahead and Use shex to representing the model.

matentzn commented 4 years ago

Yeah start with that.

rajaram5 commented 4 years ago

I agree. BTW we also have some shex files in this link. Please feel free to reuse it

matentzn commented 4 years ago

Perfect! Yes @S2Ola re-use this stuff as much as possible. Thx @rajaram5

rajaram5 commented 3 years ago

We agree to use only RDF and ShEx to express models in this repository