Feature Request: PROV-RDF Serialization #1

nicholsn opened this Issue Dec 6, 2012 · 8 comments


None yet
3 participants

nicholsn commented Dec 6, 2012

I'd be interested in adding support for PROV-RDF using rdflib. Is this in the roadmap? If so, I could help add this feature with a little guidance about how to extend prov with additional serializations.


trungdong commented Dec 8, 2012

Hi Nolan,

We did consider of adding RDF export/import support but never had the bandwidth. Hence, you are very welcome to make contribution in this area. Please let me know what you need and I'll try to help the best I can.

Are you looking for both RDF import and export? I think RDF export is easier than import, and can be quickly implemented. Importing is trickier as it is not a straight forward mapping.

You might find the PROV-O document (http://dvcs.w3.org/hg/prov/raw-file/default/ontology/releases/CR-prov-o-20121211/Overview.html) useful for mapping PROV-DM to RDF.

nicholsn commented Dec 8, 2012

Great. I think eventual support for import and export would be great, but export would be a great place to start. I'm still getting familiar with your codebase (nice work btw!) and the PROV-O document, but in the meantime perhaps you could tell me where you think the best place to add an rdf export def would be or if there example code of something similar. Maybe get_provn?

Thanks and looking forward to contributing!


trungdong commented Dec 10, 2012

Thank you for the nice comment. I made a stab at RDF export and created an rdf branch for it. It is currently experimental and I'm still quite unsure about coupling the code of the model with that for RDF export. Nevertheless, I hope it gives you some ideas.

RDF support will not be trivial (as our experience with the ProvToolbox's implementation in Java told us) and it might be better to have a separate module for RDF (de)serialisation.

You're very welcome and thanks for taking an initial stab at the RDF export. This will definitely give me a good foothold to start from and I agree that coupling the serialization code with the model might need a little refactoring. I'll tinker with this over the upcoming break for the holidays and we can discuss.


trungdong commented Apr 27, 2014

@nicholsn, @satra,

Just a head up. I'm refactoring the prov.model package, introducing significant changes to the data model. In addition, I separated (de)serialization's code from the mode's. See prov.model.serializers package in the 1.x branch, which contains the PROV-JSON serializer. It would be great if you have a chance to port the RDF code to a new serializer following the PROV-JSON example.


satra commented Apr 28, 2014

@trungdong - i'll send a PR today. is there a prov/bundle you have that generates all possible records?


trungdong commented Apr 28, 2014

@satra, thank you. It doesn't need to be that fast but you're very welcome to :)

The branch is completed in functionality, except prov.model.graph which has not been ported. That's why I haven't released it yet.

BTW, the Django app prov.persistence has been removed and will become a separate package soon.

@trungdong trungdong pushed a commit that referenced this issue Aug 19, 2014

@krischer krischer Merge pull request #1 from trungdong/prov-xml
Added test_attributes and test_statements for prov-xml

trungdong commented May 4, 2017

RDF support is now implemented from version 1.5.0

trungdong closed this May 4, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment