Adam Lally wrote:
The process call would take a CAS.  Inside the body of the process()
method there would be no issue, but I'm thinking about other methods
that the user has implemented that need access to the indexes and also
need to create new FS.  I'm sure there are tons of these.  IMO having
to carry around two object references instead of one would be a pain.
Would we now require that such methods take both the CAS and the
CasView as arguments?  I'm not so happy with that.

No, the CAS is sufficient. Then call getView() in the method (once, and cache the result). That's what I would do, anyway.

An annotation is created with respect to a sofa, not a view.  Why not do
CAS.createAnnotation(Type, int, int, Sofa) or something?  Then
View.createAnnotation(Type, int, int) would be a convenience method.


Yes, I had wanted to add CAS.createAnnotation(Type, int, int, Sofa) -
thanks for reminding me I had left it off of the Wiki page.  But
still, I think there's even more need for the convenience function
createAnnotation that there is for createFS.  Without it we're left
with
view.getCAS().createAnnotation(type, begin, end, view.getSofa()).

Even I would agree that a convenience method makes sense in this case. I just wanted to verify that it actually was a convenience method.

--Thilo

Reply via email to