On 7/10/2013 5:28 PM, GATE User wrote: > I am writing the EntityProcessComplete(CAS, EntityProcessStatus) part of the > callback listener to be fed to a UIMA client. I want to interate through all > the view, sofas, and annotations in the CAS that is returned. > > I use cas.getViewIterator() and interate through all the views. For each > few, I extract the sofafs with view.getSofa(). How would I get all > annotations associated with that view and iterate over them? Do I use > cas.getAnnotationIndex().iterator and cast each AnnotationFS as an > Annotation? Yes. > With this method, am I only accessing the annotations associated with a view? Yes. > Thanks in advance. There is also a method on the index repository to get an iterator over all indexed Feature Structures - see getAllIndexedFS. This would pick up indexed FS's that were not subtypes of Annotation. This is also specific to one view.
HTH. -Marshall
