public FeatureStructure createFS(int addr, CASImpl cas) { if (Keep_Type.this.useExistingInstance) { // Return eq fs instance if already created FeatureStructure fs = Keep_Type.this.jcas.getJfsFromCaddr(addr); if (null == fs) { fs = new Keep(addr, Keep_Type.this); Keep_Type.this.jcas.putJfsFromCaddr(addr, fs); return fs; } return fs; } else return new Keep(addr, Keep_Type.this); } };
Keep keep = new Keep(jCas, a.getBegin(), a.getEnd()); keep.setEnclosedAnnot(a);