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;
011import org.apache.uima.jcas.cas.StringArray;
012
013
014/** 
015 * Updated by JCasGen Wed May 07 09:06:03 EDT 2014
016 * XML source: /Users/bethard/Code/cleartk/target/checkout/cleartk-test-util/target/jcasgen/typesystem.xml
017 * @generated */
018public class Lemma extends Annotation {
019  /** @generated
020   * @ordered 
021   */
022  @SuppressWarnings ("hiding")
023  public final static int typeIndexID = JCasRegistry.register(Lemma.class);
024  /** @generated
025   * @ordered 
026   */
027  @SuppressWarnings ("hiding")
028  public final static int type = typeIndexID;
029  /** @generated
030   * @return index of the type  
031   */
032  @Override
033  public              int getTypeIndexID() {return typeIndexID;}
034 
035  /** Never called.  Disable default constructor
036   * @generated */
037  protected Lemma() {/* intentionally empty block */}
038    
039  /** Internal - constructor used by generator 
040   * @generated
041   * @param addr low level Feature Structure reference
042   * @param type the type of this Feature Structure 
043   */
044  public Lemma(int addr, TOP_Type type) {
045    super(addr, type);
046    readObject();
047  }
048  
049  /** @generated
050   * @param jcas JCas to which this Feature Structure belongs 
051   */
052  public Lemma(JCas jcas) {
053    super(jcas);
054    readObject();   
055  } 
056
057  /** @generated
058   * @param jcas JCas to which this Feature Structure belongs
059   * @param begin offset to the begin spot in the SofA
060   * @param end offset to the end spot in the SofA 
061  */  
062  public Lemma(JCas jcas, int begin, int end) {
063    super(jcas);
064    setBegin(begin);
065    setEnd(end);
066    readObject();
067  }   
068
069  /** 
070   * <!-- begin-user-doc -->
071   * Write your own initialization here
072   * <!-- end-user-doc -->
073   *
074   * @generated modifiable 
075   */
076  private void readObject() {/*default - does nothing empty block */}
077     
078 
079    
080  //*--------------*
081  //* Feature: value
082
083  /** getter for value - gets 
084   * @generated
085   * @return value of the feature 
086   */
087  public String getValue() {
088    if (Lemma_Type.featOkTst && ((Lemma_Type)jcasType).casFeat_value == null)
089      jcasType.jcas.throwFeatMissing("value", "org.cleartk.test.util.type.Lemma");
090    return jcasType.ll_cas.ll_getStringValue(addr, ((Lemma_Type)jcasType).casFeatCode_value);}
091    
092  /** setter for value - sets  
093   * @generated
094   * @param v value to set into the feature 
095   */
096  public void setValue(String v) {
097    if (Lemma_Type.featOkTst && ((Lemma_Type)jcasType).casFeat_value == null)
098      jcasType.jcas.throwFeatMissing("value", "org.cleartk.test.util.type.Lemma");
099    jcasType.ll_cas.ll_setStringValue(addr, ((Lemma_Type)jcasType).casFeatCode_value, v);}    
100   
101    
102  //*--------------*
103  //* Feature: testFS
104
105  /** getter for testFS - gets 
106   * @generated
107   * @return value of the feature 
108   */
109  public StringArray getTestFS() {
110    if (Lemma_Type.featOkTst && ((Lemma_Type)jcasType).casFeat_testFS == null)
111      jcasType.jcas.throwFeatMissing("testFS", "org.cleartk.test.util.type.Lemma");
112    return (StringArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Lemma_Type)jcasType).casFeatCode_testFS)));}
113    
114  /** setter for testFS - sets  
115   * @generated
116   * @param v value to set into the feature 
117   */
118  public void setTestFS(StringArray v) {
119    if (Lemma_Type.featOkTst && ((Lemma_Type)jcasType).casFeat_testFS == null)
120      jcasType.jcas.throwFeatMissing("testFS", "org.cleartk.test.util.type.Lemma");
121    jcasType.ll_cas.ll_setRefValue(addr, ((Lemma_Type)jcasType).casFeatCode_testFS, jcasType.ll_cas.ll_getFSRef(v));}    
122    
123  /** indexed getter for testFS - gets an indexed value - 
124   * @generated
125   * @param i index in the array to get
126   * @return value of the element at index i 
127   */
128  public String getTestFS(int i) {
129    if (Lemma_Type.featOkTst && ((Lemma_Type)jcasType).casFeat_testFS == null)
130      jcasType.jcas.throwFeatMissing("testFS", "org.cleartk.test.util.type.Lemma");
131    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Lemma_Type)jcasType).casFeatCode_testFS), i);
132    return jcasType.ll_cas.ll_getStringArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((Lemma_Type)jcasType).casFeatCode_testFS), i);}
133
134  /** indexed setter for testFS - sets an indexed value - 
135   * @generated
136   * @param i index in the array to set
137   * @param v value to set into the array 
138   */
139  public void setTestFS(int i, String v) { 
140    if (Lemma_Type.featOkTst && ((Lemma_Type)jcasType).casFeat_testFS == null)
141      jcasType.jcas.throwFeatMissing("testFS", "org.cleartk.test.util.type.Lemma");
142    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Lemma_Type)jcasType).casFeatCode_testFS), i);
143    jcasType.ll_cas.ll_setStringArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((Lemma_Type)jcasType).casFeatCode_testFS), i, v);}
144  }
145
146