| |
| /* First created by JCasGen Sat Jun 08 19:25:02 CEST 2013 */ |
| package org.apache.uima.ruta.type; |
| |
| import org.apache.uima.jcas.JCas; |
| import org.apache.uima.jcas.JCasRegistry; |
| import org.apache.uima.cas.impl.CASImpl; |
| import org.apache.uima.cas.impl.FSGenerator; |
| import org.apache.uima.cas.FeatureStructure; |
| import org.apache.uima.cas.impl.TypeImpl; |
| import org.apache.uima.cas.Type; |
| import org.apache.uima.jcas.tcas.Annotation_Type; |
| |
| /** |
| * Updated by JCasGen Sat Jun 08 19:25:02 CEST 2013 |
| * @generated */ |
| public class RutaOptional_Type extends Annotation_Type { |
| /** @generated */ |
| @Override |
| protected FSGenerator getFSGenerator() {return fsGenerator;} |
| /** @generated */ |
| private final FSGenerator fsGenerator = |
| new FSGenerator() { |
| public FeatureStructure createFS(int addr, CASImpl cas) { |
| if (RutaOptional_Type.this.useExistingInstance) { |
| // Return eq fs instance if already created |
| FeatureStructure fs = RutaOptional_Type.this.jcas.getJfsFromCaddr(addr); |
| if (null == fs) { |
| fs = new RutaOptional(addr, RutaOptional_Type.this); |
| RutaOptional_Type.this.jcas.putJfsFromCaddr(addr, fs); |
| return fs; |
| } |
| return fs; |
| } else return new RutaOptional(addr, RutaOptional_Type.this); |
| } |
| }; |
| /** @generated */ |
| @SuppressWarnings ("hiding") |
| public final static int typeIndexID = RutaOptional.typeIndexID; |
| /** @generated |
| @modifiable */ |
| @SuppressWarnings ("hiding") |
| public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.apache.uima.ruta.type.RutaOptional"); |
| |
| |
| |
| /** initialize variables to correspond with Cas Type and Features |
| * @generated */ |
| public RutaOptional_Type(JCas jcas, Type casType) { |
| super(jcas, casType); |
| casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator()); |
| |
| } |
| } |
| |
| |
| |
| |