001 002 003/* First created by JCasGen Wed May 07 09:06:03 EDT 2014 */ 004package org.cleartk.test.util.type; 005 006import org.apache.uima.jcas.JCas; 007import org.apache.uima.jcas.JCasRegistry; 008import org.apache.uima.jcas.cas.TOP_Type; 009 010import org.apache.uima.jcas.tcas.Annotation; 011 012 013/** 014 * Updated by JCasGen Wed May 07 09:06:03 EDT 2014 015 * XML source: /Users/bethard/Code/cleartk/target/checkout/cleartk-test-util/target/jcasgen/typesystem.xml 016 * @generated */ 017public class Chunk extends Annotation { 018 /** @generated 019 * @ordered 020 */ 021 @SuppressWarnings ("hiding") 022 public final static int typeIndexID = JCasRegistry.register(Chunk.class); 023 /** @generated 024 * @ordered 025 */ 026 @SuppressWarnings ("hiding") 027 public final static int type = typeIndexID; 028 /** @generated 029 * @return index of the type 030 */ 031 @Override 032 public int getTypeIndexID() {return typeIndexID;} 033 034 /** Never called. Disable default constructor 035 * @generated */ 036 protected Chunk() {/* intentionally empty block */} 037 038 /** Internal - constructor used by generator 039 * @generated 040 * @param addr low level Feature Structure reference 041 * @param type the type of this Feature Structure 042 */ 043 public Chunk(int addr, TOP_Type type) { 044 super(addr, type); 045 readObject(); 046 } 047 048 /** @generated 049 * @param jcas JCas to which this Feature Structure belongs 050 */ 051 public Chunk(JCas jcas) { 052 super(jcas); 053 readObject(); 054 } 055 056 /** @generated 057 * @param jcas JCas to which this Feature Structure belongs 058 * @param begin offset to the begin spot in the SofA 059 * @param end offset to the end spot in the SofA 060 */ 061 public Chunk(JCas jcas, int begin, int end) { 062 super(jcas); 063 setBegin(begin); 064 setEnd(end); 065 readObject(); 066 } 067 068 /** 069 * <!-- begin-user-doc --> 070 * Write your own initialization here 071 * <!-- end-user-doc --> 072 * 073 * @generated modifiable 074 */ 075 private void readObject() {/*default - does nothing empty block */} 076 077 078 079 //*--------------* 080 //* Feature: chunkType 081 082 /** getter for chunkType - gets 083 * @generated 084 * @return value of the feature 085 */ 086 public String getChunkType() { 087 if (Chunk_Type.featOkTst && ((Chunk_Type)jcasType).casFeat_chunkType == null) 088 jcasType.jcas.throwFeatMissing("chunkType", "org.cleartk.test.util.type.Chunk"); 089 return jcasType.ll_cas.ll_getStringValue(addr, ((Chunk_Type)jcasType).casFeatCode_chunkType);} 090 091 /** setter for chunkType - sets 092 * @generated 093 * @param v value to set into the feature 094 */ 095 public void setChunkType(String v) { 096 if (Chunk_Type.featOkTst && ((Chunk_Type)jcasType).casFeat_chunkType == null) 097 jcasType.jcas.throwFeatMissing("chunkType", "org.cleartk.test.util.type.Chunk"); 098 jcasType.ll_cas.ll_setStringValue(addr, ((Chunk_Type)jcasType).casFeatCode_chunkType, v);} 099 } 100 101