@Override public void process(JCas cas) throws AnalysisEngineProcessException { List<Protein> proteinsToRemove = new LinkedList<Protein>(); for (Protein protein : select(cas, Protein.class)) { for (String filteringRegex : filteringRegexes) { if (protein.getCoveredText().trim().matches(filteringRegex)) { proteinsToRemove.add(protein); } } } for (Protein proteinToRemove : proteinsToRemove) { proteinToRemove.removeFromIndexes(); } } }
/** @generated * @param jcas JCas to which this Feature Structure belongs * @param begin offset to the begin spot in the SofA * @param end offset to the end spot in the SofA */ public Protein(JCas jcas, int begin, int end) { super(jcas); setBegin(begin); setEnd(end); readObject(); }
return "Protein[" + p.getCoveredText() + "]val:" + p.getName() + ";id:" + p.getId(); } else if (o instanceof Chemical) { Chemical c = (Chemical) o;
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); } };
/** Internal - constructor used by generator * @generated * @param addr low level Feature Structure reference * @param type the type of this Feature Structure */ public Protein(int addr, TOP_Type type) { super(addr, type); readObject(); }
final int proteinEnd = protein.getEnd(); int nextParenthesisPosition = documentText.indexOf("(", proteinEnd);
/** @generated * @param jcas JCas to which this Feature Structure belongs */ public Protein(JCas jcas) { super(jcas); readObject(); }