01: /**
02: * BSD Licensed.
03: */package org.ontoware.rdf2go.model;
04:
05: /**
06: * A Model that can notify listeners when triples are added or removed from the
07: * model.
08: *
09: * Note that not all models support listening, for example a model hosted on a
10: * remote server may not support notifications of operations done on the model
11: * to remote clients.
12: *
13: * Reads from streams and readers are not detectable.
14: *
15: * @author sauermann
16: * @author voelkel
17: */
18: public interface NotifyingModel {
19:
20: /**
21: *
22: * @param listener
23: * @param pattern
24: * all add or remove statement events matching the pattern will
25: * be send to the listener. Updates are always send.
26: */
27: public void addModelChangedListener(ModelChangedListener listener,
28: TriplePattern pattern);
29:
30: public void addModelChangedListener(ModelChangedListener listener);
31:
32: public void removeModelChangedListener(ModelChangedListener listener);
33:
34: }
|