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