public FeatureStructure createFS(int addr, CASImpl cas) { if (Protein_Type.this.useExistingInstance) { // Return eq fs instance if already created FeatureStructure fs = Protein_Type.this.jcas.getJfsFromCaddr(addr); if (null == fs) { fs = new Protein(addr, Protein_Type.this); Protein_Type.this.jcas.putJfsFromCaddr(addr, fs); return fs; } return fs; } else return new Protein(addr, Protein_Type.this); } };
Protein proteinCopy = new Protein(jCas, protein.getBegin(), protein.getEnd()); proteinCopy.setName(protein.getName());