/** @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 Chunk(JCas jcas, int begin, int end) { super(jcas); setBegin(begin); setEnd(end); readObject(); }
(chunk.getEnd() > 0) ? chunk.getCoveredText() : cas.getDocumentText().substring(chunk.getBegin(), casEnd); final int originalBegin = chunk.getBegin(); for (String innerChunkStr : innterChunksStr) { Chunk innerChunk = new Chunk(cas); innerChunk.setBegin(begin); innerChunk.setEnd(end); innerChunk.addToIndexes(); if (end == originalBegin-1 || end > chunk.getEnd()) { //meaning that there is no more commas in the chunk end = chunk.getEnd(); int begin = chunkCoveringProtein.getBegin(); if (begin < newChunkBegin) { newChunkBegin = begin; int end = chunkCoveredByParenthesis.getEnd(); if (end > newChunkEnd) { newChunkEnd = end; Chunk chunkCoveringProteinAndMeasure = new Chunk(cas, newChunkBegin, newChunkEnd); chunkCoveringProteinAndMeasure.addToIndexes();
public FeatureStructure createFS(int addr, CASImpl cas) { if (Chunk_Type.this.useExistingInstance) { // Return eq fs instance if already created FeatureStructure fs = Chunk_Type.this.jcas.getJfsFromCaddr(addr); if (null == fs) { fs = new Chunk(addr, Chunk_Type.this); Chunk_Type.this.jcas.putJfsFromCaddr(addr, fs); return fs; } return fs; } else return new Chunk(addr, Chunk_Type.this); } };
/** Internal - constructor used by generator * @generated * @param addr low level Feature Structure reference * @param type the type of this Feature Structure */ public Chunk(int addr, TOP_Type type) { super(addr, type); readObject(); }
private static void removeChunks(List<Chunk> oldChunks) { for (Chunk oldChunk : oldChunks) { oldChunk.removeFromIndexes(); } oldChunks.clear(); } }
/** @generated * @param jcas JCas to which this Feature Structure belongs */ public Chunk(JCas jcas) { super(jcas); readObject(); }