workflowhub-eu / workflowhub-graph

Knowledge Graph generator for WorkflowHub
BSD 2-Clause "Simplified" License
6 stars 1 forks source link

Ability to reconstruct each RO-Crate using named graphs #29

Open stain opened 4 months ago

stain commented 4 months ago

It should be possible to separate statement from each RO-Crate. Not all subjects will be using relative paths locked down by #1 - meaning these triples are (as expected) merged.

It is possible to reconstruct RO-Crate Metadata file by saving as JSON-LD and using Flattening with the RO-Crate JSON-LD Context, see https://www.researchobject.org/ro-crate/specification/1.2-DRAFT/appendix/relative-uris.html#flattening-json-ld-from-nested-json

I propose we could make a second output with the quads where we used named graphs for each RO-Crate. Perhaps the URI identifying the graph should be https://workflowhub.eu/workflows/5/ro_crate?version=1 etc. This would give some duplication and complicate queries slightly (you would need to do GRAPH ?g { ... } to query every graph) but also improve provenance about where each statement is from.

In the default graph could just be the overall metadata for this dataset, a list of these named graphs and their brief provenance referencing this workflow.

Note that RDF file formats supporting named graphs include NQ, TriG and JSON-LD, formats like Turtle would merge to a single graph (or only represent the default graph)