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 DependencyRelation extends Annotation { 018 /** @generated 019 * @ordered 020 */ 021 @SuppressWarnings ("hiding") 022 public final static int typeIndexID = JCasRegistry.register(DependencyRelation.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 DependencyRelation() {/* 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 DependencyRelation(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 DependencyRelation(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 DependencyRelation(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: head 081 082 /** getter for head - gets 083 * @generated 084 * @return value of the feature 085 */ 086 public Token getHead() { 087 if (DependencyRelation_Type.featOkTst && ((DependencyRelation_Type)jcasType).casFeat_head == null) 088 jcasType.jcas.throwFeatMissing("head", "org.cleartk.test.util.type.DependencyRelation"); 089 return (Token)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((DependencyRelation_Type)jcasType).casFeatCode_head)));} 090 091 /** setter for head - sets 092 * @generated 093 * @param v value to set into the feature 094 */ 095 public void setHead(Token v) { 096 if (DependencyRelation_Type.featOkTst && ((DependencyRelation_Type)jcasType).casFeat_head == null) 097 jcasType.jcas.throwFeatMissing("head", "org.cleartk.test.util.type.DependencyRelation"); 098 jcasType.ll_cas.ll_setRefValue(addr, ((DependencyRelation_Type)jcasType).casFeatCode_head, jcasType.ll_cas.ll_getFSRef(v));} 099 100 101 //*--------------* 102 //* Feature: projective 103 104 /** getter for projective - gets 105 * @generated 106 * @return value of the feature 107 */ 108 public boolean getProjective() { 109 if (DependencyRelation_Type.featOkTst && ((DependencyRelation_Type)jcasType).casFeat_projective == null) 110 jcasType.jcas.throwFeatMissing("projective", "org.cleartk.test.util.type.DependencyRelation"); 111 return jcasType.ll_cas.ll_getBooleanValue(addr, ((DependencyRelation_Type)jcasType).casFeatCode_projective);} 112 113 /** setter for projective - sets 114 * @generated 115 * @param v value to set into the feature 116 */ 117 public void setProjective(boolean v) { 118 if (DependencyRelation_Type.featOkTst && ((DependencyRelation_Type)jcasType).casFeat_projective == null) 119 jcasType.jcas.throwFeatMissing("projective", "org.cleartk.test.util.type.DependencyRelation"); 120 jcasType.ll_cas.ll_setBooleanValue(addr, ((DependencyRelation_Type)jcasType).casFeatCode_projective, v);} 121 122 123 //*--------------* 124 //* Feature: label 125 126 /** getter for label - gets 127 * @generated 128 * @return value of the feature 129 */ 130 public String getLabel() { 131 if (DependencyRelation_Type.featOkTst && ((DependencyRelation_Type)jcasType).casFeat_label == null) 132 jcasType.jcas.throwFeatMissing("label", "org.cleartk.test.util.type.DependencyRelation"); 133 return jcasType.ll_cas.ll_getStringValue(addr, ((DependencyRelation_Type)jcasType).casFeatCode_label);} 134 135 /** setter for label - sets 136 * @generated 137 * @param v value to set into the feature 138 */ 139 public void setLabel(String v) { 140 if (DependencyRelation_Type.featOkTst && ((DependencyRelation_Type)jcasType).casFeat_label == null) 141 jcasType.jcas.throwFeatMissing("label", "org.cleartk.test.util.type.DependencyRelation"); 142 jcasType.ll_cas.ll_setStringValue(addr, ((DependencyRelation_Type)jcasType).casFeatCode_label, v);} 143 } 144 145