Esempio n. 1
0
/**
 * Updated by JCasGen Sat Nov 01 22:21:22 CET 2014
 *
 * @generated
 */
public class Paragraph_Type extends Annotation_Type {
  /**
   * @generated
   * @return the generator for this type
   */
  @Override
  protected FSGenerator getFSGenerator() {
    return fsGenerator;
  }
  /** @generated */
  private final FSGenerator fsGenerator =
      new FSGenerator() {
        public FeatureStructure createFS(int addr, CASImpl cas) {
          if (Paragraph_Type.this.useExistingInstance) {
            // Return eq fs instance if already created
            FeatureStructure fs = Paragraph_Type.this.jcas.getJfsFromCaddr(addr);
            if (null == fs) {
              fs = new Paragraph(addr, Paragraph_Type.this);
              Paragraph_Type.this.jcas.putJfsFromCaddr(addr, fs);
              return fs;
            }
            return fs;
          } else return new Paragraph(addr, Paragraph_Type.this);
        }
      };
  /** @generated */
  @SuppressWarnings("hiding")
  public static final int typeIndexID = Paragraph.typeIndexID;
  /**
   * @generated
   * @modifiable
   */
  @SuppressWarnings("hiding")
  public static final boolean featOkTst =
      JCasRegistry.getFeatOkTst("de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Paragraph");

  /**
   * initialize variables to correspond with Cas Type and Features
   *
   * @generated
   * @param jcas JCas
   * @param casType Type
   */
  public Paragraph_Type(JCas jcas, Type casType) {
    super(jcas, casType);
    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
  }
}
Esempio n. 2
0
/**
 * A time reference - 12 or 24 hours - within the document. Updated by JCasGen Tue Apr 12 12:07:25
 * BST 2016
 *
 * @generated
 */
public class Time_Type extends Temporal_Type {
  /**
   * @generated
   * @return the generator for this type
   */
  @Override
  protected FSGenerator getFSGenerator() {
    return fsGenerator;
  }
  /** @generated */
  private final FSGenerator fsGenerator =
      new FSGenerator() {
        public FeatureStructure createFS(int addr, CASImpl cas) {
          if (Time_Type.this.useExistingInstance) {
            // Return eq fs instance if already created
            FeatureStructure fs = Time_Type.this.jcas.getJfsFromCaddr(addr);
            if (null == fs) {
              fs = new Time(addr, Time_Type.this);
              Time_Type.this.jcas.putJfsFromCaddr(addr, fs);
              return fs;
            }
            return fs;
          } else return new Time(addr, Time_Type.this);
        }
      };
  /** @generated */
  @SuppressWarnings("hiding")
  public static final int typeIndexID = Time.typeIndexID;
  /**
   * @generated
   * @modifiable
   */
  @SuppressWarnings("hiding")
  public static final boolean featOkTst =
      JCasRegistry.getFeatOkTst("uk.gov.dstl.baleen.types.temporal.Time");

  /**
   * initialize variables to correspond with Cas Type and Features
   *
   * @generated
   * @param jcas JCas
   * @param casType Type
   */
  public Time_Type(JCas jcas, Type casType) {
    super(jcas, casType);
    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
  }
}
/**
 * Type defined in edu.pitt.dbmi.xmeso.model.Model Updated by JCasGen Wed Sep 07 16:18:03 EDT 2016
 *
 * @generated
 */
public class LymphNodesExamined_Type extends XmesoNumberDataElement_Type {
  /**
   * @generated
   * @return the generator for this type
   */
  @Override
  protected FSGenerator getFSGenerator() {
    return fsGenerator;
  }
  /** @generated */
  private final FSGenerator fsGenerator =
      new FSGenerator() {
        public FeatureStructure createFS(int addr, CASImpl cas) {
          if (LymphNodesExamined_Type.this.useExistingInstance) {
            // Return eq fs instance if already created
            FeatureStructure fs = LymphNodesExamined_Type.this.jcas.getJfsFromCaddr(addr);
            if (null == fs) {
              fs = new LymphNodesExamined(addr, LymphNodesExamined_Type.this);
              LymphNodesExamined_Type.this.jcas.putJfsFromCaddr(addr, fs);
              return fs;
            }
            return fs;
          } else return new LymphNodesExamined(addr, LymphNodesExamined_Type.this);
        }
      };
  /** @generated */
  @SuppressWarnings("hiding")
  public static final int typeIndexID = LymphNodesExamined.typeIndexID;
  /**
   * @generated
   * @modifiable
   */
  @SuppressWarnings("hiding")
  public static final boolean featOkTst =
      JCasRegistry.getFeatOkTst("edu.pitt.dbmi.xmeso.model.Model.LymphNodesExamined");

  /**
   * initialize variables to correspond with Cas Type and Features
   *
   * @generated
   * @param jcas JCas
   * @param casType Type
   */
  public LymphNodesExamined_Type(JCas jcas, Type casType) {
    super(jcas, casType);
    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
  }
}
/**
 * Updated by JCasGen Fri Oct 05 20:16:40 CEST 2012
 *
 * @generated
 */
public class NUMBER_Type extends Dependency_Type {
  /** @generated */
  @Override
  protected FSGenerator getFSGenerator() {
    return fsGenerator;
  }
  /** @generated */
  private final FSGenerator fsGenerator =
      new FSGenerator() {
        public FeatureStructure createFS(int addr, CASImpl cas) {
          if (NUMBER_Type.this.useExistingInstance) {
            // Return eq fs instance if already created
            FeatureStructure fs = NUMBER_Type.this.jcas.getJfsFromCaddr(addr);
            if (null == fs) {
              fs = new NUMBER(addr, NUMBER_Type.this);
              NUMBER_Type.this.jcas.putJfsFromCaddr(addr, fs);
              return fs;
            }
            return fs;
          } else return new NUMBER(addr, NUMBER_Type.this);
        }
      };
  /** @generated */
  // @SuppressWarnings ("hiding")
  public static final int typeIndexID = NUMBER.typeIndexID;
  /**
   * @generated
   * @modifiable
   */
  // @SuppressWarnings ("hiding")
  public static final boolean featOkTst =
      JCasRegistry.getFeatOkTst("de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.NUMBER");

  /**
   * initialize variables to correspond with Cas Type and Features
   *
   * @generated
   */
  public NUMBER_Type(JCas jcas, Type casType) {
    super(jcas, casType);
    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
  }
}
/**
 * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012
 *
 * @generated
 */
public class DebugMatchedRuleMatch_Type extends DebugRuleMatch_Type {
  /** @generated */
  protected FSGenerator getFSGenerator() {
    return fsGenerator;
  }

  /** @generated */
  private final FSGenerator fsGenerator =
      new FSGenerator() {
        public FeatureStructure createFS(int addr, CASImpl cas) {
          if (DebugMatchedRuleMatch_Type.this.useExistingInstance) {
            // Return eq fs instance if already created
            FeatureStructure fs = DebugMatchedRuleMatch_Type.this.jcas.getJfsFromCaddr(addr);
            if (null == fs) {
              fs = new DebugMatchedRuleMatch(addr, DebugMatchedRuleMatch_Type.this);
              DebugMatchedRuleMatch_Type.this.jcas.putJfsFromCaddr(addr, fs);
              return fs;
            }
            return fs;
          } else return new DebugMatchedRuleMatch(addr, DebugMatchedRuleMatch_Type.this);
        }
      };

  /** @generated */
  public static final int typeIndexID = DebugMatchedRuleMatch.typeIndexID;

  /**
   * @generated
   * @modifiable
   */
  public static final boolean featOkTst =
      JCasRegistry.getFeatOkTst("org.apache.uima.ruta.type.DebugMatchedRuleMatch");

  /**
   * initialize variables to correspond with Cas Type and Features
   *
   * @generated
   */
  public DebugMatchedRuleMatch_Type(JCas jcas, Type casType) {
    super(jcas, casType);
    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
  }
}
Esempio n. 6
0
/**
 * Updated by JCasGen Tue Sep 04 18:38:22 MSK 2012
 *
 * @generated
 */
public class NBSP_Type extends WhiteSpace_Type {
  /** @generated */
  @Override
  protected FSGenerator getFSGenerator() {
    return fsGenerator;
  }
  /** @generated */
  private final FSGenerator fsGenerator =
      new FSGenerator() {
        public FeatureStructure createFS(int addr, CASImpl cas) {
          if (NBSP_Type.this.useExistingInstance) {
            // Return eq fs instance if already created
            FeatureStructure fs = NBSP_Type.this.jcas.getJfsFromCaddr(addr);
            if (null == fs) {
              fs = new NBSP(addr, NBSP_Type.this);
              NBSP_Type.this.jcas.putJfsFromCaddr(addr, fs);
              return fs;
            }
            return fs;
          } else return new NBSP(addr, NBSP_Type.this);
        }
      };
  /** @generated */
  @SuppressWarnings("hiding")
  public static final int typeIndexID = NBSP.typeIndexID;
  /**
   * @generated
   * @modifiable
   */
  @SuppressWarnings("hiding")
  public static final boolean featOkTst =
      JCasRegistry.getFeatOkTst("ru.kfu.cll.uima.tokenizer.fstype.NBSP");

  /**
   * initialize variables to correspond with Cas Type and Features
   *
   * @generated
   */
  public NBSP_Type(JCas jcas, Type casType) {
    super(jcas, casType);
    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
  }
}
/**
 * Updated by JCasGen Sun May 16 14:12:58 CEST 2010
 *
 * @generated
 */
public class ExpirationDateAnnotation_Type extends Annotation_Type {
  /** @generated */
  protected FSGenerator getFSGenerator() {
    return fsGenerator;
  }

  /** @generated */
  private final FSGenerator fsGenerator =
      new FSGenerator() {
        public FeatureStructure createFS(int addr, CASImpl cas) {
          if (ExpirationDateAnnotation_Type.this.useExistingInstance) {
            // Return eq fs instance if already created
            FeatureStructure fs = ExpirationDateAnnotation_Type.this.jcas.getJfsFromCaddr(addr);
            if (null == fs) {
              fs = new ExpirationDateAnnotation(addr, ExpirationDateAnnotation_Type.this);
              ExpirationDateAnnotation_Type.this.jcas.putJfsFromCaddr(addr, fs);
              return fs;
            }
            return fs;
          } else return new ExpirationDateAnnotation(addr, ExpirationDateAnnotation_Type.this);
        }
      };

  /** @generated */
  public static final int typeIndexID = ExpirationDateAnnotation.typeIndexID;

  /**
   * @generated
   * @modifiable
   */
  public static final boolean featOkTst =
      JCasRegistry.getFeatOkTst("cybion.uima.ts.ExpirationDateAnnotation");

  /**
   * initialize variables to correspond with Cas Type and Features
   *
   * @generated
   */
  public ExpirationDateAnnotation_Type(JCas jcas, Type casType) {
    super(jcas, casType);
    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
  }
}
/**
 * Updated by JCasGen Sun Oct 06 23:42:29 EDT 2013
 *
 * @generated
 */
public class DocumentCreationTime_Type extends Time_Type {
  /** @generated */
  @Override
  protected FSGenerator getFSGenerator() {
    return fsGenerator;
  }
  /** @generated */
  private final FSGenerator fsGenerator =
      new FSGenerator() {
        public FeatureStructure createFS(int addr, CASImpl cas) {
          if (DocumentCreationTime_Type.this.useExistingInstance) {
            // Return eq fs instance if already created
            FeatureStructure fs = DocumentCreationTime_Type.this.jcas.getJfsFromCaddr(addr);
            if (null == fs) {
              fs = new DocumentCreationTime(addr, DocumentCreationTime_Type.this);
              DocumentCreationTime_Type.this.jcas.putJfsFromCaddr(addr, fs);
              return fs;
            }
            return fs;
          } else return new DocumentCreationTime(addr, DocumentCreationTime_Type.this);
        }
      };
  /** @generated */
  @SuppressWarnings("hiding")
  public static final int typeIndexID = DocumentCreationTime.typeIndexID;
  /**
   * @generated
   * @modifiable
   */
  @SuppressWarnings("hiding")
  public static final boolean featOkTst =
      JCasRegistry.getFeatOkTst("org.cleartk.timeml.type.DocumentCreationTime");

  /**
   * initialize variables to correspond with Cas Type and Features
   *
   * @generated
   */
  public DocumentCreationTime_Type(JCas jcas, Type casType) {
    super(jcas, casType);
    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
  }
}
Esempio n. 9
0
/**
 * Abstract Pronoun Updated by JCasGen Tue Mar 06 16:28:16 CET 2012
 *
 * @generated
 */
public class Pronoun_Type extends Noun_Type {
  /** @generated */
  protected FSGenerator getFSGenerator() {
    return fsGenerator;
  }
  /** @generated */
  private final FSGenerator fsGenerator =
      new FSGenerator() {
        public FeatureStructure createFS(int addr, CASImpl cas) {
          if (Pronoun_Type.this.useExistingInstance) {
            // Return eq fs instance if already created
            FeatureStructure fs = Pronoun_Type.this.jcas.getJfsFromCaddr(addr);
            if (null == fs) {
              fs = new Pronoun(addr, Pronoun_Type.this);
              Pronoun_Type.this.jcas.putJfsFromCaddr(addr, fs);
              return fs;
            }
            return fs;
          } else return new Pronoun(addr, Pronoun_Type.this);
        }
      };
  /** @generated */
  public static final int typeIndexID = Pronoun.typeIndexID;
  /**
   * @generated
   * @modifiable
   */
  public static final boolean featOkTst =
      JCasRegistry.getFeatOkTst("org.u_compare.shared.label.penn.pos.general.Pronoun");

  /**
   * initialize variables to correspond with Cas Type and Features
   *
   * @generated
   */
  public Pronoun_Type(JCas jcas, Type casType) {
    super(jcas, casType);
    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
  }
}
Esempio n. 10
0
/**
 * Cardinal number Updated by JCasGen Mon May 02 14:13:32 CEST 2011
 *
 * @generated
 */
public class CARD_Type extends POS_Type {
  /** @generated */
  protected FSGenerator getFSGenerator() {
    return fsGenerator;
  }
  /** @generated */
  private final FSGenerator fsGenerator =
      new FSGenerator() {
        public FeatureStructure createFS(int addr, CASImpl cas) {
          if (CARD_Type.this.useExistingInstance) {
            // Return eq fs instance if already created
            FeatureStructure fs = CARD_Type.this.jcas.getJfsFromCaddr(addr);
            if (null == fs) {
              fs = new CARD(addr, CARD_Type.this);
              CARD_Type.this.jcas.putJfsFromCaddr(addr, fs);
              return fs;
            }
            return fs;
          } else return new CARD(addr, CARD_Type.this);
        }
      };
  /** @generated */
  public static final int typeIndexID = CARD.typeIndexID;
  /**
   * @generated
   * @modifiable
   */
  public static final boolean featOkTst =
      JCasRegistry.getFeatOkTst("de.tudarmstadt.ukp.dkpro.core.type.pos.CARD");

  /**
   * initialize variables to correspond with Cas Type and Features
   *
   * @generated
   */
  public CARD_Type(JCas jcas, Type casType) {
    super(jcas, casType);
    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
  }
}
Esempio n. 11
0
/**
 * Updated by JCasGen Thu Nov 15 12:17:28 CST 2012
 *
 * @generated
 */
public class Duration_Type extends Annotation_Type {
  /** @generated */
  protected FSGenerator getFSGenerator() {
    return fsGenerator;
  }
  /** @generated */
  private final FSGenerator fsGenerator =
      new FSGenerator() {
        public FeatureStructure createFS(int addr, CASImpl cas) {
          if (Duration_Type.this.useExistingInstance) {
            // Return eq fs instance if already created
            FeatureStructure fs = Duration_Type.this.jcas.getJfsFromCaddr(addr);
            if (null == fs) {
              fs = new Duration(addr, Duration_Type.this);
              Duration_Type.this.jcas.putJfsFromCaddr(addr, fs);
              return fs;
            }
            return fs;
          } else return new Duration(addr, Duration_Type.this);
        }
      };
  /** @generated */
  public static final int typeIndexID = Duration.typeIndexID;
  /**
   * @generated
   * @modifiable
   */
  public static final boolean featOkTst =
      JCasRegistry.getFeatOkTst("org.apache.UIMA.medex.Duration");

  /** @generated */
  final Feature casFeat_semantic_type;
  /** @generated */
  final int casFeatCode_semantic_type;
  /** @generated */
  public String getSemantic_type(int addr) {
    if (featOkTst && casFeat_semantic_type == null)
      jcas.throwFeatMissing("semantic_type", "org.apache.UIMA.medex.Duration");
    return ll_cas.ll_getStringValue(addr, casFeatCode_semantic_type);
  }
  /** @generated */
  public void setSemantic_type(int addr, String v) {
    if (featOkTst && casFeat_semantic_type == null)
      jcas.throwFeatMissing("semantic_type", "org.apache.UIMA.medex.Duration");
    ll_cas.ll_setStringValue(addr, casFeatCode_semantic_type, v);
  }

  /**
   * initialize variables to correspond with Cas Type and Features
   *
   * @generated
   */
  public Duration_Type(JCas jcas, Type casType) {
    super(jcas, casType);
    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());

    casFeat_semantic_type =
        jcas.getRequiredFeatureDE(casType, "semantic_type", "uima.cas.String", featOkTst);
    casFeatCode_semantic_type =
        (null == casFeat_semantic_type)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_semantic_type).getCode();
  }
}
Esempio n. 12
0
/**
 * Updated by JCasGen Mon Sep 21 23:07:45 EDT 2015
 *
 * @generated
 */
public class Param_Type extends ComponentAnnotation_Type {
  /**
   * @generated
   * @return the generator for this type
   */
  @Override
  protected FSGenerator getFSGenerator() {
    return fsGenerator;
  }
  /** @generated */
  private final FSGenerator fsGenerator =
      new FSGenerator() {
        public FeatureStructure createFS(int addr, CASImpl cas) {
          if (Param_Type.this.useExistingInstance) {
            // Return eq fs instance if already created
            FeatureStructure fs = Param_Type.this.jcas.getJfsFromCaddr(addr);
            if (null == fs) {
              fs = new Param(addr, Param_Type.this);
              Param_Type.this.jcas.putJfsFromCaddr(addr, fs);
              return fs;
            }
            return fs;
          } else return new Param(addr, Param_Type.this);
        }
      };
  /** @generated */
  @SuppressWarnings("hiding")
  public static final int typeIndexID = Param.typeIndexID;
  /**
   * @generated
   * @modifiable
   */
  @SuppressWarnings("hiding")
  public static final boolean featOkTst = JCasRegistry.getFeatOkTst("type.Param");

  /** @generated */
  final Feature casFeat_outputDir;
  /** @generated */
  final int casFeatCode_outputDir;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public String getOutputDir(int addr) {
    if (featOkTst && casFeat_outputDir == null) jcas.throwFeatMissing("outputDir", "type.Param");
    return ll_cas.ll_getStringValue(addr, casFeatCode_outputDir);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setOutputDir(int addr, String v) {
    if (featOkTst && casFeat_outputDir == null) jcas.throwFeatMissing("outputDir", "type.Param");
    ll_cas.ll_setStringValue(addr, casFeatCode_outputDir, v);
  }

  /** @generated */
  final Feature casFeat_n;
  /** @generated */
  final int casFeatCode_n;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public int getN(int addr) {
    if (featOkTst && casFeat_n == null) jcas.throwFeatMissing("n", "type.Param");
    return ll_cas.ll_getIntValue(addr, casFeatCode_n);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setN(int addr, int v) {
    if (featOkTst && casFeat_n == null) jcas.throwFeatMissing("n", "type.Param");
    ll_cas.ll_setIntValue(addr, casFeatCode_n, v);
  }

  /** @generated */
  final Feature casFeat_documentName;
  /** @generated */
  final int casFeatCode_documentName;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public String getDocumentName(int addr) {
    if (featOkTst && casFeat_documentName == null)
      jcas.throwFeatMissing("documentName", "type.Param");
    return ll_cas.ll_getStringValue(addr, casFeatCode_documentName);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setDocumentName(int addr, String v) {
    if (featOkTst && casFeat_documentName == null)
      jcas.throwFeatMissing("documentName", "type.Param");
    ll_cas.ll_setStringValue(addr, casFeatCode_documentName, v);
  }

  /**
   * initialize variables to correspond with Cas Type and Features
   *
   * @generated
   * @param jcas JCas
   * @param casType Type
   */
  public Param_Type(JCas jcas, Type casType) {
    super(jcas, casType);
    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());

    casFeat_outputDir =
        jcas.getRequiredFeatureDE(casType, "outputDir", "uima.cas.String", featOkTst);
    casFeatCode_outputDir =
        (null == casFeat_outputDir)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_outputDir).getCode();

    casFeat_n = jcas.getRequiredFeatureDE(casType, "n", "uima.cas.Integer", featOkTst);
    casFeatCode_n =
        (null == casFeat_n) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl) casFeat_n).getCode();

    casFeat_documentName =
        jcas.getRequiredFeatureDE(casType, "documentName", "uima.cas.String", featOkTst);
    casFeatCode_documentName =
        (null == casFeat_documentName)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_documentName).getCode();
  }
}
/**
 * Stores detailed information about the original source document from which the current CAS was
 * initialized. All information (like size) refers to the source document and not to the document in
 * the CAS which may be converted and filtered by a CAS Initializer. For example this information
 * will be written to the Semantic Search index so that the original document contents can be
 * retrieved by queries. Updated by JCasGen Sat Jun 20 14:34:58 EDT 2009
 *
 * @generated
 */
public class SourceDocInfo_Type extends DocumentAnnotation_Type {
  /** @generated */
  protected FSGenerator getFSGenerator() {
    return fsGenerator;
  }
  /** @generated */
  private final FSGenerator fsGenerator =
      new FSGenerator() {
        public FeatureStructure createFS(int addr, CASImpl cas) {
          if (SourceDocInfo_Type.this.useExistingInstance) {
            // Return eq fs instance if already created
            FeatureStructure fs = SourceDocInfo_Type.this.jcas.getJfsFromCaddr(addr);
            if (null == fs) {
              fs = new SourceDocInfo(addr, SourceDocInfo_Type.this);
              SourceDocInfo_Type.this.jcas.putJfsFromCaddr(addr, fs);
              return fs;
            }
            return fs;
          } else return new SourceDocInfo(addr, SourceDocInfo_Type.this);
        }
      };
  /** @generated */
  public static final int typeIndexID = SourceDocInfo.typeIndexID;
  /**
   * @generated
   * @modifiable
   */
  public static final boolean featOkTst =
      JCasRegistry.getFeatOkTst("com.dp.edgar.uima.type.SourceDocInfo");

  /** @generated */
  final Feature casFeat_uri;
  /** @generated */
  final int casFeatCode_uri;
  /** @generated */
  public String getUri(int addr) {
    if (featOkTst && casFeat_uri == null)
      jcas.throwFeatMissing("uri", "com.dp.edgar.uima.type.SourceDocInfo");
    return ll_cas.ll_getStringValue(addr, casFeatCode_uri);
  }
  /** @generated */
  public void setUri(int addr, String v) {
    if (featOkTst && casFeat_uri == null)
      jcas.throwFeatMissing("uri", "com.dp.edgar.uima.type.SourceDocInfo");
    ll_cas.ll_setStringValue(addr, casFeatCode_uri, v);
  }

  /** @generated */
  final Feature casFeat_offsetInSource;
  /** @generated */
  final int casFeatCode_offsetInSource;
  /** @generated */
  public int getOffsetInSource(int addr) {
    if (featOkTst && casFeat_offsetInSource == null)
      jcas.throwFeatMissing("offsetInSource", "com.dp.edgar.uima.type.SourceDocInfo");
    return ll_cas.ll_getIntValue(addr, casFeatCode_offsetInSource);
  }
  /** @generated */
  public void setOffsetInSource(int addr, int v) {
    if (featOkTst && casFeat_offsetInSource == null)
      jcas.throwFeatMissing("offsetInSource", "com.dp.edgar.uima.type.SourceDocInfo");
    ll_cas.ll_setIntValue(addr, casFeatCode_offsetInSource, v);
  }

  /** @generated */
  final Feature casFeat_documentSize;
  /** @generated */
  final int casFeatCode_documentSize;
  /** @generated */
  public int getDocumentSize(int addr) {
    if (featOkTst && casFeat_documentSize == null)
      jcas.throwFeatMissing("documentSize", "com.dp.edgar.uima.type.SourceDocInfo");
    return ll_cas.ll_getIntValue(addr, casFeatCode_documentSize);
  }
  /** @generated */
  public void setDocumentSize(int addr, int v) {
    if (featOkTst && casFeat_documentSize == null)
      jcas.throwFeatMissing("documentSize", "com.dp.edgar.uima.type.SourceDocInfo");
    ll_cas.ll_setIntValue(addr, casFeatCode_documentSize, v);
  }

  /** @generated */
  final Feature casFeat_filingType;
  /** @generated */
  final int casFeatCode_filingType;
  /** @generated */
  public int getFilingType(int addr) {
    if (featOkTst && casFeat_filingType == null)
      jcas.throwFeatMissing("filingType", "com.dp.edgar.uima.type.SourceDocInfo");
    return ll_cas.ll_getIntValue(addr, casFeatCode_filingType);
  }
  /** @generated */
  public void setFilingType(int addr, int v) {
    if (featOkTst && casFeat_filingType == null)
      jcas.throwFeatMissing("filingType", "com.dp.edgar.uima.type.SourceDocInfo");
    ll_cas.ll_setIntValue(addr, casFeatCode_filingType, v);
  }

  /** @generated */
  final Feature casFeat_documentType;
  /** @generated */
  final int casFeatCode_documentType;
  /** @generated */
  public int getDocumentType(int addr) {
    if (featOkTst && casFeat_documentType == null)
      jcas.throwFeatMissing("documentType", "com.dp.edgar.uima.type.SourceDocInfo");
    return ll_cas.ll_getIntValue(addr, casFeatCode_documentType);
  }
  /** @generated */
  public void setDocumentType(int addr, int v) {
    if (featOkTst && casFeat_documentType == null)
      jcas.throwFeatMissing("documentType", "com.dp.edgar.uima.type.SourceDocInfo");
    ll_cas.ll_setIntValue(addr, casFeatCode_documentType, v);
  }

  /** @generated */
  final Feature casFeat_timeStamp;
  /** @generated */
  final int casFeatCode_timeStamp;
  /** @generated */
  public String getTimeStamp(int addr) {
    if (featOkTst && casFeat_timeStamp == null)
      jcas.throwFeatMissing("timeStamp", "com.dp.edgar.uima.type.SourceDocInfo");
    return ll_cas.ll_getStringValue(addr, casFeatCode_timeStamp);
  }
  /** @generated */
  public void setTimeStamp(int addr, String v) {
    if (featOkTst && casFeat_timeStamp == null)
      jcas.throwFeatMissing("timeStamp", "com.dp.edgar.uima.type.SourceDocInfo");
    ll_cas.ll_setStringValue(addr, casFeatCode_timeStamp, v);
  }

  /** @generated */
  final Feature casFeat_fileName;
  /** @generated */
  final int casFeatCode_fileName;
  /** @generated */
  public String getFileName(int addr) {
    if (featOkTst && casFeat_fileName == null)
      jcas.throwFeatMissing("fileName", "com.dp.edgar.uima.type.SourceDocInfo");
    return ll_cas.ll_getStringValue(addr, casFeatCode_fileName);
  }
  /** @generated */
  public void setFileName(int addr, String v) {
    if (featOkTst && casFeat_fileName == null)
      jcas.throwFeatMissing("fileName", "com.dp.edgar.uima.type.SourceDocInfo");
    ll_cas.ll_setStringValue(addr, casFeatCode_fileName, v);
  }

  /** @generated */
  final Feature casFeat_sentenceCount;
  /** @generated */
  final int casFeatCode_sentenceCount;
  /** @generated */
  public int getSentenceCount(int addr) {
    if (featOkTst && casFeat_sentenceCount == null)
      jcas.throwFeatMissing("sentenceCount", "com.dp.edgar.uima.type.SourceDocInfo");
    return ll_cas.ll_getIntValue(addr, casFeatCode_sentenceCount);
  }
  /** @generated */
  public void setSentenceCount(int addr, int v) {
    if (featOkTst && casFeat_sentenceCount == null)
      jcas.throwFeatMissing("sentenceCount", "com.dp.edgar.uima.type.SourceDocInfo");
    ll_cas.ll_setIntValue(addr, casFeatCode_sentenceCount, v);
  }

  /** @generated */
  final Feature casFeat_tokenCount;
  /** @generated */
  final int casFeatCode_tokenCount;
  /** @generated */
  public int getTokenCount(int addr) {
    if (featOkTst && casFeat_tokenCount == null)
      jcas.throwFeatMissing("tokenCount", "com.dp.edgar.uima.type.SourceDocInfo");
    return ll_cas.ll_getIntValue(addr, casFeatCode_tokenCount);
  }
  /** @generated */
  public void setTokenCount(int addr, int v) {
    if (featOkTst && casFeat_tokenCount == null)
      jcas.throwFeatMissing("tokenCount", "com.dp.edgar.uima.type.SourceDocInfo");
    ll_cas.ll_setIntValue(addr, casFeatCode_tokenCount, v);
  }

  /**
   * initialize variables to correspond with Cas Type and Features
   *
   * @generated
   */
  public SourceDocInfo_Type(JCas jcas, Type casType) {
    super(jcas, casType);
    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());

    casFeat_uri = jcas.getRequiredFeatureDE(casType, "uri", "uima.cas.String", featOkTst);
    casFeatCode_uri =
        (null == casFeat_uri) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl) casFeat_uri).getCode();

    casFeat_offsetInSource =
        jcas.getRequiredFeatureDE(casType, "offsetInSource", "uima.cas.Integer", featOkTst);
    casFeatCode_offsetInSource =
        (null == casFeat_offsetInSource)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_offsetInSource).getCode();

    casFeat_documentSize =
        jcas.getRequiredFeatureDE(casType, "documentSize", "uima.cas.Integer", featOkTst);
    casFeatCode_documentSize =
        (null == casFeat_documentSize)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_documentSize).getCode();

    casFeat_filingType =
        jcas.getRequiredFeatureDE(casType, "filingType", "uima.cas.Integer", featOkTst);
    casFeatCode_filingType =
        (null == casFeat_filingType)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_filingType).getCode();

    casFeat_documentType =
        jcas.getRequiredFeatureDE(casType, "documentType", "uima.cas.Integer", featOkTst);
    casFeatCode_documentType =
        (null == casFeat_documentType)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_documentType).getCode();

    casFeat_timeStamp =
        jcas.getRequiredFeatureDE(casType, "timeStamp", "uima.cas.String", featOkTst);
    casFeatCode_timeStamp =
        (null == casFeat_timeStamp)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_timeStamp).getCode();

    casFeat_fileName = jcas.getRequiredFeatureDE(casType, "fileName", "uima.cas.String", featOkTst);
    casFeatCode_fileName =
        (null == casFeat_fileName)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_fileName).getCode();

    casFeat_sentenceCount =
        jcas.getRequiredFeatureDE(casType, "sentenceCount", "uima.cas.Integer", featOkTst);
    casFeatCode_sentenceCount =
        (null == casFeat_sentenceCount)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_sentenceCount).getCode();

    casFeat_tokenCount =
        jcas.getRequiredFeatureDE(casType, "tokenCount", "uima.cas.Integer", featOkTst);
    casFeatCode_tokenCount =
        (null == casFeat_tokenCount)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_tokenCount).getCode();
  }
}
Esempio n. 14
0
/**
 * * This class belongs to the package annotator.element and annotates 1,2,3 Grams and extends
 * {@link TestElement}. It includes the {@link contains} feature which gives the the constituent
 * tokens in this Ngram.
 *
 * <p>
 *
 * @author Parag Agrawal
 * @version %I%, %G% Updated by JCasGen Wed Sep 11 09:29:05 EDT 2013
 * @generated
 */
public class NGram_Type extends TestElement_Type {
  /** @generated */
  @Override
  protected FSGenerator getFSGenerator() {
    return fsGenerator;
  }
  /** @generated */
  private final FSGenerator fsGenerator =
      new FSGenerator() {
        public FeatureStructure createFS(int addr, CASImpl cas) {
          if (NGram_Type.this.useExistingInstance) {
            // Return eq fs instance if already created
            FeatureStructure fs = NGram_Type.this.jcas.getJfsFromCaddr(addr);
            if (null == fs) {
              fs = new NGram(addr, NGram_Type.this);
              NGram_Type.this.jcas.putJfsFromCaddr(addr, fs);
              return fs;
            }
            return fs;
          } else return new NGram(addr, NGram_Type.this);
        }
      };
  /** @generated */
  @SuppressWarnings("hiding")
  public static final int typeIndexID = NGram.typeIndexID;
  /**
   * @generated
   * @modifiable
   */
  @SuppressWarnings("hiding")
  public static final boolean featOkTst = JCasRegistry.getFeatOkTst("annotator.element.NGram");

  /** @generated */
  final Feature casFeat_contains;
  /** @generated */
  final int casFeatCode_contains;
  /** @generated */
  public int getContains(int addr) {
    if (featOkTst && casFeat_contains == null)
      jcas.throwFeatMissing("contains", "annotator.element.NGram");
    return ll_cas.ll_getRefValue(addr, casFeatCode_contains);
  }
  /** @generated */
  public void setContains(int addr, int v) {
    if (featOkTst && casFeat_contains == null)
      jcas.throwFeatMissing("contains", "annotator.element.NGram");
    ll_cas.ll_setRefValue(addr, casFeatCode_contains, v);
  }

  /** @generated */
  public int getContains(int addr, int i) {
    if (featOkTst && casFeat_contains == null)
      jcas.throwFeatMissing("contains", "annotator.element.NGram");
    if (lowLevelTypeChecks)
      return ll_cas.ll_getRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_contains), i, true);
    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_contains), i);
    return ll_cas.ll_getRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_contains), i);
  }

  /** @generated */
  public void setContains(int addr, int i, int v) {
    if (featOkTst && casFeat_contains == null)
      jcas.throwFeatMissing("contains", "annotator.element.NGram");
    if (lowLevelTypeChecks)
      ll_cas.ll_setRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_contains), i, v, true);
    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_contains), i);
    ll_cas.ll_setRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_contains), i, v);
  }

  /**
   * initialize variables to correspond with Cas Type and Features
   *
   * @generated
   */
  public NGram_Type(JCas jcas, Type casType) {
    super(jcas, casType);
    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());

    casFeat_contains =
        jcas.getRequiredFeatureDE(casType, "contains", "uima.cas.FSArray", featOkTst);
    casFeatCode_contains =
        (null == casFeat_contains)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_contains).getCode();
  }
}
Esempio n. 15
0
/**
 * Stores the information about a question. Updated by JCasGen Mon Sep 28 17:16:05 EDT 2015
 *
 * @generated
 */
public class Question_Type extends ComponentAnnotation_Type {
  /**
   * @generated
   * @return the generator for this type
   */
  @Override
  protected FSGenerator getFSGenerator() {
    return fsGenerator;
  }
  /** @generated */
  private final FSGenerator fsGenerator =
      new FSGenerator() {
        public FeatureStructure createFS(int addr, CASImpl cas) {
          if (Question_Type.this.useExistingInstance) {
            // Return eq fs instance if already created
            FeatureStructure fs = Question_Type.this.jcas.getJfsFromCaddr(addr);
            if (null == fs) {
              fs = new Question(addr, Question_Type.this);
              Question_Type.this.jcas.putJfsFromCaddr(addr, fs);
              return fs;
            }
            return fs;
          } else return new Question(addr, Question_Type.this);
        }
      };
  /** @generated */
  @SuppressWarnings("hiding")
  public static final int typeIndexID = Question.typeIndexID;
  /**
   * @generated
   * @modifiable
   */
  @SuppressWarnings("hiding")
  public static final boolean featOkTst = JCasRegistry.getFeatOkTst("type.Question");

  /** @generated */
  final Feature casFeat_id;
  /** @generated */
  final int casFeatCode_id;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public String getId(int addr) {
    if (featOkTst && casFeat_id == null) jcas.throwFeatMissing("id", "type.Question");
    return ll_cas.ll_getStringValue(addr, casFeatCode_id);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setId(int addr, String v) {
    if (featOkTst && casFeat_id == null) jcas.throwFeatMissing("id", "type.Question");
    ll_cas.ll_setStringValue(addr, casFeatCode_id, v);
  }

  /** @generated */
  final Feature casFeat_sentence;
  /** @generated */
  final int casFeatCode_sentence;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public String getSentence(int addr) {
    if (featOkTst && casFeat_sentence == null) jcas.throwFeatMissing("sentence", "type.Question");
    return ll_cas.ll_getStringValue(addr, casFeatCode_sentence);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setSentence(int addr, String v) {
    if (featOkTst && casFeat_sentence == null) jcas.throwFeatMissing("sentence", "type.Question");
    ll_cas.ll_setStringValue(addr, casFeatCode_sentence, v);
  }

  /** @generated */
  final Feature casFeat_passages;
  /** @generated */
  final int casFeatCode_passages;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public int getPassages(int addr) {
    if (featOkTst && casFeat_passages == null) jcas.throwFeatMissing("passages", "type.Question");
    return ll_cas.ll_getRefValue(addr, casFeatCode_passages);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setPassages(int addr, int v) {
    if (featOkTst && casFeat_passages == null) jcas.throwFeatMissing("passages", "type.Question");
    ll_cas.ll_setRefValue(addr, casFeatCode_passages, v);
  }

  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param i index of item in the array
   * @return value at index i in the array
   */
  public int getPassages(int addr, int i) {
    if (featOkTst && casFeat_passages == null) jcas.throwFeatMissing("passages", "type.Question");
    if (lowLevelTypeChecks)
      return ll_cas.ll_getRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_passages), i, true);
    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_passages), i);
    return ll_cas.ll_getRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_passages), i);
  }

  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param i index of item in the array
   * @param v value to set
   */
  public void setPassages(int addr, int i, int v) {
    if (featOkTst && casFeat_passages == null) jcas.throwFeatMissing("passages", "type.Question");
    if (lowLevelTypeChecks)
      ll_cas.ll_setRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_passages), i, v, true);
    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_passages), i);
    ll_cas.ll_setRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_passages), i, v);
  }

  /**
   * initialize variables to correspond with Cas Type and Features
   *
   * @generated
   * @param jcas JCas
   * @param casType Type
   */
  public Question_Type(JCas jcas, Type casType) {
    super(jcas, casType);
    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());

    casFeat_id = jcas.getRequiredFeatureDE(casType, "id", "uima.cas.String", featOkTst);
    casFeatCode_id =
        (null == casFeat_id) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl) casFeat_id).getCode();

    casFeat_sentence = jcas.getRequiredFeatureDE(casType, "sentence", "uima.cas.String", featOkTst);
    casFeatCode_sentence =
        (null == casFeat_sentence)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_sentence).getCode();

    casFeat_passages =
        jcas.getRequiredFeatureDE(casType, "passages", "uima.cas.FSArray", featOkTst);
    casFeatCode_passages =
        (null == casFeat_passages)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_passages).getCode();
  }
}
Esempio n. 16
0
/**
 * Updated by JCasGen Mon May 13 14:41:33 EDT 2013
 *
 * @generated
 */
public class Answer_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 (Answer_Type.this.useExistingInstance) {
            // Return eq fs instance if already created
            FeatureStructure fs = Answer_Type.this.jcas.getJfsFromCaddr(addr);
            if (null == fs) {
              fs = new Answer(addr, Answer_Type.this);
              Answer_Type.this.jcas.putJfsFromCaddr(addr, fs);
              return fs;
            }
            return fs;
          } else return new Answer(addr, Answer_Type.this);
        }
      };
  /** @generated */
  @SuppressWarnings("hiding")
  public static final int typeIndexID = Answer.typeIndexID;
  /**
   * @generated
   * @modifiable
   */
  @SuppressWarnings("hiding")
  public static final boolean featOkTst =
      JCasRegistry.getFeatOkTst("edu.cmu.lti.qalab.types.Answer");

  /** @generated */
  final Feature casFeat_text;
  /** @generated */
  final int casFeatCode_text;
  /** @generated */
  public String getText(int addr) {
    if (featOkTst && casFeat_text == null)
      jcas.throwFeatMissing("text", "edu.cmu.lti.qalab.types.Answer");
    return ll_cas.ll_getStringValue(addr, casFeatCode_text);
  }
  /** @generated */
  public void setText(int addr, String v) {
    if (featOkTst && casFeat_text == null)
      jcas.throwFeatMissing("text", "edu.cmu.lti.qalab.types.Answer");
    ll_cas.ll_setStringValue(addr, casFeatCode_text, v);
  }

  /** @generated */
  final Feature casFeat_id;
  /** @generated */
  final int casFeatCode_id;
  /** @generated */
  public String getId(int addr) {
    if (featOkTst && casFeat_id == null)
      jcas.throwFeatMissing("id", "edu.cmu.lti.qalab.types.Answer");
    return ll_cas.ll_getStringValue(addr, casFeatCode_id);
  }
  /** @generated */
  public void setId(int addr, String v) {
    if (featOkTst && casFeat_id == null)
      jcas.throwFeatMissing("id", "edu.cmu.lti.qalab.types.Answer");
    ll_cas.ll_setStringValue(addr, casFeatCode_id, v);
  }

  /** @generated */
  final Feature casFeat_questionId;
  /** @generated */
  final int casFeatCode_questionId;
  /** @generated */
  public String getQuestionId(int addr) {
    if (featOkTst && casFeat_questionId == null)
      jcas.throwFeatMissing("questionId", "edu.cmu.lti.qalab.types.Answer");
    return ll_cas.ll_getStringValue(addr, casFeatCode_questionId);
  }
  /** @generated */
  public void setQuestionId(int addr, String v) {
    if (featOkTst && casFeat_questionId == null)
      jcas.throwFeatMissing("questionId", "edu.cmu.lti.qalab.types.Answer");
    ll_cas.ll_setStringValue(addr, casFeatCode_questionId, v);
  }

  /** @generated */
  final Feature casFeat_docId;
  /** @generated */
  final int casFeatCode_docId;
  /** @generated */
  public String getDocId(int addr) {
    if (featOkTst && casFeat_docId == null)
      jcas.throwFeatMissing("docId", "edu.cmu.lti.qalab.types.Answer");
    return ll_cas.ll_getStringValue(addr, casFeatCode_docId);
  }
  /** @generated */
  public void setDocId(int addr, String v) {
    if (featOkTst && casFeat_docId == null)
      jcas.throwFeatMissing("docId", "edu.cmu.lti.qalab.types.Answer");
    ll_cas.ll_setStringValue(addr, casFeatCode_docId, v);
  }

  /** @generated */
  final Feature casFeat_synonyms;
  /** @generated */
  final int casFeatCode_synonyms;
  /** @generated */
  public int getSynonyms(int addr) {
    if (featOkTst && casFeat_synonyms == null)
      jcas.throwFeatMissing("synonyms", "edu.cmu.lti.qalab.types.Answer");
    return ll_cas.ll_getRefValue(addr, casFeatCode_synonyms);
  }
  /** @generated */
  public void setSynonyms(int addr, int v) {
    if (featOkTst && casFeat_synonyms == null)
      jcas.throwFeatMissing("synonyms", "edu.cmu.lti.qalab.types.Answer");
    ll_cas.ll_setRefValue(addr, casFeatCode_synonyms, v);
  }

  /** @generated */
  final Feature casFeat_isCorrect;
  /** @generated */
  final int casFeatCode_isCorrect;
  /** @generated */
  public boolean getIsCorrect(int addr) {
    if (featOkTst && casFeat_isCorrect == null)
      jcas.throwFeatMissing("isCorrect", "edu.cmu.lti.qalab.types.Answer");
    return ll_cas.ll_getBooleanValue(addr, casFeatCode_isCorrect);
  }
  /** @generated */
  public void setIsCorrect(int addr, boolean v) {
    if (featOkTst && casFeat_isCorrect == null)
      jcas.throwFeatMissing("isCorrect", "edu.cmu.lti.qalab.types.Answer");
    ll_cas.ll_setBooleanValue(addr, casFeatCode_isCorrect, v);
  }

  /** @generated */
  final Feature casFeat_isSelected;
  /** @generated */
  final int casFeatCode_isSelected;
  /** @generated */
  public boolean getIsSelected(int addr) {
    if (featOkTst && casFeat_isSelected == null)
      jcas.throwFeatMissing("isSelected", "edu.cmu.lti.qalab.types.Answer");
    return ll_cas.ll_getBooleanValue(addr, casFeatCode_isSelected);
  }
  /** @generated */
  public void setIsSelected(int addr, boolean v) {
    if (featOkTst && casFeat_isSelected == null)
      jcas.throwFeatMissing("isSelected", "edu.cmu.lti.qalab.types.Answer");
    ll_cas.ll_setBooleanValue(addr, casFeatCode_isSelected, v);
  }

  /** @generated */
  final Feature casFeat_nounPhraseList;
  /** @generated */
  final int casFeatCode_nounPhraseList;
  /** @generated */
  public int getNounPhraseList(int addr) {
    if (featOkTst && casFeat_nounPhraseList == null)
      jcas.throwFeatMissing("nounPhraseList", "edu.cmu.lti.qalab.types.Answer");
    return ll_cas.ll_getRefValue(addr, casFeatCode_nounPhraseList);
  }
  /** @generated */
  public void setNounPhraseList(int addr, int v) {
    if (featOkTst && casFeat_nounPhraseList == null)
      jcas.throwFeatMissing("nounPhraseList", "edu.cmu.lti.qalab.types.Answer");
    ll_cas.ll_setRefValue(addr, casFeatCode_nounPhraseList, v);
  }

  /** @generated */
  final Feature casFeat_nerList;
  /** @generated */
  final int casFeatCode_nerList;
  /** @generated */
  public int getNerList(int addr) {
    if (featOkTst && casFeat_nerList == null)
      jcas.throwFeatMissing("nerList", "edu.cmu.lti.qalab.types.Answer");
    return ll_cas.ll_getRefValue(addr, casFeatCode_nerList);
  }
  /** @generated */
  public void setNerList(int addr, int v) {
    if (featOkTst && casFeat_nerList == null)
      jcas.throwFeatMissing("nerList", "edu.cmu.lti.qalab.types.Answer");
    ll_cas.ll_setRefValue(addr, casFeatCode_nerList, v);
  }

  /** @generated */
  final Feature casFeat_tokenList;
  /** @generated */
  final int casFeatCode_tokenList;
  /** @generated */
  public int getTokenList(int addr) {
    if (featOkTst && casFeat_tokenList == null)
      jcas.throwFeatMissing("tokenList", "edu.cmu.lti.qalab.types.Answer");
    return ll_cas.ll_getRefValue(addr, casFeatCode_tokenList);
  }
  /** @generated */
  public void setTokenList(int addr, int v) {
    if (featOkTst && casFeat_tokenList == null)
      jcas.throwFeatMissing("tokenList", "edu.cmu.lti.qalab.types.Answer");
    ll_cas.ll_setRefValue(addr, casFeatCode_tokenList, v);
  }

  /** @generated */
  final Feature casFeat_dependencies;
  /** @generated */
  final int casFeatCode_dependencies;
  /** @generated */
  public int getDependencies(int addr) {
    if (featOkTst && casFeat_dependencies == null)
      jcas.throwFeatMissing("dependencies", "edu.cmu.lti.qalab.types.Answer");
    return ll_cas.ll_getRefValue(addr, casFeatCode_dependencies);
  }
  /** @generated */
  public void setDependencies(int addr, int v) {
    if (featOkTst && casFeat_dependencies == null)
      jcas.throwFeatMissing("dependencies", "edu.cmu.lti.qalab.types.Answer");
    ll_cas.ll_setRefValue(addr, casFeatCode_dependencies, v);
  }

  /**
   * initialize variables to correspond with Cas Type and Features
   *
   * @generated
   */
  public Answer_Type(JCas jcas, Type casType) {
    super(jcas, casType);
    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());

    casFeat_text = jcas.getRequiredFeatureDE(casType, "text", "uima.cas.String", featOkTst);
    casFeatCode_text =
        (null == casFeat_text) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl) casFeat_text).getCode();

    casFeat_id = jcas.getRequiredFeatureDE(casType, "id", "uima.cas.String", featOkTst);
    casFeatCode_id =
        (null == casFeat_id) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl) casFeat_id).getCode();

    casFeat_questionId =
        jcas.getRequiredFeatureDE(casType, "questionId", "uima.cas.String", featOkTst);
    casFeatCode_questionId =
        (null == casFeat_questionId)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_questionId).getCode();

    casFeat_docId = jcas.getRequiredFeatureDE(casType, "docId", "uima.cas.String", featOkTst);
    casFeatCode_docId =
        (null == casFeat_docId)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_docId).getCode();

    casFeat_synonyms = jcas.getRequiredFeatureDE(casType, "synonyms", "uima.cas.FSList", featOkTst);
    casFeatCode_synonyms =
        (null == casFeat_synonyms)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_synonyms).getCode();

    casFeat_isCorrect =
        jcas.getRequiredFeatureDE(casType, "isCorrect", "uima.cas.Boolean", featOkTst);
    casFeatCode_isCorrect =
        (null == casFeat_isCorrect)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_isCorrect).getCode();

    casFeat_isSelected =
        jcas.getRequiredFeatureDE(casType, "isSelected", "uima.cas.Boolean", featOkTst);
    casFeatCode_isSelected =
        (null == casFeat_isSelected)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_isSelected).getCode();

    casFeat_nounPhraseList =
        jcas.getRequiredFeatureDE(casType, "nounPhraseList", "uima.cas.FSList", featOkTst);
    casFeatCode_nounPhraseList =
        (null == casFeat_nounPhraseList)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_nounPhraseList).getCode();

    casFeat_nerList = jcas.getRequiredFeatureDE(casType, "nerList", "uima.cas.FSList", featOkTst);
    casFeatCode_nerList =
        (null == casFeat_nerList)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_nerList).getCode();

    casFeat_tokenList =
        jcas.getRequiredFeatureDE(casType, "tokenList", "uima.cas.FSList", featOkTst);
    casFeatCode_tokenList =
        (null == casFeat_tokenList)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_tokenList).getCode();

    casFeat_dependencies =
        jcas.getRequiredFeatureDE(casType, "dependencies", "uima.cas.FSList", featOkTst);
    casFeatCode_dependencies =
        (null == casFeat_dependencies)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_dependencies).getCode();
  }
}
/**
 * Updated by JCasGen Wed May 27 22:41:00 CEST 2015
 *
 * @generated
 */
public class Coreference_Type extends Annotation_Type {
  /**
   * @generated
   * @return the generator for this type
   */
  @Override
  protected FSGenerator getFSGenerator() {
    return fsGenerator;
  }
  /** @generated */
  private final FSGenerator fsGenerator =
      new FSGenerator() {
        public FeatureStructure createFS(int addr, CASImpl cas) {
          if (Coreference_Type.this.useExistingInstance) {
            // Return eq fs instance if already created
            FeatureStructure fs = Coreference_Type.this.jcas.getJfsFromCaddr(addr);
            if (null == fs) {
              fs = new Coreference(addr, Coreference_Type.this);
              Coreference_Type.this.jcas.putJfsFromCaddr(addr, fs);
              return fs;
            }
            return fs;
          } else return new Coreference(addr, Coreference_Type.this);
        }
      };
  /** @generated */
  @SuppressWarnings("hiding")
  public static final int typeIndexID = Coreference.typeIndexID;
  /**
   * @generated
   * @modifiable
   */
  @SuppressWarnings("hiding")
  public static final boolean featOkTst =
      JCasRegistry.getFeatOkTst("common.types.coref.Coreference");

  /** @generated */
  final Feature casFeat_id;
  /** @generated */
  final int casFeatCode_id;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public String getId(int addr) {
    if (featOkTst && casFeat_id == null)
      jcas.throwFeatMissing("id", "common.types.coref.Coreference");
    return ll_cas.ll_getStringValue(addr, casFeatCode_id);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setId(int addr, String v) {
    if (featOkTst && casFeat_id == null)
      jcas.throwFeatMissing("id", "common.types.coref.Coreference");
    ll_cas.ll_setStringValue(addr, casFeatCode_id, v);
  }

  /** @generated */
  final Feature casFeat_corefType;
  /** @generated */
  final int casFeatCode_corefType;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public String getCorefType(int addr) {
    if (featOkTst && casFeat_corefType == null)
      jcas.throwFeatMissing("corefType", "common.types.coref.Coreference");
    return ll_cas.ll_getStringValue(addr, casFeatCode_corefType);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setCorefType(int addr, String v) {
    if (featOkTst && casFeat_corefType == null)
      jcas.throwFeatMissing("corefType", "common.types.coref.Coreference");
    ll_cas.ll_setStringValue(addr, casFeatCode_corefType, v);
  }

  /** @generated */
  final Feature casFeat_src;
  /** @generated */
  final int casFeatCode_src;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public String getSrc(int addr) {
    if (featOkTst && casFeat_src == null)
      jcas.throwFeatMissing("src", "common.types.coref.Coreference");
    return ll_cas.ll_getStringValue(addr, casFeatCode_src);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setSrc(int addr, String v) {
    if (featOkTst && casFeat_src == null)
      jcas.throwFeatMissing("src", "common.types.coref.Coreference");
    ll_cas.ll_setStringValue(addr, casFeatCode_src, v);
  }

  /** @generated */
  final Feature casFeat_ptr;
  /** @generated */
  final int casFeatCode_ptr;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public String getPtr(int addr) {
    if (featOkTst && casFeat_ptr == null)
      jcas.throwFeatMissing("ptr", "common.types.coref.Coreference");
    return ll_cas.ll_getStringValue(addr, casFeatCode_ptr);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setPtr(int addr, String v) {
    if (featOkTst && casFeat_ptr == null)
      jcas.throwFeatMissing("ptr", "common.types.coref.Coreference");
    ll_cas.ll_setStringValue(addr, casFeatCode_ptr, v);
  }

  /** @generated */
  final Feature casFeat_prev;
  /** @generated */
  final int casFeatCode_prev;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public String getPrev(int addr) {
    if (featOkTst && casFeat_prev == null)
      jcas.throwFeatMissing("prev", "common.types.coref.Coreference");
    return ll_cas.ll_getStringValue(addr, casFeatCode_prev);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setPrev(int addr, String v) {
    if (featOkTst && casFeat_prev == null)
      jcas.throwFeatMissing("prev", "common.types.coref.Coreference");
    ll_cas.ll_setStringValue(addr, casFeatCode_prev, v);
  }

  /** @generated */
  final Feature casFeat_next;
  /** @generated */
  final int casFeatCode_next;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public String getNext(int addr) {
    if (featOkTst && casFeat_next == null)
      jcas.throwFeatMissing("next", "common.types.coref.Coreference");
    return ll_cas.ll_getStringValue(addr, casFeatCode_next);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setNext(int addr, String v) {
    if (featOkTst && casFeat_next == null)
      jcas.throwFeatMissing("next", "common.types.coref.Coreference");
    ll_cas.ll_setStringValue(addr, casFeatCode_next, v);
  }

  /**
   * initialize variables to correspond with Cas Type and Features
   *
   * @generated
   * @param jcas JCas
   * @param casType Type
   */
  public Coreference_Type(JCas jcas, Type casType) {
    super(jcas, casType);
    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());

    casFeat_id = jcas.getRequiredFeatureDE(casType, "id", "uima.cas.String", featOkTst);
    casFeatCode_id =
        (null == casFeat_id) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl) casFeat_id).getCode();

    casFeat_corefType =
        jcas.getRequiredFeatureDE(casType, "corefType", "uima.cas.String", featOkTst);
    casFeatCode_corefType =
        (null == casFeat_corefType)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_corefType).getCode();

    casFeat_src = jcas.getRequiredFeatureDE(casType, "src", "uima.cas.String", featOkTst);
    casFeatCode_src =
        (null == casFeat_src) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl) casFeat_src).getCode();

    casFeat_ptr = jcas.getRequiredFeatureDE(casType, "ptr", "uima.cas.String", featOkTst);
    casFeatCode_ptr =
        (null == casFeat_ptr) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl) casFeat_ptr).getCode();

    casFeat_prev = jcas.getRequiredFeatureDE(casType, "prev", "uima.cas.String", featOkTst);
    casFeatCode_prev =
        (null == casFeat_prev) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl) casFeat_prev).getCode();

    casFeat_next = jcas.getRequiredFeatureDE(casType, "next", "uima.cas.String", featOkTst);
    casFeatCode_next =
        (null == casFeat_next) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl) casFeat_next).getCode();
  }
}
Esempio n. 18
0
/**
 * Updated by JCasGen Thu Dec 24 00:46:12 CET 2015
 *
 * @generated
 */
public class Features_Type extends Annotation_Type {
  /**
   * @generated
   * @return the generator for this type
   */
  @Override
  protected FSGenerator getFSGenerator() {
    return fsGenerator;
  }
  /** @generated */
  private final FSGenerator fsGenerator =
      new FSGenerator() {
        public FeatureStructure createFS(int addr, CASImpl cas) {
          if (Features_Type.this.useExistingInstance) {
            // Return eq fs instance if already created
            FeatureStructure fs = Features_Type.this.jcas.getJfsFromCaddr(addr);
            if (null == fs) {
              fs = new Features(addr, Features_Type.this);
              Features_Type.this.jcas.putJfsFromCaddr(addr, fs);
              return fs;
            }
            return fs;
          } else return new Features(addr, Features_Type.this);
        }
      };
  /** @generated */
  @SuppressWarnings("hiding")
  public static final int typeIndexID = Features.typeIndexID;
  /**
   * @generated
   * @modifiable
   */
  @SuppressWarnings("hiding")
  public static final boolean featOkTst = JCasRegistry.getFeatOkTst("types.Features");

  /** @generated */
  final Feature casFeat_tf;
  /** @generated */
  final int casFeatCode_tf;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public int getTf(int addr) {
    if (featOkTst && casFeat_tf == null) jcas.throwFeatMissing("tf", "types.Features");
    return ll_cas.ll_getIntValue(addr, casFeatCode_tf);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setTf(int addr, int v) {
    if (featOkTst && casFeat_tf == null) jcas.throwFeatMissing("tf", "types.Features");
    ll_cas.ll_setIntValue(addr, casFeatCode_tf, v);
  }

  /** @generated */
  final Feature casFeat_df;
  /** @generated */
  final int casFeatCode_df;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public int getDf(int addr) {
    if (featOkTst && casFeat_df == null) jcas.throwFeatMissing("df", "types.Features");
    return ll_cas.ll_getIntValue(addr, casFeatCode_df);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setDf(int addr, int v) {
    if (featOkTst && casFeat_df == null) jcas.throwFeatMissing("df", "types.Features");
    ll_cas.ll_setIntValue(addr, casFeatCode_df, v);
  }

  /** @generated */
  final Feature casFeat_idf;
  /** @generated */
  final int casFeatCode_idf;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public double getIdf(int addr) {
    if (featOkTst && casFeat_idf == null) jcas.throwFeatMissing("idf", "types.Features");
    return ll_cas.ll_getDoubleValue(addr, casFeatCode_idf);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setIdf(int addr, double v) {
    if (featOkTst && casFeat_idf == null) jcas.throwFeatMissing("idf", "types.Features");
    ll_cas.ll_setDoubleValue(addr, casFeatCode_idf, v);
  }

  /** @generated */
  final Feature casFeat_tfidf;
  /** @generated */
  final int casFeatCode_tfidf;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public double getTfidf(int addr) {
    if (featOkTst && casFeat_tfidf == null) jcas.throwFeatMissing("tfidf", "types.Features");
    return ll_cas.ll_getDoubleValue(addr, casFeatCode_tfidf);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setTfidf(int addr, double v) {
    if (featOkTst && casFeat_tfidf == null) jcas.throwFeatMissing("tfidf", "types.Features");
    ll_cas.ll_setDoubleValue(addr, casFeatCode_tfidf, v);
  }

  /** @generated */
  final Feature casFeat_first_occurrence;
  /** @generated */
  final int casFeatCode_first_occurrence;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public int getFirst_occurrence(int addr) {
    if (featOkTst && casFeat_first_occurrence == null)
      jcas.throwFeatMissing("first_occurrence", "types.Features");
    return ll_cas.ll_getIntValue(addr, casFeatCode_first_occurrence);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setFirst_occurrence(int addr, int v) {
    if (featOkTst && casFeat_first_occurrence == null)
      jcas.throwFeatMissing("first_occurrence", "types.Features");
    ll_cas.ll_setIntValue(addr, casFeatCode_first_occurrence, v);
  }

  /** @generated */
  final Feature casFeat_last_occurrence;
  /** @generated */
  final int casFeatCode_last_occurrence;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public int getLast_occurrence(int addr) {
    if (featOkTst && casFeat_last_occurrence == null)
      jcas.throwFeatMissing("last_occurrence", "types.Features");
    return ll_cas.ll_getIntValue(addr, casFeatCode_last_occurrence);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setLast_occurrence(int addr, int v) {
    if (featOkTst && casFeat_last_occurrence == null)
      jcas.throwFeatMissing("last_occurrence", "types.Features");
    ll_cas.ll_setIntValue(addr, casFeatCode_last_occurrence, v);
  }

  /** @generated */
  final Feature casFeat_spread;
  /** @generated */
  final int casFeatCode_spread;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public int getSpread(int addr) {
    if (featOkTst && casFeat_spread == null) jcas.throwFeatMissing("spread", "types.Features");
    return ll_cas.ll_getIntValue(addr, casFeatCode_spread);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setSpread(int addr, int v) {
    if (featOkTst && casFeat_spread == null) jcas.throwFeatMissing("spread", "types.Features");
    ll_cas.ll_setIntValue(addr, casFeatCode_spread, v);
  }

  /** @generated */
  final Feature casFeat_class_;
  /** @generated */
  final int casFeatCode_class_;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public int getClass_(int addr) {
    if (featOkTst && casFeat_class_ == null) jcas.throwFeatMissing("class_", "types.Features");
    return ll_cas.ll_getIntValue(addr, casFeatCode_class_);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setClass_(int addr, int v) {
    if (featOkTst && casFeat_class_ == null) jcas.throwFeatMissing("class_", "types.Features");
    ll_cas.ll_setIntValue(addr, casFeatCode_class_, v);
  }

  /**
   * initialize variables to correspond with Cas Type and Features
   *
   * @generated
   * @param jcas JCas
   * @param casType Type
   */
  public Features_Type(JCas jcas, Type casType) {
    super(jcas, casType);
    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());

    casFeat_tf = jcas.getRequiredFeatureDE(casType, "tf", "uima.cas.Integer", featOkTst);
    casFeatCode_tf =
        (null == casFeat_tf) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl) casFeat_tf).getCode();

    casFeat_df = jcas.getRequiredFeatureDE(casType, "df", "uima.cas.Integer", featOkTst);
    casFeatCode_df =
        (null == casFeat_df) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl) casFeat_df).getCode();

    casFeat_idf = jcas.getRequiredFeatureDE(casType, "idf", "uima.cas.Double", featOkTst);
    casFeatCode_idf =
        (null == casFeat_idf) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl) casFeat_idf).getCode();

    casFeat_tfidf = jcas.getRequiredFeatureDE(casType, "tfidf", "uima.cas.Double", featOkTst);
    casFeatCode_tfidf =
        (null == casFeat_tfidf)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_tfidf).getCode();

    casFeat_first_occurrence =
        jcas.getRequiredFeatureDE(casType, "first_occurrence", "uima.cas.Integer", featOkTst);
    casFeatCode_first_occurrence =
        (null == casFeat_first_occurrence)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_first_occurrence).getCode();

    casFeat_last_occurrence =
        jcas.getRequiredFeatureDE(casType, "last_occurrence", "uima.cas.Integer", featOkTst);
    casFeatCode_last_occurrence =
        (null == casFeat_last_occurrence)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_last_occurrence).getCode();

    casFeat_spread = jcas.getRequiredFeatureDE(casType, "spread", "uima.cas.Integer", featOkTst);
    casFeatCode_spread =
        (null == casFeat_spread)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_spread).getCode();

    casFeat_class_ = jcas.getRequiredFeatureDE(casType, "class_", "uima.cas.Integer", featOkTst);
    casFeatCode_class_ =
        (null == casFeat_class_)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_class_).getCode();
  }
}
Esempio n. 19
0
/**
 * Updated by JCasGen Wed Nov 04 19:20:14 CET 2015
 *
 * @generated
 */
public class Location_Type extends Annotation_Type {
  /**
   * @generated
   * @return the generator for this type
   */
  @Override
  protected FSGenerator getFSGenerator() {
    return fsGenerator;
  }
  /** @generated */
  private final FSGenerator fsGenerator =
      new FSGenerator() {
        public FeatureStructure createFS(int addr, CASImpl cas) {
          if (Location_Type.this.useExistingInstance) {
            // Return eq fs instance if already created
            FeatureStructure fs = Location_Type.this.jcas.getJfsFromCaddr(addr);
            if (null == fs) {
              fs = new Location(addr, Location_Type.this);
              Location_Type.this.jcas.putJfsFromCaddr(addr, fs);
              return fs;
            }
            return fs;
          } else return new Location(addr, Location_Type.this);
        }
      };
  /** @generated */
  @SuppressWarnings("hiding")
  public static final int typeIndexID = Location.typeIndexID;
  /**
   * @generated
   * @modifiable
   */
  @SuppressWarnings("hiding")
  public static final boolean featOkTst =
      JCasRegistry.getFeatOkTst("de.tudarmstadt.ukp.tutorial.types.Location");

  /** @generated */
  final Feature casFeat_Country;
  /** @generated */
  final int casFeatCode_Country;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public String getCountry(int addr) {
    if (featOkTst && casFeat_Country == null)
      jcas.throwFeatMissing("Country", "de.tudarmstadt.ukp.tutorial.types.Location");
    return ll_cas.ll_getStringValue(addr, casFeatCode_Country);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setCountry(int addr, String v) {
    if (featOkTst && casFeat_Country == null)
      jcas.throwFeatMissing("Country", "de.tudarmstadt.ukp.tutorial.types.Location");
    ll_cas.ll_setStringValue(addr, casFeatCode_Country, v);
  }

  /**
   * initialize variables to correspond with Cas Type and Features
   *
   * @generated
   * @param jcas JCas
   * @param casType Type
   */
  public Location_Type(JCas jcas, Type casType) {
    super(jcas, casType);
    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());

    casFeat_Country = jcas.getRequiredFeatureDE(casType, "Country", "uima.cas.String", featOkTst);
    casFeatCode_Country =
        (null == casFeat_Country)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_Country).getCode();
  }
}
Esempio n. 20
0
/**
 * Specific vehicle or vessel Updated by JCasGen Tue Feb 03 15:26:49 GMT 2015
 *
 * @generated
 */
public class Vehicle_Type extends Entity_Type {
  /**
   * @generated
   * @return the generator for this type
   */
  @Override
  protected FSGenerator getFSGenerator() {
    return fsGenerator;
  }
  /** @generated */
  private final FSGenerator fsGenerator =
      new FSGenerator() {
        public FeatureStructure createFS(int addr, CASImpl cas) {
          if (Vehicle_Type.this.useExistingInstance) {
            // Return eq fs instance if already created
            FeatureStructure fs = Vehicle_Type.this.jcas.getJfsFromCaddr(addr);
            if (null == fs) {
              fs = new Vehicle(addr, Vehicle_Type.this);
              Vehicle_Type.this.jcas.putJfsFromCaddr(addr, fs);
              return fs;
            }
            return fs;
          } else return new Vehicle(addr, Vehicle_Type.this);
        }
      };
  /** @generated */
  @SuppressWarnings("hiding")
  public static final int typeIndexID = Vehicle.typeIndexID;
  /**
   * @generated
   * @modifiable
   */
  @SuppressWarnings("hiding")
  public static final boolean featOkTst =
      JCasRegistry.getFeatOkTst("uk.gov.dstl.baleen.types.common.Vehicle");

  /** @generated */
  final Feature casFeat_vehicleType;
  /** @generated */
  final int casFeatCode_vehicleType;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public String getVehicleType(int addr) {
    if (featOkTst && casFeat_vehicleType == null)
      jcas.throwFeatMissing("vehicleType", "uk.gov.dstl.baleen.types.common.Vehicle");
    return ll_cas.ll_getStringValue(addr, casFeatCode_vehicleType);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setVehicleType(int addr, String v) {
    if (featOkTst && casFeat_vehicleType == null)
      jcas.throwFeatMissing("vehicleType", "uk.gov.dstl.baleen.types.common.Vehicle");
    ll_cas.ll_setStringValue(addr, casFeatCode_vehicleType, v);
  }

  /** @generated */
  final Feature casFeat_vehicleIdentifier;
  /** @generated */
  final int casFeatCode_vehicleIdentifier;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public String getVehicleIdentifier(int addr) {
    if (featOkTst && casFeat_vehicleIdentifier == null)
      jcas.throwFeatMissing("vehicleIdentifier", "uk.gov.dstl.baleen.types.common.Vehicle");
    return ll_cas.ll_getStringValue(addr, casFeatCode_vehicleIdentifier);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setVehicleIdentifier(int addr, String v) {
    if (featOkTst && casFeat_vehicleIdentifier == null)
      jcas.throwFeatMissing("vehicleIdentifier", "uk.gov.dstl.baleen.types.common.Vehicle");
    ll_cas.ll_setStringValue(addr, casFeatCode_vehicleIdentifier, v);
  }

  /**
   * initialize variables to correspond with Cas Type and Features
   *
   * @generated
   * @param jcas JCas
   * @param casType Type
   */
  public Vehicle_Type(JCas jcas, Type casType) {
    super(jcas, casType);
    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());

    casFeat_vehicleType =
        jcas.getRequiredFeatureDE(casType, "vehicleType", "uima.cas.String", featOkTst);
    casFeatCode_vehicleType =
        (null == casFeat_vehicleType)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_vehicleType).getCode();

    casFeat_vehicleIdentifier =
        jcas.getRequiredFeatureDE(casType, "vehicleIdentifier", "uima.cas.String", featOkTst);
    casFeatCode_vehicleIdentifier =
        (null == casFeat_vehicleIdentifier)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_vehicleIdentifier).getCode();
  }
}
/**
 * Annotates a span of text identified as a candidate answer. Updated by JCasGen Thu Oct 11 12:39:21
 * EDT 2012
 *
 * @generated
 */
public class CandidateAnswerOccurrence_Type extends OAQAAnnotation_Type {
  /** @generated */
  @Override
  protected FSGenerator getFSGenerator() {
    return fsGenerator;
  }
  /** @generated */
  private final FSGenerator fsGenerator =
      new FSGenerator() {
        public FeatureStructure createFS(int addr, CASImpl cas) {
          if (CandidateAnswerOccurrence_Type.this.useExistingInstance) {
            // Return eq fs instance if already created
            FeatureStructure fs = CandidateAnswerOccurrence_Type.this.jcas.getJfsFromCaddr(addr);
            if (null == fs) {
              fs = new CandidateAnswerOccurrence(addr, CandidateAnswerOccurrence_Type.this);
              CandidateAnswerOccurrence_Type.this.jcas.putJfsFromCaddr(addr, fs);
              return fs;
            }
            return fs;
          } else return new CandidateAnswerOccurrence(addr, CandidateAnswerOccurrence_Type.this);
        }
      };
  /** @generated */
  @SuppressWarnings("hiding")
  public static final int typeIndexID = CandidateAnswerOccurrence.typeIndexID;
  /**
   * @generated
   * @modifiable
   */
  @SuppressWarnings("hiding")
  public static final boolean featOkTst =
      JCasRegistry.getFeatOkTst("org.oaqa.model.CandidateAnswerOccurrence");

  /** @generated */
  final Feature casFeat_text;
  /** @generated */
  final int casFeatCode_text;
  /** @generated */
  public String getText(int addr) {
    if (featOkTst && casFeat_text == null)
      jcas.throwFeatMissing("text", "org.oaqa.model.CandidateAnswerOccurrence");
    return ll_cas.ll_getStringValue(addr, casFeatCode_text);
  }
  /** @generated */
  public void setText(int addr, String v) {
    if (featOkTst && casFeat_text == null)
      jcas.throwFeatMissing("text", "org.oaqa.model.CandidateAnswerOccurrence");
    ll_cas.ll_setStringValue(addr, casFeatCode_text, v);
  }

  /** @generated */
  final Feature casFeat_mentionType;
  /** @generated */
  final int casFeatCode_mentionType;
  /** @generated */
  public String getMentionType(int addr) {
    if (featOkTst && casFeat_mentionType == null)
      jcas.throwFeatMissing("mentionType", "org.oaqa.model.CandidateAnswerOccurrence");
    return ll_cas.ll_getStringValue(addr, casFeatCode_mentionType);
  }
  /** @generated */
  public void setMentionType(int addr, String v) {
    if (featOkTst && casFeat_mentionType == null)
      jcas.throwFeatMissing("mentionType", "org.oaqa.model.CandidateAnswerOccurrence");
    ll_cas.ll_setStringValue(addr, casFeatCode_mentionType, v);
  }

  /** @generated */
  final Feature casFeat_source;
  /** @generated */
  final int casFeatCode_source;
  /** @generated */
  public int getSource(int addr) {
    if (featOkTst && casFeat_source == null)
      jcas.throwFeatMissing("source", "org.oaqa.model.CandidateAnswerOccurrence");
    return ll_cas.ll_getRefValue(addr, casFeatCode_source);
  }
  /** @generated */
  public void setSource(int addr, int v) {
    if (featOkTst && casFeat_source == null)
      jcas.throwFeatMissing("source", "org.oaqa.model.CandidateAnswerOccurrence");
    ll_cas.ll_setRefValue(addr, casFeatCode_source, v);
  }

  /** @generated */
  final Feature casFeat_sourceBegin;
  /** @generated */
  final int casFeatCode_sourceBegin;
  /** @generated */
  public int getSourceBegin(int addr) {
    if (featOkTst && casFeat_sourceBegin == null)
      jcas.throwFeatMissing("sourceBegin", "org.oaqa.model.CandidateAnswerOccurrence");
    return ll_cas.ll_getIntValue(addr, casFeatCode_sourceBegin);
  }
  /** @generated */
  public void setSourceBegin(int addr, int v) {
    if (featOkTst && casFeat_sourceBegin == null)
      jcas.throwFeatMissing("sourceBegin", "org.oaqa.model.CandidateAnswerOccurrence");
    ll_cas.ll_setIntValue(addr, casFeatCode_sourceBegin, v);
  }

  /** @generated */
  final Feature casFeat_sourceEnd;
  /** @generated */
  final int casFeatCode_sourceEnd;
  /** @generated */
  public int getSourceEnd(int addr) {
    if (featOkTst && casFeat_sourceEnd == null)
      jcas.throwFeatMissing("sourceEnd", "org.oaqa.model.CandidateAnswerOccurrence");
    return ll_cas.ll_getIntValue(addr, casFeatCode_sourceEnd);
  }
  /** @generated */
  public void setSourceEnd(int addr, int v) {
    if (featOkTst && casFeat_sourceEnd == null)
      jcas.throwFeatMissing("sourceEnd", "org.oaqa.model.CandidateAnswerOccurrence");
    ll_cas.ll_setIntValue(addr, casFeatCode_sourceEnd, v);
  }

  /**
   * initialize variables to correspond with Cas Type and Features
   *
   * @generated
   */
  public CandidateAnswerOccurrence_Type(JCas jcas, Type casType) {
    super(jcas, casType);
    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());

    casFeat_text = jcas.getRequiredFeatureDE(casType, "text", "uima.cas.String", featOkTst);
    casFeatCode_text =
        (null == casFeat_text) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl) casFeat_text).getCode();

    casFeat_mentionType =
        jcas.getRequiredFeatureDE(casType, "mentionType", "uima.cas.String", featOkTst);
    casFeatCode_mentionType =
        (null == casFeat_mentionType)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_mentionType).getCode();

    casFeat_source =
        jcas.getRequiredFeatureDE(casType, "source", "org.oaqa.model.SearchResult", featOkTst);
    casFeatCode_source =
        (null == casFeat_source)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_source).getCode();

    casFeat_sourceBegin =
        jcas.getRequiredFeatureDE(casType, "sourceBegin", "uima.cas.Integer", featOkTst);
    casFeatCode_sourceBegin =
        (null == casFeat_sourceBegin)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_sourceBegin).getCode();

    casFeat_sourceEnd =
        jcas.getRequiredFeatureDE(casType, "sourceEnd", "uima.cas.Integer", featOkTst);
    casFeatCode_sourceEnd =
        (null == casFeat_sourceEnd)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_sourceEnd).getCode();
  }
}
/**
 * Stores detailed information about the original source document from which the current CAS was
 * initialized. All information (like size) refers to the source document and not to the document in
 * the CAS which may be converted and filtered by a CAS Initializer. For example this information
 * will be written to the Semantic Search index so that the original document contents can be
 * retrieved by queries. Updated by JCasGen Wed Oct 02 22:07:21 EDT 2013
 *
 * @generated
 */
public class SourceDocumentInformation_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 (SourceDocumentInformation_Type.this.useExistingInstance) {
            // Return eq fs instance if already created
            FeatureStructure fs = SourceDocumentInformation_Type.this.jcas.getJfsFromCaddr(addr);
            if (null == fs) {
              fs = new SourceDocumentInformation(addr, SourceDocumentInformation_Type.this);
              SourceDocumentInformation_Type.this.jcas.putJfsFromCaddr(addr, fs);
              return fs;
            }
            return fs;
          } else return new SourceDocumentInformation(addr, SourceDocumentInformation_Type.this);
        }
      };
  /** @generated */
  @SuppressWarnings("hiding")
  public static final int typeIndexID = SourceDocumentInformation.typeIndexID;
  /**
   * @generated
   * @modifiable
   */
  @SuppressWarnings("hiding")
  public static final boolean featOkTst =
      JCasRegistry.getFeatOkTst("org.apache.uima.examples.SourceDocumentInformation");

  /** @generated */
  final Feature casFeat_uri;
  /** @generated */
  final int casFeatCode_uri;
  /** @generated */
  public String getUri(int addr) {
    if (featOkTst && casFeat_uri == null)
      jcas.throwFeatMissing("uri", "org.apache.uima.examples.SourceDocumentInformation");
    return ll_cas.ll_getStringValue(addr, casFeatCode_uri);
  }
  /** @generated */
  public void setUri(int addr, String v) {
    if (featOkTst && casFeat_uri == null)
      jcas.throwFeatMissing("uri", "org.apache.uima.examples.SourceDocumentInformation");
    ll_cas.ll_setStringValue(addr, casFeatCode_uri, v);
  }

  /** @generated */
  final Feature casFeat_offsetInSource;
  /** @generated */
  final int casFeatCode_offsetInSource;
  /** @generated */
  public int getOffsetInSource(int addr) {
    if (featOkTst && casFeat_offsetInSource == null)
      jcas.throwFeatMissing("offsetInSource", "org.apache.uima.examples.SourceDocumentInformation");
    return ll_cas.ll_getIntValue(addr, casFeatCode_offsetInSource);
  }
  /** @generated */
  public void setOffsetInSource(int addr, int v) {
    if (featOkTst && casFeat_offsetInSource == null)
      jcas.throwFeatMissing("offsetInSource", "org.apache.uima.examples.SourceDocumentInformation");
    ll_cas.ll_setIntValue(addr, casFeatCode_offsetInSource, v);
  }

  /** @generated */
  final Feature casFeat_documentSize;
  /** @generated */
  final int casFeatCode_documentSize;
  /** @generated */
  public int getDocumentSize(int addr) {
    if (featOkTst && casFeat_documentSize == null)
      jcas.throwFeatMissing("documentSize", "org.apache.uima.examples.SourceDocumentInformation");
    return ll_cas.ll_getIntValue(addr, casFeatCode_documentSize);
  }
  /** @generated */
  public void setDocumentSize(int addr, int v) {
    if (featOkTst && casFeat_documentSize == null)
      jcas.throwFeatMissing("documentSize", "org.apache.uima.examples.SourceDocumentInformation");
    ll_cas.ll_setIntValue(addr, casFeatCode_documentSize, v);
  }

  /** @generated */
  final Feature casFeat_lastSegment;
  /** @generated */
  final int casFeatCode_lastSegment;
  /** @generated */
  public boolean getLastSegment(int addr) {
    if (featOkTst && casFeat_lastSegment == null)
      jcas.throwFeatMissing("lastSegment", "org.apache.uima.examples.SourceDocumentInformation");
    return ll_cas.ll_getBooleanValue(addr, casFeatCode_lastSegment);
  }
  /** @generated */
  public void setLastSegment(int addr, boolean v) {
    if (featOkTst && casFeat_lastSegment == null)
      jcas.throwFeatMissing("lastSegment", "org.apache.uima.examples.SourceDocumentInformation");
    ll_cas.ll_setBooleanValue(addr, casFeatCode_lastSegment, v);
  }

  /**
   * initialize variables to correspond with Cas Type and Features
   *
   * @generated
   */
  public SourceDocumentInformation_Type(JCas jcas, Type casType) {
    super(jcas, casType);
    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());

    casFeat_uri = jcas.getRequiredFeatureDE(casType, "uri", "uima.cas.String", featOkTst);
    casFeatCode_uri =
        (null == casFeat_uri) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl) casFeat_uri).getCode();

    casFeat_offsetInSource =
        jcas.getRequiredFeatureDE(casType, "offsetInSource", "uima.cas.Integer", featOkTst);
    casFeatCode_offsetInSource =
        (null == casFeat_offsetInSource)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_offsetInSource).getCode();

    casFeat_documentSize =
        jcas.getRequiredFeatureDE(casType, "documentSize", "uima.cas.Integer", featOkTst);
    casFeatCode_documentSize =
        (null == casFeat_documentSize)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_documentSize).getCode();

    casFeat_lastSegment =
        jcas.getRequiredFeatureDE(casType, "lastSegment", "uima.cas.Boolean", featOkTst);
    casFeatCode_lastSegment =
        (null == casFeat_lastSegment)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_lastSegment).getCode();
  }
}
Esempio n. 23
0
/**
 * this is a type for evaluator Updated by JCasGen Mon Sep 14 17:54:45 EDT 2015
 *
 * @generated
 */
public class Evaluator_Type extends TOP_Type {
  /**
   * @generated
   * @return the generator for this type
   */
  @Override
  protected FSGenerator getFSGenerator() {
    return fsGenerator;
  }
  /** @generated */
  private final FSGenerator fsGenerator =
      new FSGenerator() {
        public FeatureStructure createFS(int addr, CASImpl cas) {
          if (Evaluator_Type.this.useExistingInstance) {
            // Return eq fs instance if already created
            FeatureStructure fs = Evaluator_Type.this.jcas.getJfsFromCaddr(addr);
            if (null == fs) {
              fs = new Evaluator(addr, Evaluator_Type.this);
              Evaluator_Type.this.jcas.putJfsFromCaddr(addr, fs);
              return fs;
            }
            return fs;
          } else return new Evaluator(addr, Evaluator_Type.this);
        }
      };
  /** @generated */
  @SuppressWarnings("hiding")
  public static final int typeIndexID = Evaluator.typeIndexID;
  /**
   * @generated
   * @modifiable
   */
  @SuppressWarnings("hiding")
  public static final boolean featOkTst =
      JCasRegistry.getFeatOkTst("se2015fall.pi2.yiuchanl.Evaluator");

  /** @generated */
  final Feature casFeat_rankedAnswers;
  /** @generated */
  final int casFeatCode_rankedAnswers;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public int getRankedAnswers(int addr) {
    if (featOkTst && casFeat_rankedAnswers == null)
      jcas.throwFeatMissing("rankedAnswers", "se2015fall.pi2.yiuchanl.Evaluator");
    return ll_cas.ll_getRefValue(addr, casFeatCode_rankedAnswers);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setRankedAnswers(int addr, int v) {
    if (featOkTst && casFeat_rankedAnswers == null)
      jcas.throwFeatMissing("rankedAnswers", "se2015fall.pi2.yiuchanl.Evaluator");
    ll_cas.ll_setRefValue(addr, casFeatCode_rankedAnswers, v);
  }

  /**
   * initialize variables to correspond with Cas Type and Features
   *
   * @generated
   * @param jcas JCas
   * @param casType Type
   */
  public Evaluator_Type(JCas jcas, Type casType) {
    super(jcas, casType);
    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());

    casFeat_rankedAnswers =
        jcas.getRequiredFeatureDE(casType, "rankedAnswers", "uima.cas.FSList", featOkTst);
    casFeatCode_rankedAnswers =
        (null == casFeat_rankedAnswers)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_rankedAnswers).getCode();
  }
}
/**
 * Updated by JCasGen Wed Nov 11 19:41:34 MSK 2015
 *
 * @generated
 */
public class DocumentMetadata_Type extends Annotation_Type {
  /**
   * @generated
   * @return the generator for this type
   */
  @Override
  protected FSGenerator getFSGenerator() {
    return fsGenerator;
  }
  /** @generated */
  private final FSGenerator fsGenerator =
      new FSGenerator() {
        public FeatureStructure createFS(int addr, CASImpl cas) {
          if (DocumentMetadata_Type.this.useExistingInstance) {
            // Return eq fs instance if already created
            FeatureStructure fs = DocumentMetadata_Type.this.jcas.getJfsFromCaddr(addr);
            if (null == fs) {
              fs = new DocumentMetadata(addr, DocumentMetadata_Type.this);
              DocumentMetadata_Type.this.jcas.putJfsFromCaddr(addr, fs);
              return fs;
            }
            return fs;
          } else return new DocumentMetadata(addr, DocumentMetadata_Type.this);
        }
      };
  /** @generated */
  @SuppressWarnings("hiding")
  public static final int typeIndexID = DocumentMetadata.typeIndexID;
  /**
   * @generated
   * @modifiable
   */
  @SuppressWarnings("hiding")
  public static final boolean featOkTst =
      JCasRegistry.getFeatOkTst("com.textocat.textokit.commons.DocumentMetadata");

  /** @generated */
  final Feature casFeat_sourceUri;
  /** @generated */
  final int casFeatCode_sourceUri;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public String getSourceUri(int addr) {
    if (featOkTst && casFeat_sourceUri == null)
      jcas.throwFeatMissing("sourceUri", "com.textocat.textokit.commons.DocumentMetadata");
    return ll_cas.ll_getStringValue(addr, casFeatCode_sourceUri);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setSourceUri(int addr, String v) {
    if (featOkTst && casFeat_sourceUri == null)
      jcas.throwFeatMissing("sourceUri", "com.textocat.textokit.commons.DocumentMetadata");
    ll_cas.ll_setStringValue(addr, casFeatCode_sourceUri, v);
  }

  /** @generated */
  final Feature casFeat_offsetInSource;
  /** @generated */
  final int casFeatCode_offsetInSource;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public long getOffsetInSource(int addr) {
    if (featOkTst && casFeat_offsetInSource == null)
      jcas.throwFeatMissing("offsetInSource", "com.textocat.textokit.commons.DocumentMetadata");
    return ll_cas.ll_getLongValue(addr, casFeatCode_offsetInSource);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setOffsetInSource(int addr, long v) {
    if (featOkTst && casFeat_offsetInSource == null)
      jcas.throwFeatMissing("offsetInSource", "com.textocat.textokit.commons.DocumentMetadata");
    ll_cas.ll_setLongValue(addr, casFeatCode_offsetInSource, v);
  }

  /** @generated */
  final Feature casFeat_documentSize;
  /** @generated */
  final int casFeatCode_documentSize;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public long getDocumentSize(int addr) {
    if (featOkTst && casFeat_documentSize == null)
      jcas.throwFeatMissing("documentSize", "com.textocat.textokit.commons.DocumentMetadata");
    return ll_cas.ll_getLongValue(addr, casFeatCode_documentSize);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setDocumentSize(int addr, long v) {
    if (featOkTst && casFeat_documentSize == null)
      jcas.throwFeatMissing("documentSize", "com.textocat.textokit.commons.DocumentMetadata");
    ll_cas.ll_setLongValue(addr, casFeatCode_documentSize, v);
  }

  /** @generated */
  final Feature casFeat_startProcessingTime;
  /** @generated */
  final int casFeatCode_startProcessingTime;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public long getStartProcessingTime(int addr) {
    if (featOkTst && casFeat_startProcessingTime == null)
      jcas.throwFeatMissing(
          "startProcessingTime", "com.textocat.textokit.commons.DocumentMetadata");
    return ll_cas.ll_getLongValue(addr, casFeatCode_startProcessingTime);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setStartProcessingTime(int addr, long v) {
    if (featOkTst && casFeat_startProcessingTime == null)
      jcas.throwFeatMissing(
          "startProcessingTime", "com.textocat.textokit.commons.DocumentMetadata");
    ll_cas.ll_setLongValue(addr, casFeatCode_startProcessingTime, v);
  }

  /**
   * initialize variables to correspond with Cas Type and Features
   *
   * @generated
   * @param jcas JCas
   * @param casType Type
   */
  public DocumentMetadata_Type(JCas jcas, Type casType) {
    super(jcas, casType);
    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());

    casFeat_sourceUri =
        jcas.getRequiredFeatureDE(casType, "sourceUri", "uima.cas.String", featOkTst);
    casFeatCode_sourceUri =
        (null == casFeat_sourceUri)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_sourceUri).getCode();

    casFeat_offsetInSource =
        jcas.getRequiredFeatureDE(casType, "offsetInSource", "uima.cas.Long", featOkTst);
    casFeatCode_offsetInSource =
        (null == casFeat_offsetInSource)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_offsetInSource).getCode();

    casFeat_documentSize =
        jcas.getRequiredFeatureDE(casType, "documentSize", "uima.cas.Long", featOkTst);
    casFeatCode_documentSize =
        (null == casFeat_documentSize)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_documentSize).getCode();

    casFeat_startProcessingTime =
        jcas.getRequiredFeatureDE(casType, "startProcessingTime", "uima.cas.Long", featOkTst);
    casFeatCode_startProcessingTime =
        (null == casFeat_startProcessingTime)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_startProcessingTime).getCode();
  }
}
/**
 * Output type for CasConsumer Updated by JCasGen Fri Oct 04 20:18:18 EDT 2013
 *
 * @generated
 */
public class QASystemOutput_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 (QASystemOutput_Type.this.useExistingInstance) {
            // Return eq fs instance if already created
            FeatureStructure fs = QASystemOutput_Type.this.jcas.getJfsFromCaddr(addr);
            if (null == fs) {
              fs = new QASystemOutput(addr, QASystemOutput_Type.this);
              QASystemOutput_Type.this.jcas.putJfsFromCaddr(addr, fs);
              return fs;
            }
            return fs;
          } else return new QASystemOutput(addr, QASystemOutput_Type.this);
        }
      };
  /** @generated */
  @SuppressWarnings("hiding")
  public static final int typeIndexID = QASystemOutput.typeIndexID;
  /**
   * @generated
   * @modifiable
   */
  @SuppressWarnings("hiding")
  public static final boolean featOkTst =
      JCasRegistry.getFeatOkTst("edu.cmu.deiis.types.QASystemOutput");

  /** @generated */
  final Feature casFeat_questionAnnotation;
  /** @generated */
  final int casFeatCode_questionAnnotation;
  /** @generated */
  public int getQuestionAnnotation(int addr) {
    if (featOkTst && casFeat_questionAnnotation == null)
      jcas.throwFeatMissing("questionAnnotation", "edu.cmu.deiis.types.QASystemOutput");
    return ll_cas.ll_getRefValue(addr, casFeatCode_questionAnnotation);
  }
  /** @generated */
  public void setQuestionAnnotation(int addr, int v) {
    if (featOkTst && casFeat_questionAnnotation == null)
      jcas.throwFeatMissing("questionAnnotation", "edu.cmu.deiis.types.QASystemOutput");
    ll_cas.ll_setRefValue(addr, casFeatCode_questionAnnotation, v);
  }

  /** @generated */
  final Feature casFeat_answerScores;
  /** @generated */
  final int casFeatCode_answerScores;
  /** @generated */
  public int getAnswerScores(int addr) {
    if (featOkTst && casFeat_answerScores == null)
      jcas.throwFeatMissing("answerScores", "edu.cmu.deiis.types.QASystemOutput");
    return ll_cas.ll_getRefValue(addr, casFeatCode_answerScores);
  }
  /** @generated */
  public void setAnswerScores(int addr, int v) {
    if (featOkTst && casFeat_answerScores == null)
      jcas.throwFeatMissing("answerScores", "edu.cmu.deiis.types.QASystemOutput");
    ll_cas.ll_setRefValue(addr, casFeatCode_answerScores, v);
  }

  /** @generated */
  public int getAnswerScores(int addr, int i) {
    if (featOkTst && casFeat_answerScores == null)
      jcas.throwFeatMissing("answerScores", "edu.cmu.deiis.types.QASystemOutput");
    if (lowLevelTypeChecks)
      return ll_cas.ll_getRefArrayValue(
          ll_cas.ll_getRefValue(addr, casFeatCode_answerScores), i, true);
    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_answerScores), i);
    return ll_cas.ll_getRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_answerScores), i);
  }

  /** @generated */
  public void setAnswerScores(int addr, int i, int v) {
    if (featOkTst && casFeat_answerScores == null)
      jcas.throwFeatMissing("answerScores", "edu.cmu.deiis.types.QASystemOutput");
    if (lowLevelTypeChecks)
      ll_cas.ll_setRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_answerScores), i, v, true);
    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_answerScores), i);
    ll_cas.ll_setRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_answerScores), i, v);
  }

  /** @generated */
  final Feature casFeat_precisionAtK;
  /** @generated */
  final int casFeatCode_precisionAtK;
  /** @generated */
  public double getPrecisionAtK(int addr) {
    if (featOkTst && casFeat_precisionAtK == null)
      jcas.throwFeatMissing("precisionAtK", "edu.cmu.deiis.types.QASystemOutput");
    return ll_cas.ll_getDoubleValue(addr, casFeatCode_precisionAtK);
  }
  /** @generated */
  public void setPrecisionAtK(int addr, double v) {
    if (featOkTst && casFeat_precisionAtK == null)
      jcas.throwFeatMissing("precisionAtK", "edu.cmu.deiis.types.QASystemOutput");
    ll_cas.ll_setDoubleValue(addr, casFeatCode_precisionAtK, v);
  }

  /**
   * initialize variables to correspond with Cas Type and Features
   *
   * @generated
   */
  public QASystemOutput_Type(JCas jcas, Type casType) {
    super(jcas, casType);
    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());

    casFeat_questionAnnotation =
        jcas.getRequiredFeatureDE(
            casType, "questionAnnotation", "edu.cmu.deiis.types.Question", featOkTst);
    casFeatCode_questionAnnotation =
        (null == casFeat_questionAnnotation)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_questionAnnotation).getCode();

    casFeat_answerScores =
        jcas.getRequiredFeatureDE(casType, "answerScores", "uima.cas.FSArray", featOkTst);
    casFeatCode_answerScores =
        (null == casFeat_answerScores)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_answerScores).getCode();

    casFeat_precisionAtK =
        jcas.getRequiredFeatureDE(casType, "precisionAtK", "uima.cas.Double", featOkTst);
    casFeatCode_precisionAtK =
        (null == casFeat_precisionAtK)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_precisionAtK).getCode();
  }
}
Esempio n. 26
0
/**
 * Automatically generated type for Hashtag Updated by JCasGen Tue Mar 10 18:00:03 EET 2015
 *
 * @generated
 */
public class Hashtag_Type extends Annotation_Type {
  /**
   * @generated
   * @return the generator for this type
   */
  @Override
  protected FSGenerator getFSGenerator() {
    return fsGenerator;
  }
  /** @generated */
  private final FSGenerator fsGenerator =
      new FSGenerator() {
        public FeatureStructure createFS(int addr, CASImpl cas) {
          if (Hashtag_Type.this.useExistingInstance) {
            // Return eq fs instance if already created
            FeatureStructure fs = Hashtag_Type.this.jcas.getJfsFromCaddr(addr);
            if (null == fs) {
              fs = new Hashtag(addr, Hashtag_Type.this);
              Hashtag_Type.this.jcas.putJfsFromCaddr(addr, fs);
              return fs;
            }
            return fs;
          } else return new Hashtag(addr, Hashtag_Type.this);
        }
      };
  /** @generated */
  @SuppressWarnings("hiding")
  public static final int typeIndexID = Hashtag.typeIndexID;
  /**
   * @generated
   * @modifiable
   */
  @SuppressWarnings("hiding")
  public static final boolean featOkTst =
      JCasRegistry.getFeatOkTst("com.ontotext.s4.api.types.twitie.Hashtag");

  /** @generated */
  final Feature casFeat_rule;
  /** @generated */
  final int casFeatCode_rule;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public String getRule(int addr) {
    if (featOkTst && casFeat_rule == null)
      jcas.throwFeatMissing("rule", "com.ontotext.s4.api.types.twitie.Hashtag");
    return ll_cas.ll_getStringValue(addr, casFeatCode_rule);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setRule(int addr, String v) {
    if (featOkTst && casFeat_rule == null)
      jcas.throwFeatMissing("rule", "com.ontotext.s4.api.types.twitie.Hashtag");
    ll_cas.ll_setStringValue(addr, casFeatCode_rule, v);
  }

  /** @generated */
  final Feature casFeat_string;
  /** @generated */
  final int casFeatCode_string;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public String getString(int addr) {
    if (featOkTst && casFeat_string == null)
      jcas.throwFeatMissing("string", "com.ontotext.s4.api.types.twitie.Hashtag");
    return ll_cas.ll_getStringValue(addr, casFeatCode_string);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setString(int addr, String v) {
    if (featOkTst && casFeat_string == null)
      jcas.throwFeatMissing("string", "com.ontotext.s4.api.types.twitie.Hashtag");
    ll_cas.ll_setStringValue(addr, casFeatCode_string, v);
  }

  /** @generated */
  final Feature casFeat_length;
  /** @generated */
  final int casFeatCode_length;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public String getLength(int addr) {
    if (featOkTst && casFeat_length == null)
      jcas.throwFeatMissing("length", "com.ontotext.s4.api.types.twitie.Hashtag");
    return ll_cas.ll_getStringValue(addr, casFeatCode_length);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setLength(int addr, String v) {
    if (featOkTst && casFeat_length == null)
      jcas.throwFeatMissing("length", "com.ontotext.s4.api.types.twitie.Hashtag");
    ll_cas.ll_setStringValue(addr, casFeatCode_length, v);
  }

  /** @generated */
  final Feature casFeat_type_feature;
  /** @generated */
  final int casFeatCode_type_feature;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public String getType_feature(int addr) {
    if (featOkTst && casFeat_type_feature == null)
      jcas.throwFeatMissing("type_feature", "com.ontotext.s4.api.types.twitie.Hashtag");
    return ll_cas.ll_getStringValue(addr, casFeatCode_type_feature);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setType_feature(int addr, String v) {
    if (featOkTst && casFeat_type_feature == null)
      jcas.throwFeatMissing("type_feature", "com.ontotext.s4.api.types.twitie.Hashtag");
    ll_cas.ll_setStringValue(addr, casFeatCode_type_feature, v);
  }

  /** @generated */
  final Feature casFeat_kind;
  /** @generated */
  final int casFeatCode_kind;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public String getKind(int addr) {
    if (featOkTst && casFeat_kind == null)
      jcas.throwFeatMissing("kind", "com.ontotext.s4.api.types.twitie.Hashtag");
    return ll_cas.ll_getStringValue(addr, casFeatCode_kind);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setKind(int addr, String v) {
    if (featOkTst && casFeat_kind == null)
      jcas.throwFeatMissing("kind", "com.ontotext.s4.api.types.twitie.Hashtag");
    ll_cas.ll_setStringValue(addr, casFeatCode_kind, v);
  }

  /**
   * initialize variables to correspond with Cas Type and Features
   *
   * @generated
   * @param jcas JCas
   * @param casType Type
   */
  public Hashtag_Type(JCas jcas, Type casType) {
    super(jcas, casType);
    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());

    casFeat_rule = jcas.getRequiredFeatureDE(casType, "rule", "uima.cas.String", featOkTst);
    casFeatCode_rule =
        (null == casFeat_rule) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl) casFeat_rule).getCode();

    casFeat_string = jcas.getRequiredFeatureDE(casType, "string", "uima.cas.String", featOkTst);
    casFeatCode_string =
        (null == casFeat_string)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_string).getCode();

    casFeat_length = jcas.getRequiredFeatureDE(casType, "length", "uima.cas.String", featOkTst);
    casFeatCode_length =
        (null == casFeat_length)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_length).getCode();

    casFeat_type_feature =
        jcas.getRequiredFeatureDE(casType, "type_feature", "uima.cas.String", featOkTst);
    casFeatCode_type_feature =
        (null == casFeat_type_feature)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_type_feature).getCode();

    casFeat_kind = jcas.getRequiredFeatureDE(casType, "kind", "uima.cas.String", featOkTst);
    casFeatCode_kind =
        (null == casFeat_kind) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl) casFeat_kind).getCode();
  }
}
Esempio n. 27
0
/**
 * Updated by JCasGen Mon Oct 07 14:55:01 EDT 2013
 *
 * @generated
 */
public class SemanticArgument_Type extends Argument_Type {
  /** @generated */
  @Override
  protected FSGenerator getFSGenerator() {
    return fsGenerator;
  }
  /** @generated */
  private final FSGenerator fsGenerator =
      new FSGenerator() {
        public FeatureStructure createFS(int addr, CASImpl cas) {
          if (SemanticArgument_Type.this.useExistingInstance) {
            // Return eq fs instance if already created
            FeatureStructure fs = SemanticArgument_Type.this.jcas.getJfsFromCaddr(addr);
            if (null == fs) {
              fs = new SemanticArgument(addr, SemanticArgument_Type.this);
              SemanticArgument_Type.this.jcas.putJfsFromCaddr(addr, fs);
              return fs;
            }
            return fs;
          } else return new SemanticArgument(addr, SemanticArgument_Type.this);
        }
      };
  /** @generated */
  @SuppressWarnings("hiding")
  public static final int typeIndexID = SemanticArgument.typeIndexID;
  /**
   * @generated
   * @modifiable
   */
  @SuppressWarnings("hiding")
  public static final boolean featOkTst =
      JCasRegistry.getFeatOkTst("org.cleartk.srl.type.SemanticArgument");

  /** @generated */
  final Feature casFeat_label;
  /** @generated */
  final int casFeatCode_label;
  /** @generated */
  public String getLabel(int addr) {
    if (featOkTst && casFeat_label == null)
      jcas.throwFeatMissing("label", "org.cleartk.srl.type.SemanticArgument");
    return ll_cas.ll_getStringValue(addr, casFeatCode_label);
  }
  /** @generated */
  public void setLabel(int addr, String v) {
    if (featOkTst && casFeat_label == null)
      jcas.throwFeatMissing("label", "org.cleartk.srl.type.SemanticArgument");
    ll_cas.ll_setStringValue(addr, casFeatCode_label, v);
  }

  /** @generated */
  final Feature casFeat_feature;
  /** @generated */
  final int casFeatCode_feature;
  /** @generated */
  public String getFeature(int addr) {
    if (featOkTst && casFeat_feature == null)
      jcas.throwFeatMissing("feature", "org.cleartk.srl.type.SemanticArgument");
    return ll_cas.ll_getStringValue(addr, casFeatCode_feature);
  }
  /** @generated */
  public void setFeature(int addr, String v) {
    if (featOkTst && casFeat_feature == null)
      jcas.throwFeatMissing("feature", "org.cleartk.srl.type.SemanticArgument");
    ll_cas.ll_setStringValue(addr, casFeatCode_feature, v);
  }

  /** @generated */
  final Feature casFeat_coreferenceAnnotations;
  /** @generated */
  final int casFeatCode_coreferenceAnnotations;
  /** @generated */
  public int getCoreferenceAnnotations(int addr) {
    if (featOkTst && casFeat_coreferenceAnnotations == null)
      jcas.throwFeatMissing("coreferenceAnnotations", "org.cleartk.srl.type.SemanticArgument");
    return ll_cas.ll_getRefValue(addr, casFeatCode_coreferenceAnnotations);
  }
  /** @generated */
  public void setCoreferenceAnnotations(int addr, int v) {
    if (featOkTst && casFeat_coreferenceAnnotations == null)
      jcas.throwFeatMissing("coreferenceAnnotations", "org.cleartk.srl.type.SemanticArgument");
    ll_cas.ll_setRefValue(addr, casFeatCode_coreferenceAnnotations, v);
  }

  /** @generated */
  public int getCoreferenceAnnotations(int addr, int i) {
    if (featOkTst && casFeat_coreferenceAnnotations == null)
      jcas.throwFeatMissing("coreferenceAnnotations", "org.cleartk.srl.type.SemanticArgument");
    if (lowLevelTypeChecks)
      return ll_cas.ll_getRefArrayValue(
          ll_cas.ll_getRefValue(addr, casFeatCode_coreferenceAnnotations), i, true);
    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_coreferenceAnnotations), i);
    return ll_cas.ll_getRefArrayValue(
        ll_cas.ll_getRefValue(addr, casFeatCode_coreferenceAnnotations), i);
  }

  /** @generated */
  public void setCoreferenceAnnotations(int addr, int i, int v) {
    if (featOkTst && casFeat_coreferenceAnnotations == null)
      jcas.throwFeatMissing("coreferenceAnnotations", "org.cleartk.srl.type.SemanticArgument");
    if (lowLevelTypeChecks)
      ll_cas.ll_setRefArrayValue(
          ll_cas.ll_getRefValue(addr, casFeatCode_coreferenceAnnotations), i, v, true);
    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_coreferenceAnnotations), i);
    ll_cas.ll_setRefArrayValue(
        ll_cas.ll_getRefValue(addr, casFeatCode_coreferenceAnnotations), i, v);
  }

  /** @generated */
  final Feature casFeat_preposition;
  /** @generated */
  final int casFeatCode_preposition;
  /** @generated */
  public String getPreposition(int addr) {
    if (featOkTst && casFeat_preposition == null)
      jcas.throwFeatMissing("preposition", "org.cleartk.srl.type.SemanticArgument");
    return ll_cas.ll_getStringValue(addr, casFeatCode_preposition);
  }
  /** @generated */
  public void setPreposition(int addr, String v) {
    if (featOkTst && casFeat_preposition == null)
      jcas.throwFeatMissing("preposition", "org.cleartk.srl.type.SemanticArgument");
    ll_cas.ll_setStringValue(addr, casFeatCode_preposition, v);
  }

  /** @generated */
  final Feature casFeat_hyphenTag;
  /** @generated */
  final int casFeatCode_hyphenTag;
  /** @generated */
  public String getHyphenTag(int addr) {
    if (featOkTst && casFeat_hyphenTag == null)
      jcas.throwFeatMissing("hyphenTag", "org.cleartk.srl.type.SemanticArgument");
    return ll_cas.ll_getStringValue(addr, casFeatCode_hyphenTag);
  }
  /** @generated */
  public void setHyphenTag(int addr, String v) {
    if (featOkTst && casFeat_hyphenTag == null)
      jcas.throwFeatMissing("hyphenTag", "org.cleartk.srl.type.SemanticArgument");
    ll_cas.ll_setStringValue(addr, casFeatCode_hyphenTag, v);
  }

  /** @generated */
  final Feature casFeat_propTxt;
  /** @generated */
  final int casFeatCode_propTxt;
  /** @generated */
  public String getPropTxt(int addr) {
    if (featOkTst && casFeat_propTxt == null)
      jcas.throwFeatMissing("propTxt", "org.cleartk.srl.type.SemanticArgument");
    return ll_cas.ll_getStringValue(addr, casFeatCode_propTxt);
  }
  /** @generated */
  public void setPropTxt(int addr, String v) {
    if (featOkTst && casFeat_propTxt == null)
      jcas.throwFeatMissing("propTxt", "org.cleartk.srl.type.SemanticArgument");
    ll_cas.ll_setStringValue(addr, casFeatCode_propTxt, v);
  }

  /**
   * initialize variables to correspond with Cas Type and Features
   *
   * @generated
   */
  public SemanticArgument_Type(JCas jcas, Type casType) {
    super(jcas, casType);
    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());

    casFeat_label = jcas.getRequiredFeatureDE(casType, "label", "uima.cas.String", featOkTst);
    casFeatCode_label =
        (null == casFeat_label)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_label).getCode();

    casFeat_feature = jcas.getRequiredFeatureDE(casType, "feature", "uima.cas.String", featOkTst);
    casFeatCode_feature =
        (null == casFeat_feature)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_feature).getCode();

    casFeat_coreferenceAnnotations =
        jcas.getRequiredFeatureDE(casType, "coreferenceAnnotations", "uima.cas.FSArray", featOkTst);
    casFeatCode_coreferenceAnnotations =
        (null == casFeat_coreferenceAnnotations)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_coreferenceAnnotations).getCode();

    casFeat_preposition =
        jcas.getRequiredFeatureDE(casType, "preposition", "uima.cas.String", featOkTst);
    casFeatCode_preposition =
        (null == casFeat_preposition)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_preposition).getCode();

    casFeat_hyphenTag =
        jcas.getRequiredFeatureDE(casType, "hyphenTag", "uima.cas.String", featOkTst);
    casFeatCode_hyphenTag =
        (null == casFeat_hyphenTag)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_hyphenTag).getCode();

    casFeat_propTxt = jcas.getRequiredFeatureDE(casType, "propTxt", "uima.cas.String", featOkTst);
    casFeatCode_propTxt =
        (null == casFeat_propTxt)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_propTxt).getCode();
  }
}
/**
 * Updated by JCasGen Mon Aug 04 14:59:26 EDT 2014
 *
 * @generated
 */
public class EntityBasedComponent_Type extends ComponentAnnotation_Type {
  /**
   * @generated
   * @return the generator for this type
   */
  @Override
  protected FSGenerator getFSGenerator() {
    return fsGenerator;
  }
  /** @generated */
  private final FSGenerator fsGenerator =
      new FSGenerator() {
        public FeatureStructure createFS(int addr, CASImpl cas) {
          if (EntityBasedComponent_Type.this.useExistingInstance) {
            // Return eq fs instance if already created
            FeatureStructure fs = EntityBasedComponent_Type.this.jcas.getJfsFromCaddr(addr);
            if (null == fs) {
              fs = new EntityBasedComponent(addr, EntityBasedComponent_Type.this);
              EntityBasedComponent_Type.this.jcas.putJfsFromCaddr(addr, fs);
              return fs;
            }
            return fs;
          } else return new EntityBasedComponent(addr, EntityBasedComponent_Type.this);
        }
      };
  /** @generated */
  @SuppressWarnings("hiding")
  public static final int typeIndexID = EntityBasedComponent.typeIndexID;
  /**
   * @generated
   * @modifiable
   */
  @SuppressWarnings("hiding")
  public static final boolean featOkTst =
      JCasRegistry.getFeatOkTst("edu.cmu.cs.lti.multiScript.type.EntityBasedComponent");

  /** @generated */
  final Feature casFeat_containingEntityMentions;
  /** @generated */
  final int casFeatCode_containingEntityMentions;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public int getContainingEntityMentions(int addr) {
    if (featOkTst && casFeat_containingEntityMentions == null)
      jcas.throwFeatMissing(
          "containingEntityMentions", "edu.cmu.cs.lti.multiScript.type.EntityBasedComponent");
    return ll_cas.ll_getRefValue(addr, casFeatCode_containingEntityMentions);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setContainingEntityMentions(int addr, int v) {
    if (featOkTst && casFeat_containingEntityMentions == null)
      jcas.throwFeatMissing(
          "containingEntityMentions", "edu.cmu.cs.lti.multiScript.type.EntityBasedComponent");
    ll_cas.ll_setRefValue(addr, casFeatCode_containingEntityMentions, v);
  }

  /** @generated */
  final Feature casFeat_componentLinks;
  /** @generated */
  final int casFeatCode_componentLinks;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public int getComponentLinks(int addr) {
    if (featOkTst && casFeat_componentLinks == null)
      jcas.throwFeatMissing(
          "componentLinks", "edu.cmu.cs.lti.multiScript.type.EntityBasedComponent");
    return ll_cas.ll_getRefValue(addr, casFeatCode_componentLinks);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setComponentLinks(int addr, int v) {
    if (featOkTst && casFeat_componentLinks == null)
      jcas.throwFeatMissing(
          "componentLinks", "edu.cmu.cs.lti.multiScript.type.EntityBasedComponent");
    ll_cas.ll_setRefValue(addr, casFeatCode_componentLinks, v);
  }

  /** @generated */
  final Feature casFeat_headWord;
  /** @generated */
  final int casFeatCode_headWord;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public int getHeadWord(int addr) {
    if (featOkTst && casFeat_headWord == null)
      jcas.throwFeatMissing("headWord", "edu.cmu.cs.lti.multiScript.type.EntityBasedComponent");
    return ll_cas.ll_getRefValue(addr, casFeatCode_headWord);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setHeadWord(int addr, int v) {
    if (featOkTst && casFeat_headWord == null)
      jcas.throwFeatMissing("headWord", "edu.cmu.cs.lti.multiScript.type.EntityBasedComponent");
    ll_cas.ll_setRefValue(addr, casFeatCode_headWord, v);
  }

  /** @generated */
  final Feature casFeat_quantity;
  /** @generated */
  final int casFeatCode_quantity;
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @return the feature value
   */
  public int getQuantity(int addr) {
    if (featOkTst && casFeat_quantity == null)
      jcas.throwFeatMissing("quantity", "edu.cmu.cs.lti.multiScript.type.EntityBasedComponent");
    return ll_cas.ll_getRefValue(addr, casFeatCode_quantity);
  }
  /**
   * @generated
   * @param addr low level Feature Structure reference
   * @param v value to set
   */
  public void setQuantity(int addr, int v) {
    if (featOkTst && casFeat_quantity == null)
      jcas.throwFeatMissing("quantity", "edu.cmu.cs.lti.multiScript.type.EntityBasedComponent");
    ll_cas.ll_setRefValue(addr, casFeatCode_quantity, v);
  }

  /**
   * initialize variables to correspond with Cas Type and Features
   *
   * @generated
   * @param jcas JCas
   * @param casType Type
   */
  public EntityBasedComponent_Type(JCas jcas, Type casType) {
    super(jcas, casType);
    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());

    casFeat_containingEntityMentions =
        jcas.getRequiredFeatureDE(
            casType, "containingEntityMentions", "uima.cas.FSList", featOkTst);
    casFeatCode_containingEntityMentions =
        (null == casFeat_containingEntityMentions)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_containingEntityMentions).getCode();

    casFeat_componentLinks =
        jcas.getRequiredFeatureDE(casType, "componentLinks", "uima.cas.FSList", featOkTst);
    casFeatCode_componentLinks =
        (null == casFeat_componentLinks)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_componentLinks).getCode();

    casFeat_headWord =
        jcas.getRequiredFeatureDE(
            casType, "headWord", "edu.cmu.cs.lti.multiScript.type.Word", featOkTst);
    casFeatCode_headWord =
        (null == casFeat_headWord)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_headWord).getCode();

    casFeat_quantity =
        jcas.getRequiredFeatureDE(
            casType, "quantity", "edu.cmu.cs.lti.multiScript.type.NumberAnnotation", featOkTst);
    casFeatCode_quantity =
        (null == casFeat_quantity)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_quantity).getCode();
  }
}
Esempio n. 29
0
/**
 * Updated by JCasGen Sun Oct 14 15:39:26 EDT 2012
 *
 * @generated
 */
public class Noun_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 (Noun_Type.this.useExistingInstance) {
            // Return eq fs instance if already created
            FeatureStructure fs = Noun_Type.this.jcas.getJfsFromCaddr(addr);
            if (null == fs) {
              fs = new Noun(addr, Noun_Type.this);
              Noun_Type.this.jcas.putJfsFromCaddr(addr, fs);
              return fs;
            }
            return fs;
          } else return new Noun(addr, Noun_Type.this);
        }
      };
  /** @generated */
  @SuppressWarnings("hiding")
  public static final int typeIndexID = Noun.typeIndexID;
  /**
   * @generated
   * @modifiable
   */
  @SuppressWarnings("hiding")
  public static final boolean featOkTst = JCasRegistry.getFeatOkTst("edu.cmu.hw1.types.Noun");

  /** @generated */
  final Feature casFeat_NounId;
  /** @generated */
  final int casFeatCode_NounId;
  /** @generated */
  public String getNounId(int addr) {
    if (featOkTst && casFeat_NounId == null)
      jcas.throwFeatMissing("NounId", "edu.cmu.hw1.types.Noun");
    return ll_cas.ll_getStringValue(addr, casFeatCode_NounId);
  }
  /** @generated */
  public void setNounId(int addr, String v) {
    if (featOkTst && casFeat_NounId == null)
      jcas.throwFeatMissing("NounId", "edu.cmu.hw1.types.Noun");
    ll_cas.ll_setStringValue(addr, casFeatCode_NounId, v);
  }

  /**
   * initialize variables to correspond with Cas Type and Features
   *
   * @generated
   */
  public Noun_Type(JCas jcas, Type casType) {
    super(jcas, casType);
    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());

    casFeat_NounId = jcas.getRequiredFeatureDE(casType, "NounId", "uima.cas.String", featOkTst);
    casFeatCode_NounId =
        (null == casFeat_NounId)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_NounId).getCode();
  }
}
/**
 * TextFeatures include the base text as well as unigrams, bigrams, and trigrams that help
 * characterize the text Updated by JCasGen Wed Sep 11 22:48:16 EDT 2013
 *
 * @generated
 */
public class TextFeatures_Type extends SourceConfidenceAnnotation_Type {
  /** @generated */
  @Override
  protected FSGenerator getFSGenerator() {
    return fsGenerator;
  }
  /** @generated */
  private final FSGenerator fsGenerator =
      new FSGenerator() {
        public FeatureStructure createFS(int addr, CASImpl cas) {
          if (TextFeatures_Type.this.useExistingInstance) {
            // Return eq fs instance if already created
            FeatureStructure fs = TextFeatures_Type.this.jcas.getJfsFromCaddr(addr);
            if (null == fs) {
              fs = new TextFeatures(addr, TextFeatures_Type.this);
              TextFeatures_Type.this.jcas.putJfsFromCaddr(addr, fs);
              return fs;
            }
            return fs;
          } else return new TextFeatures(addr, TextFeatures_Type.this);
        }
      };
  /** @generated */
  @SuppressWarnings("hiding")
  public static final int typeIndexID = TextFeatures.typeIndexID;
  /**
   * @generated
   * @modifiable
   */
  @SuppressWarnings("hiding")
  public static final boolean featOkTst =
      JCasRegistry.getFeatOkTst("cmu11791.rcarlson.TextFeatures");

  /** @generated */
  final Feature casFeat_unigrams;
  /** @generated */
  final int casFeatCode_unigrams;
  /** @generated */
  public int getUnigrams(int addr) {
    if (featOkTst && casFeat_unigrams == null)
      jcas.throwFeatMissing("unigrams", "cmu11791.rcarlson.TextFeatures");
    return ll_cas.ll_getRefValue(addr, casFeatCode_unigrams);
  }
  /** @generated */
  public void setUnigrams(int addr, int v) {
    if (featOkTst && casFeat_unigrams == null)
      jcas.throwFeatMissing("unigrams", "cmu11791.rcarlson.TextFeatures");
    ll_cas.ll_setRefValue(addr, casFeatCode_unigrams, v);
  }

  /** @generated */
  final Feature casFeat_bigrams;
  /** @generated */
  final int casFeatCode_bigrams;
  /** @generated */
  public int getBigrams(int addr) {
    if (featOkTst && casFeat_bigrams == null)
      jcas.throwFeatMissing("bigrams", "cmu11791.rcarlson.TextFeatures");
    return ll_cas.ll_getRefValue(addr, casFeatCode_bigrams);
  }
  /** @generated */
  public void setBigrams(int addr, int v) {
    if (featOkTst && casFeat_bigrams == null)
      jcas.throwFeatMissing("bigrams", "cmu11791.rcarlson.TextFeatures");
    ll_cas.ll_setRefValue(addr, casFeatCode_bigrams, v);
  }

  /** @generated */
  final Feature casFeat_trigrams;
  /** @generated */
  final int casFeatCode_trigrams;
  /** @generated */
  public int getTrigrams(int addr) {
    if (featOkTst && casFeat_trigrams == null)
      jcas.throwFeatMissing("trigrams", "cmu11791.rcarlson.TextFeatures");
    return ll_cas.ll_getRefValue(addr, casFeatCode_trigrams);
  }
  /** @generated */
  public void setTrigrams(int addr, int v) {
    if (featOkTst && casFeat_trigrams == null)
      jcas.throwFeatMissing("trigrams", "cmu11791.rcarlson.TextFeatures");
    ll_cas.ll_setRefValue(addr, casFeatCode_trigrams, v);
  }

  /** @generated */
  final Feature casFeat_text;
  /** @generated */
  final int casFeatCode_text;
  /** @generated */
  public String getText(int addr) {
    if (featOkTst && casFeat_text == null)
      jcas.throwFeatMissing("text", "cmu11791.rcarlson.TextFeatures");
    return ll_cas.ll_getStringValue(addr, casFeatCode_text);
  }
  /** @generated */
  public void setText(int addr, String v) {
    if (featOkTst && casFeat_text == null)
      jcas.throwFeatMissing("text", "cmu11791.rcarlson.TextFeatures");
    ll_cas.ll_setStringValue(addr, casFeatCode_text, v);
  }

  /** @generated */
  final Feature casFeat_allTokens;
  /** @generated */
  final int casFeatCode_allTokens;
  /** @generated */
  public int getAllTokens(int addr) {
    if (featOkTst && casFeat_allTokens == null)
      jcas.throwFeatMissing("allTokens", "cmu11791.rcarlson.TextFeatures");
    return ll_cas.ll_getRefValue(addr, casFeatCode_allTokens);
  }
  /** @generated */
  public void setAllTokens(int addr, int v) {
    if (featOkTst && casFeat_allTokens == null)
      jcas.throwFeatMissing("allTokens", "cmu11791.rcarlson.TextFeatures");
    ll_cas.ll_setRefValue(addr, casFeatCode_allTokens, v);
  }

  /**
   * initialize variables to correspond with Cas Type and Features
   *
   * @generated
   */
  public TextFeatures_Type(JCas jcas, Type casType) {
    super(jcas, casType);
    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());

    casFeat_unigrams = jcas.getRequiredFeatureDE(casType, "unigrams", "uima.cas.FSList", featOkTst);
    casFeatCode_unigrams =
        (null == casFeat_unigrams)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_unigrams).getCode();

    casFeat_bigrams = jcas.getRequiredFeatureDE(casType, "bigrams", "uima.cas.FSList", featOkTst);
    casFeatCode_bigrams =
        (null == casFeat_bigrams)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_bigrams).getCode();

    casFeat_trigrams = jcas.getRequiredFeatureDE(casType, "trigrams", "uima.cas.FSList", featOkTst);
    casFeatCode_trigrams =
        (null == casFeat_trigrams)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_trigrams).getCode();

    casFeat_text = jcas.getRequiredFeatureDE(casType, "text", "uima.cas.String", featOkTst);
    casFeatCode_text =
        (null == casFeat_text) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl) casFeat_text).getCode();

    casFeat_allTokens =
        jcas.getRequiredFeatureDE(casType, "allTokens", "uima.cas.StringList", featOkTst);
    casFeatCode_allTokens =
        (null == casFeat_allTokens)
            ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_allTokens).getCode();
  }
}