bio2rdf / bio2rdf-rest-talend

A RESTful interface to the Bio2RDF network of data.
MIT License
5 stars 1 forks source link

provenance for query results #13

Open micheldumontier opened 9 years ago

micheldumontier commented 9 years ago

I propose that we include the provenance for a REST call in the returned results. I suggest we offer quad-based nanopublications [1] with the resulting triples in an "assertion graph" and the provenance of how and where we got those triples in the "provenance graph". here is a quick mockeup:

 @prefix : <http://nanopublications.bio2rdf.org/> .
 @prefix np:  <http://www.nanopub.org/nschema#> .
 @prefix prov: <http://www.w3.org/ns/prov#> .
 @prefix xsd:  <http://www.w3.org/2001/XMLSchema#> .

 # nanopublication
 :np-uuid {
   np:hasPubInfo :np-pubinfo-uuid;
   np:hasAssertion :np-assertion-uuid;
   np:hasProvenance :np-provenance-uuid;
  }

 #  nanopublication metadata
 :np-pubinfo-uuid {
  dct:title "Bio2RDF SPARQL query nanopublication"; 
  prov:generatedAtTime  "YYYY-MM-DDTHH:MM:SSZ"^^xsd:dateTime;
  dct:publisher <http://bio2rdf.org>;
  dct:license <http://creativecommons.org/licenses/by/4.0/>;
  cito:citesAsAuthority {} . # bio2rdf publications here
 }

 # nanopublication assertion
 :np-assertion-uuid {
    # query triples here
  }

  # nanopublication provenance
 :np-provenance-uuid {
   :np-assertion-uuid pav:wasGeneratedBy :np-agent-uuid .
   :np-agent-uuid
      a :web-service; # find appropriate type 
      prov:startedAtTime "";
      prov:endedAtTime "";
      prov:specializationOf <http://bio2rdf.org>;
      prov:used bio2rdf:dataset1, bio2rdf:dataset2, ...  # versioned dataset graph uris
      prov:used :url_query_1, :url_query_2, ... # full URL of SPARQL queries for reproducibility.
 }

[1] http://www.nanopub.org/2013/WD-guidelines-20131215/

vemonet commented 9 years ago

Sesame components developed, REST service handling nquads and graph provenance

ansell commented 9 years ago

There are already Sesame components developed for nanopub (the reference implementation as far as I know!)

https://github.com/Nanopublication/nanopub-java