public static void storeAnnotation(JCas jcas, TOP annotation, int typeID) {

    Iterator<TOP> it = jcas.getJFSIndexRepository().getAllIndexedFS(typeID);
    while (it.hasNext()) {
      TOP oldAnnotation = it.next();
      oldAnnotation.removeFromIndexes();
    }
    annotation.addToIndexes();
  }
public static void storeAnnotation ( JCas jcas , TOP annotation , int typeID ) { Iterator < TOP > it = jcas . getJFSIndexRepository ( ) . getAllIndexedFS ( typeID ) ; while ( it . hasNext ( ) ) { TOP oldAnnotation = it . next ( ) ; oldAnnotation . removeFromIndexes ( ) ; } annotation . addToIndexes ( ) ; }
@param jcas
the CAS in which we'll store this annotation
@param annotation
the annotation to be stored. Removes any instances of this annotation type fi