001 002 003/* First created by JCasGen Wed May 07 09:15:21 EDT 2014 */ 004package org.cleartk.srl.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.cleartk.score.type.ScoredAnnotation; 012 013 014/** 015 * Updated by JCasGen Wed May 07 09:15:21 EDT 2014 016 * XML source: /Users/bethard/Code/cleartk/target/checkout/cleartk-type-system/target/jcasgen/typesystem.xml 017 * @generated */ 018public class Argument extends ScoredAnnotation { 019 /** @generated 020 * @ordered 021 */ 022 @SuppressWarnings ("hiding") 023 public final static int typeIndexID = JCasRegistry.register(Argument.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 Argument() {/* 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 Argument(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 Argument(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 Argument(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: annotation 082 083 /** getter for annotation - gets 084 * @generated 085 * @return value of the feature 086 */ 087 public Annotation getAnnotation() { 088 if (Argument_Type.featOkTst && ((Argument_Type)jcasType).casFeat_annotation == null) 089 jcasType.jcas.throwFeatMissing("annotation", "org.cleartk.srl.type.Argument"); 090 return (Annotation)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Argument_Type)jcasType).casFeatCode_annotation)));} 091 092 /** setter for annotation - sets 093 * @generated 094 * @param v value to set into the feature 095 */ 096 public void setAnnotation(Annotation v) { 097 if (Argument_Type.featOkTst && ((Argument_Type)jcasType).casFeat_annotation == null) 098 jcasType.jcas.throwFeatMissing("annotation", "org.cleartk.srl.type.Argument"); 099 jcasType.ll_cas.ll_setRefValue(addr, ((Argument_Type)jcasType).casFeatCode_annotation, jcasType.ll_cas.ll_getFSRef(v));} 100 } 101 102