Nanopublication / Guidelines

Guidelines, templates and modeling patterns
15 stars 6 forks source link

publishing non-rdf-resources(files/docs etc) in nanopub framework #23

Open damooo opened 3 years ago

damooo commented 3 years ago

Namaste. thanks for great work. currently only rdf-assertions can be published in nanopub framework as namedgraphs, with :prov, :pubinfo being meta about assertions-graph and publication respectively.

But in genereal, we not only need to publish few assertions as an rdf-graph, but need to publish resources, which may not be represented as rdf-graphs. like we may want to publish a plot, a code-repository, a trained-model, an image file, etc., and attach :prov, and :pubinfo as-usual. Here this :resource replaces :assertions as main staple of publication, with remaining framework being as usual. This allows us to not only publish assertions-as-namedgraphs, but anything.

For example Linked Data Platform allows for read write linked data. It also classifies it's resources in two fundamental classes LDPR: which can be expressed as rdf graph, basically assertions-graph, and LDP-NR: a non-rdf resource, like files. And also allows us to talk about these resources in other graphs.

damooo commented 3 years ago

Namaste @tkuhn, and all..

Is this request sound logical? Or is there already a way to publish non-rdf resources in nanopub framework?

Thanks for your work.

tkuhn commented 3 years ago

Yes, it's logical. There isn't a standard way at the moment of how to deal with such non-RDF (but digital) resources with nanopublications. It mostly doesn't make sense to encode them in nanopubs directly (e.g. a large bitmap image), but one could still refer to it. So, one would have to publish the resource otherwise but could refer to it within a nanopublication and give metadata. This reference could include a hash of the object, e.g. with Trusty URIs, to make the reference unambiguous.

damooo commented 3 years ago

Thanks for response @tkuhn

Thus one have to publish non-rdf digital resources externally, and refer to them in their metadata/prov graph in nanopub. In such scenario one may have little freedom in choosing the IRI for such resource. like they may want to publish non-rdf file in github/gitlab/.., or CI/CD tool generated releases, and use their raw representation iri as identifier for such non-rdf resource.

Instead can we have a standardized vocabulary, to specify hash of the non-rdf-resource/file in nanopub meta graph? This may make sense bcz, we need such integrity proof for that resource only "in context of nanopub". Stand-alone, they need not demand such proof to warrant trusty-iris themselves. For parallel, we are not demanding identifier for :assertions graph to be a trusty-iri, for same reason. just that we can embed assertions where as we cannot embed attachments.