Let's say at time t0, I have a bundle with an entity E1 and an activity A1.
activity A1 has a prov:startTime.
Later, at time t1, I want to add an new entity E2 to that bundle and I want to add prov:endTime to the activity A1.
Since I am not going to write to full provenance data in one shot, I would like to use something like "save_bundle" but that calls for instance:
PDRecord.objects.get_or_create instead of PDRecord.objects.create
PDBundle.objects.get_or_create instead of PDBundle.objects.create
This is a very good suggestion and it is on our plan. It has been supported at the prov.model package. However, the prov.persistence does not support this yet.
We're working on an updated SQL schema for the library and this probably will have to wait until the schema is finalised.
We decided to stop supporting the prov.persistence subpackage from 1.x onward. We'll move its functionality to separate package.
BTW, with the lastest version of prov.model, you can add/append a single record to a ProvBundle or ProvDocument with ProvBundle.add_record(record)
In addition, ProvBundle.update(other) allows you to add all the content of another bundle to the current bundle.