Parastoo,
1) The model does not have a concept of change resource instead it does a
delete and add. So to detect a change of resource you will have to
determine exactly what you mean and be able to detect it by looking at both
the statement that was deleted and the statement that was added. Armed
with this information you can proceed to do the following:
2) Create a ModelChangedListener implementation that detects the pairs
you identified in the step above.
class MyModelChangeListener implements ModelChangedListener {
// code to detect the conditions enumerated in step 1.
// code to send notification of change as required by your application.
}
3) Register your listener with the model.
ModelChangeListener mcl = new MyModelChangeListener()
model.register( mcl );
// Note if you register multiple times you will receive multiple
notifications.
4) test it.
Statement s = model.find( S, P, O );
model.remove(s);
model.add( S, P, O2 );
// did your listener detect the change?
Hope this helps,
Claude
On Tue, Nov 5, 2013 at 1:07 AM, Parastoo Delgoshaei <[email protected]>wrote:
> Can you be more specific on how to catch that change. The change is as a
> result of rule checking.
>
> Thanks,
> -P.
>
>
>
> On Monday, November 4, 2013 3:50 PM, Claude Warren <[email protected]>
> wrote:
>
> When a property is changed the graph sees both a delete and add
> notification.
>
>
>
> On Mon, Nov 4, 2013 at 5:17 PM, Parastoo Delgoshaei <[email protected]
> >wrote:
>
> > Hi everyone,
> > I was wondering if Jena supports model property change listener. i.e.
> > there is a mechanism to be notified if a value of and object or datatype
> > property has changed in an individual of your model.
> >
> > Thanks,
> > -P.
>
>
>
>
> --
> I like: Like Like - The likeliest place on the web<
> http://like-like.xenei.com>
> LinkedIn: http://www.linkedin.com/in/claudewarren
--
I like: Like Like - The likeliest place on the web<http://like-like.xenei.com>
LinkedIn: http://www.linkedin.com/in/claudewarren