On 12/27/06, Thilo Goetz <[EMAIL PROTECTED]> wrote:
Jörn Kottmann wrote:
> Hi,
>
> it would be nice to have a facility to listen to changes made to a CAS
> object.
>
> In a SWT/RCP application its likely that multiple views  display
> concurrently some aspects of the CAS object,
> if now one view makes a change to the CAS object all other views must be
> synchronized.
> An example: The editor adds a new annotation to the CAS, now the outline
> view must display the annotation too.
>
> What do you think about introducing change notification support ?
>
> Jörn

It would be nice to have a generic CAS UI model (in the MVC sense) with
that kind of support.  On the other hand, I don't think the CAS itself
is the appropriate place.  How about an interface that extends the CAS
interface and adds appropriate change notification support (along with
an implementation, of course ;-).


We could also use a "decorator" that wraps the CAS interface and
forwards methods to the real CAS while also sending notifications.
There could be some switch to tell the framework to apply the
decorator (maybe part of the performance tuning properties we already
have).  Regardless of whether we do extension or decoration, do we
have to do this not only for CAS but also JCas and all the related
interfaces like FeatureStructure, FSIndexRepository, etc?

Could get messy, but all in all I think finding some way to do this is
worth it.  This could also be used for keeping an "audit trail" of CAS
changes for debugging or provenance tracking.

-Adam

Reply via email to