There's another issue with JCas we haven't considered yet - the
addToIndexes() method on JCasGen-erated classes.  When this is called,
it needs to know what index repository (what view) to index them in.

Currently, this uses whichever view (meaning a JCas instance) was
passed to the constructor when the object was created.  With this
refactoring, new objects would presumably be given a reference to the
one-and-only JCas, never a JCasView.

Single-sofa code could be made to work using the same "current view"
idea already discussed.  But multi-sofa code will have a problem.

So I think we need to deprecate addToIndexes().  We can add a new
method addToIndexes(JCasView) in its place, and/or require the use of
JCasView.addToIndexes(FS) instead.

-Adam

Reply via email to