001
002
003/* First created by JCasGen Wed May 07 09:15:21 EDT 2014 */
004package org.cleartk.syntax.constituent.type;
005
006import org.apache.uima.jcas.JCas; 
007import org.apache.uima.jcas.JCasRegistry;
008import org.apache.uima.jcas.cas.TOP_Type;
009
010
011
012/** 
013 * Updated by JCasGen Wed May 07 09:15:21 EDT 2014
014 * XML source: /Users/bethard/Code/cleartk/target/checkout/cleartk-type-system/target/jcasgen/typesystem.xml
015 * @generated */
016public class TerminalTreebankNode extends TreebankNode {
017  /** @generated
018   * @ordered 
019   */
020  @SuppressWarnings ("hiding")
021  public final static int typeIndexID = JCasRegistry.register(TerminalTreebankNode.class);
022  /** @generated
023   * @ordered 
024   */
025  @SuppressWarnings ("hiding")
026  public final static int type = typeIndexID;
027  /** @generated
028   * @return index of the type  
029   */
030  @Override
031  public              int getTypeIndexID() {return typeIndexID;}
032 
033  /** Never called.  Disable default constructor
034   * @generated */
035  protected TerminalTreebankNode() {/* intentionally empty block */}
036    
037  /** Internal - constructor used by generator 
038   * @generated
039   * @param addr low level Feature Structure reference
040   * @param type the type of this Feature Structure 
041   */
042  public TerminalTreebankNode(int addr, TOP_Type type) {
043    super(addr, type);
044    readObject();
045  }
046  
047  /** @generated
048   * @param jcas JCas to which this Feature Structure belongs 
049   */
050  public TerminalTreebankNode(JCas jcas) {
051    super(jcas);
052    readObject();   
053  } 
054
055  /** @generated
056   * @param jcas JCas to which this Feature Structure belongs
057   * @param begin offset to the begin spot in the SofA
058   * @param end offset to the end spot in the SofA 
059  */  
060  public TerminalTreebankNode(JCas jcas, int begin, int end) {
061    super(jcas);
062    setBegin(begin);
063    setEnd(end);
064    readObject();
065  }   
066
067  /** 
068   * <!-- begin-user-doc -->
069   * Write your own initialization here
070   * <!-- end-user-doc -->
071   *
072   * @generated modifiable 
073   */
074  private void readObject() {/*default - does nothing empty block */}
075     
076 
077    
078  //*--------------*
079  //* Feature: index
080
081  /** getter for index - gets This value is the same as the index of this node in the top nodes list of terminals.
082   * @generated
083   * @return value of the feature 
084   */
085  public int getIndex() {
086    if (TerminalTreebankNode_Type.featOkTst && ((TerminalTreebankNode_Type)jcasType).casFeat_index == null)
087      jcasType.jcas.throwFeatMissing("index", "org.cleartk.syntax.constituent.type.TerminalTreebankNode");
088    return jcasType.ll_cas.ll_getIntValue(addr, ((TerminalTreebankNode_Type)jcasType).casFeatCode_index);}
089    
090  /** setter for index - sets This value is the same as the index of this node in the top nodes list of terminals. 
091   * @generated
092   * @param v value to set into the feature 
093   */
094  public void setIndex(int v) {
095    if (TerminalTreebankNode_Type.featOkTst && ((TerminalTreebankNode_Type)jcasType).casFeat_index == null)
096      jcasType.jcas.throwFeatMissing("index", "org.cleartk.syntax.constituent.type.TerminalTreebankNode");
097    jcasType.ll_cas.ll_setIntValue(addr, ((TerminalTreebankNode_Type)jcasType).casFeatCode_index, v);}    
098   
099    
100  //*--------------*
101  //* Feature: tokenIndex
102
103  /** getter for tokenIndex - gets The value of this corresponds to the nth token in the sentence that this terminal corresponds to.  The value -1 means that this terminal does not correspond to a token (because it is a trace.)  We assume that each token corresponds to a terminal.
104   * @generated
105   * @return value of the feature 
106   */
107  public int getTokenIndex() {
108    if (TerminalTreebankNode_Type.featOkTst && ((TerminalTreebankNode_Type)jcasType).casFeat_tokenIndex == null)
109      jcasType.jcas.throwFeatMissing("tokenIndex", "org.cleartk.syntax.constituent.type.TerminalTreebankNode");
110    return jcasType.ll_cas.ll_getIntValue(addr, ((TerminalTreebankNode_Type)jcasType).casFeatCode_tokenIndex);}
111    
112  /** setter for tokenIndex - sets The value of this corresponds to the nth token in the sentence that this terminal corresponds to.  The value -1 means that this terminal does not correspond to a token (because it is a trace.)  We assume that each token corresponds to a terminal. 
113   * @generated
114   * @param v value to set into the feature 
115   */
116  public void setTokenIndex(int v) {
117    if (TerminalTreebankNode_Type.featOkTst && ((TerminalTreebankNode_Type)jcasType).casFeat_tokenIndex == null)
118      jcasType.jcas.throwFeatMissing("tokenIndex", "org.cleartk.syntax.constituent.type.TerminalTreebankNode");
119    jcasType.ll_cas.ll_setIntValue(addr, ((TerminalTreebankNode_Type)jcasType).casFeatCode_tokenIndex, v);}    
120  }
121
122