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.cas.FSArray; 011import org.apache.uima.jcas.tcas.Annotation; 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 Header extends Annotation { 019 /** @generated 020 * @ordered 021 */ 022 @SuppressWarnings ("hiding") 023 public final static int typeIndexID = JCasRegistry.register(Header.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 Header() {/* 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 Header(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 Header(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 Header(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: authors 082 083 /** getter for authors - gets 084 * @generated 085 * @return value of the feature 086 */ 087 public FSArray getAuthors() { 088 if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_authors == null) 089 jcasType.jcas.throwFeatMissing("authors", "org.cleartk.test.util.type.Header"); 090 return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Header_Type)jcasType).casFeatCode_authors)));} 091 092 /** setter for authors - sets 093 * @generated 094 * @param v value to set into the feature 095 */ 096 public void setAuthors(FSArray v) { 097 if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_authors == null) 098 jcasType.jcas.throwFeatMissing("authors", "org.cleartk.test.util.type.Header"); 099 jcasType.ll_cas.ll_setRefValue(addr, ((Header_Type)jcasType).casFeatCode_authors, jcasType.ll_cas.ll_getFSRef(v));} 100 101 /** indexed getter for authors - gets an indexed value - 102 * @generated 103 * @param i index in the array to get 104 * @return value of the element at index i 105 */ 106 public AuthorInfo getAuthors(int i) { 107 if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_authors == null) 108 jcasType.jcas.throwFeatMissing("authors", "org.cleartk.test.util.type.Header"); 109 jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Header_Type)jcasType).casFeatCode_authors), i); 110 return (AuthorInfo)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((Header_Type)jcasType).casFeatCode_authors), i)));} 111 112 /** indexed setter for authors - sets an indexed value - 113 * @generated 114 * @param i index in the array to set 115 * @param v value to set into the array 116 */ 117 public void setAuthors(int i, AuthorInfo v) { 118 if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_authors == null) 119 jcasType.jcas.throwFeatMissing("authors", "org.cleartk.test.util.type.Header"); 120 jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Header_Type)jcasType).casFeatCode_authors), i); 121 jcasType.ll_cas.ll_setRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((Header_Type)jcasType).casFeatCode_authors), i, jcasType.ll_cas.ll_getFSRef(v));} 122 } 123 124