Hi Anuj,
Jena has some building blocks: GraphListener, DatasetChanges
GraphListener enables an app to watch every change on a graph.
DatasetGraphMonitor/DatasetChanges can be used if you want to look at a
dataset.
Both give you triggers on individual triple/quad changes on which you
can add application code.
GraphListener includes some identification of groups of changes but only
when the changes are made as a single operation which might be hard in
the app (e.g. deletes and inserts). Even then, the bulk operations can
get lost in hierarchies of graphs wrapping other graphs.
DatasetGraphMonitor does not provide grouped operations anyway.
See also org.apache.jena.graph.GraphUtil
----
I have the need to work with logical collections of changes.
Caution:
work-in-progress alter
not part of Jena
https://afs.github.io/rdf-delta/rdf-patch.html
Here, transactions are captured so there are logical groups of changes
such as your #2 requirement.
Annotating, or linking to RDF Patches gives an audit.
In my $job, this is used to replicate changes between databases (High
Availability).
Andy
On 27/10/17 11:42, anuj kumar wrote:
Hi Jena Users,
I have a query regarding the most effective way to capture changes in the
underlying Triple Store.
I have a requirement where:
1. Every time a property of a Node (represented as a Triple Statement)
changes, I also need to generate certain change statements to capture what
has changed, who changed it, when it was changed etc.
2. If I delete a Node (represented as a Set of Triples in the RDF Store), I
need to capture the action DELETE on this node, who deleted the node, when
it was deleted etc.
Basically, I need to have a audit trail developed so that I can create the
graph as it was at a given moment in time.
The question is:
1. What is the best way to implement such functionality? Does Jena support
such a thing either natively or through some standard mechanism?
Thanks,