001
002/* First created by JCasGen Wed May 07 09:15:21 EDT 2014 */
003package org.cleartk.timeml.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.cleartk.score.type.ScoredAnnotation_Type;
013
014/** 
015 * Updated by JCasGen Wed May 07 09:15:21 EDT 2014
016 * @generated */
017public class Text_Type extends ScoredAnnotation_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 (Text_Type.this.useExistingInstance) {
028                           // Return eq fs instance if already created
029                     FeatureStructure fs = Text_Type.this.jcas.getJfsFromCaddr(addr);
030                     if (null == fs) {
031                       fs = new Text(addr, Text_Type.this);
032                           Text_Type.this.jcas.putJfsFromCaddr(addr, fs);
033                           return fs;
034                     }
035                     return fs;
036        } else return new Text(addr, Text_Type.this);
037          }
038    };
039  /** @generated */
040  @SuppressWarnings ("hiding")
041  public final static int typeIndexID = Text.typeIndexID;
042  /** @generated 
043     @modifiable */
044  @SuppressWarnings ("hiding")
045  public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.cleartk.timeml.type.Text");
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 Text_Type(JCas jcas, Type casType) {
055    super(jcas, casType);
056    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());
057
058  }
059}
060
061
062
063