001 002/* First created by JCasGen Wed May 07 09:06:03 EDT 2014 */ 003package org.cleartk.test.util.type; 004 005import org.apache.uima.jcas.JCas; 006import org.apache.uima.jcas.JCasRegistry; 007import org.apache.uima.cas.impl.CASImpl; 008import org.apache.uima.cas.impl.FSGenerator; 009import org.apache.uima.cas.FeatureStructure; 010import org.apache.uima.cas.impl.TypeImpl; 011import org.apache.uima.cas.Type; 012import org.apache.uima.jcas.tcas.Annotation_Type; 013 014/** 015 * Updated by JCasGen Wed May 07 09:06:03 EDT 2014 016 * @generated */ 017public class Parenthetical_Type extends Annotation_Type { 018 /** @generated 019 * @return the generator for this type 020 */ 021 @Override 022 protected FSGenerator getFSGenerator() {return fsGenerator;} 023 /** @generated */ 024 private final FSGenerator fsGenerator = 025 new FSGenerator() { 026 public FeatureStructure createFS(int addr, CASImpl cas) { 027 if (Parenthetical_Type.this.useExistingInstance) { 028 // Return eq fs instance if already created 029 FeatureStructure fs = Parenthetical_Type.this.jcas.getJfsFromCaddr(addr); 030 if (null == fs) { 031 fs = new Parenthetical(addr, Parenthetical_Type.this); 032 Parenthetical_Type.this.jcas.putJfsFromCaddr(addr, fs); 033 return fs; 034 } 035 return fs; 036 } else return new Parenthetical(addr, Parenthetical_Type.this); 037 } 038 }; 039 /** @generated */ 040 @SuppressWarnings ("hiding") 041 public final static int typeIndexID = Parenthetical.typeIndexID; 042 /** @generated 043 @modifiable */ 044 @SuppressWarnings ("hiding") 045 public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.cleartk.test.util.type.Parenthetical"); 046 047 048 049 /** initialize variables to correspond with Cas Type and Features 050 * @generated 051 * @param jcas JCas 052 * @param casType Type 053 */ 054 public Parenthetical_Type(JCas jcas, Type casType) { 055 super(jcas, casType); 056 casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator()); 057 058 } 059} 060 061 062 063