Logo Search packages:      
Sourcecode: uimaj version File versions  Download package

Root_Type.java

/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 * 
 *   http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

package aa;

import org.apache.uima.cas.Feature;
import org.apache.uima.cas.FeatureStructure;
import org.apache.uima.cas.Type;
import org.apache.uima.cas.impl.CASImpl;
import org.apache.uima.cas.impl.FSGenerator;
import org.apache.uima.cas.impl.FeatureImpl;
import org.apache.uima.cas.impl.TypeImpl;
import org.apache.uima.jcas.JCas;
import org.apache.uima.jcas.cas.TOP_Type;

/**
 * Updated by JCasGen Tue Feb 21 14:56:04 EST 2006
 * 
 * @generated
 */
00037 public class Root_Type extends TOP_Type {
  /** @generated */
00039   protected FSGenerator getFSGenerator() {
    return fsGenerator;
  }

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

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

  /**
   * @generated
   * @modifiable
   */
00067   public final static boolean featOkTst = org.apache.uima.jcas.JCasRegistry.getFeatOkTst("aa.Root");

  /** @generated */
00070   final Feature casFeat_arrayInt;

  /** @generated */
00073   final int casFeatCode_arrayInt;

  /** @generated */
00076   public int getArrayInt(int addr) {
    if (featOkTst && casFeat_arrayInt == null)
      this.jcas.throwFeatMissing("arrayInt", "aa.Root");
    return ll_cas.ll_getRefValue(addr, casFeatCode_arrayInt);
  }

  /** @generated */
00083   public void setArrayInt(int addr, int v) {
    if (featOkTst && casFeat_arrayInt == null)
      this.jcas.throwFeatMissing("arrayInt", "aa.Root");
    ll_cas.ll_setRefValue(addr, casFeatCode_arrayInt, v);
  }

  /** @generated */
00090   public int getArrayInt(int addr, int i) {
    if (featOkTst && casFeat_arrayInt == null)
      this.jcas.throwFeatMissing("arrayInt", "aa.Root");
    if (lowLevelTypeChecks)
      return ll_cas.ll_getIntArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_arrayInt), i, true);
    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_arrayInt), i);
    return ll_cas.ll_getIntArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_arrayInt), i);
  }

  /** @generated */
00100   public void setArrayInt(int addr, int i, int v) {
    if (featOkTst && casFeat_arrayInt == null)
      this.jcas.throwFeatMissing("arrayInt", "aa.Root");
    if (lowLevelTypeChecks)
      ll_cas.ll_setIntArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_arrayInt), i, v, true);
    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_arrayInt), i);
    ll_cas.ll_setIntArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_arrayInt), i, v);
  }

  /** @generated */
00110   final Feature casFeat_arrayRef;

  /** @generated */
00113   final int casFeatCode_arrayRef;

  /** @generated */
00116   public int getArrayRef(int addr) {
    if (featOkTst && casFeat_arrayRef == null)
      this.jcas.throwFeatMissing("arrayRef", "aa.Root");
    return ll_cas.ll_getRefValue(addr, casFeatCode_arrayRef);
  }

  /** @generated */
00123   public void setArrayRef(int addr, int v) {
    if (featOkTst && casFeat_arrayRef == null)
      this.jcas.throwFeatMissing("arrayRef", "aa.Root");
    ll_cas.ll_setRefValue(addr, casFeatCode_arrayRef, v);
  }

  /** @generated */
00130   public int getArrayRef(int addr, int i) {
    if (featOkTst && casFeat_arrayRef == null)
      this.jcas.throwFeatMissing("arrayRef", "aa.Root");
    if (lowLevelTypeChecks)
      return ll_cas.ll_getRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_arrayRef), i, true);
    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_arrayRef), i);
    return ll_cas.ll_getRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_arrayRef), i);
  }

  /** @generated */
00140   public void setArrayRef(int addr, int i, int v) {
    if (featOkTst && casFeat_arrayRef == null)
      this.jcas.throwFeatMissing("arrayRef", "aa.Root");
    if (lowLevelTypeChecks)
      ll_cas.ll_setRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_arrayRef), i, v, true);
    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_arrayRef), i);
    ll_cas.ll_setRefArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_arrayRef), i, v);
  }

  /** @generated */
00150   final Feature casFeat_arrayFloat;

  /** @generated */
00153   final int casFeatCode_arrayFloat;

  /** @generated */
00156   public int getArrayFloat(int addr) {
    if (featOkTst && casFeat_arrayFloat == null)
      this.jcas.throwFeatMissing("arrayFloat", "aa.Root");
    return ll_cas.ll_getRefValue(addr, casFeatCode_arrayFloat);
  }

  /** @generated */
00163   public void setArrayFloat(int addr, int v) {
    if (featOkTst && casFeat_arrayFloat == null)
      this.jcas.throwFeatMissing("arrayFloat", "aa.Root");
    ll_cas.ll_setRefValue(addr, casFeatCode_arrayFloat, v);
  }

  /** @generated */
00170   public float getArrayFloat(int addr, int i) {
    if (featOkTst && casFeat_arrayFloat == null)
      this.jcas.throwFeatMissing("arrayFloat", "aa.Root");
    if (lowLevelTypeChecks)
      return ll_cas.ll_getFloatArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_arrayFloat), i,
              true);
    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_arrayFloat), i);
    return ll_cas.ll_getFloatArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_arrayFloat), i);
  }

  /** @generated */
00181   public void setArrayFloat(int addr, int i, float v) {
    if (featOkTst && casFeat_arrayFloat == null)
      this.jcas.throwFeatMissing("arrayFloat", "aa.Root");
    if (lowLevelTypeChecks)
      ll_cas.ll_setFloatArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_arrayFloat), i, v, true);
    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_arrayFloat), i);
    ll_cas.ll_setFloatArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_arrayFloat), i, v);
  }

  /** @generated */
00191   final Feature casFeat_arrayString;

  /** @generated */
00194   final int casFeatCode_arrayString;

  /** @generated */
00197   public int getArrayString(int addr) {
    if (featOkTst && casFeat_arrayString == null)
      this.jcas.throwFeatMissing("arrayString", "aa.Root");
    return ll_cas.ll_getRefValue(addr, casFeatCode_arrayString);
  }

  /** @generated */
00204   public void setArrayString(int addr, int v) {
    if (featOkTst && casFeat_arrayString == null)
      this.jcas.throwFeatMissing("arrayString", "aa.Root");
    ll_cas.ll_setRefValue(addr, casFeatCode_arrayString, v);
  }

  /** @generated */
00211   public String getArrayString(int addr, int i) {
    if (featOkTst && casFeat_arrayString == null)
      this.jcas.throwFeatMissing("arrayString", "aa.Root");
    if (lowLevelTypeChecks)
      return ll_cas.ll_getStringArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_arrayString), i,
              true);
    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_arrayString), i);
    return ll_cas.ll_getStringArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_arrayString), i);
  }

  /** @generated */
00222   public void setArrayString(int addr, int i, String v) {
    if (featOkTst && casFeat_arrayString == null)
      this.jcas.throwFeatMissing("arrayString", "aa.Root");
    if (lowLevelTypeChecks)
      ll_cas.ll_setStringArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_arrayString), i, v,
              true);
    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_arrayString), i);
    ll_cas.ll_setStringArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_arrayString), i, v);
  }

  /** @generated */
00233   final Feature casFeat_plainInt;

  /** @generated */
00236   final int casFeatCode_plainInt;

  /** @generated */
00239   public int getPlainInt(int addr) {
    if (featOkTst && casFeat_plainInt == null)
      this.jcas.throwFeatMissing("plainInt", "aa.Root");
    return ll_cas.ll_getIntValue(addr, casFeatCode_plainInt);
  }

  /** @generated */
00246   public void setPlainInt(int addr, int v) {
    if (featOkTst && casFeat_plainInt == null)
      this.jcas.throwFeatMissing("plainInt", "aa.Root");
    ll_cas.ll_setIntValue(addr, casFeatCode_plainInt, v);
  }

  /** @generated */
00253   final Feature casFeat_plainFloat;

  /** @generated */
00256   final int casFeatCode_plainFloat;

  /** @generated */
00259   public float getPlainFloat(int addr) {
    if (featOkTst && casFeat_plainFloat == null)
      this.jcas.throwFeatMissing("plainFloat", "aa.Root");
    return ll_cas.ll_getFloatValue(addr, casFeatCode_plainFloat);
  }

  /** @generated */
00266   public void setPlainFloat(int addr, float v) {
    if (featOkTst && casFeat_plainFloat == null)
      this.jcas.throwFeatMissing("plainFloat", "aa.Root");
    ll_cas.ll_setFloatValue(addr, casFeatCode_plainFloat, v);
  }

  /** @generated */
00273   final Feature casFeat_plainString;

  /** @generated */
00276   final int casFeatCode_plainString;

  /** @generated */
00279   public String getPlainString(int addr) {
    if (featOkTst && casFeat_plainString == null)
      this.jcas.throwFeatMissing("plainString", "aa.Root");
    return ll_cas.ll_getStringValue(addr, casFeatCode_plainString);
  }

  /** @generated */
00286   public void setPlainString(int addr, String v) {
    if (featOkTst && casFeat_plainString == null)
      this.jcas.throwFeatMissing("plainString", "aa.Root");
    ll_cas.ll_setStringValue(addr, casFeatCode_plainString, v);
  }

  /** @generated */
00293   final Feature casFeat_plainRef;

  /** @generated */
00296   final int casFeatCode_plainRef;

  /** @generated */
00299   public int getPlainRef(int addr) {
    if (featOkTst && casFeat_plainRef == null)
      this.jcas.throwFeatMissing("plainRef", "aa.Root");
    return ll_cas.ll_getRefValue(addr, casFeatCode_plainRef);
  }

  /** @generated */
00306   public void setPlainRef(int addr, int v) {
    if (featOkTst && casFeat_plainRef == null)
      this.jcas.throwFeatMissing("plainRef", "aa.Root");
    ll_cas.ll_setRefValue(addr, casFeatCode_plainRef, v);
  }

  /** @generated */
00313   final Feature casFeat_concreteString;

  /** @generated */
00316   final int casFeatCode_concreteString;

  /** @generated */
00319   public String getConcreteString(int addr) {
    if (featOkTst && casFeat_concreteString == null)
      this.jcas.throwFeatMissing("concreteString", "aa.Root");
    return ll_cas.ll_getStringValue(addr, casFeatCode_concreteString);
  }

  /** @generated */
00326   public void setConcreteString(int addr, String v) {
    if (featOkTst && casFeat_concreteString == null)
      this.jcas.throwFeatMissing("concreteString", "aa.Root");
    ll_cas.ll_setStringValue(addr, casFeatCode_concreteString, v);
  }

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

    casFeat_arrayInt = jcas.getRequiredFeatureDE(casType, "arrayInt", "uima.cas.IntegerArray",
            featOkTst);
    casFeatCode_arrayInt = (null == casFeat_arrayInt) ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_arrayInt).getCode();

    casFeat_arrayRef = jcas
            .getRequiredFeatureDE(casType, "arrayRef", "uima.cas.FSArray", featOkTst);
    casFeatCode_arrayRef = (null == casFeat_arrayRef) ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_arrayRef).getCode();

    casFeat_arrayFloat = jcas.getRequiredFeatureDE(casType, "arrayFloat", "uima.cas.FloatArray",
            featOkTst);
    casFeatCode_arrayFloat = (null == casFeat_arrayFloat) ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_arrayFloat).getCode();

    casFeat_arrayString = jcas.getRequiredFeatureDE(casType, "arrayString", "uima.cas.StringArray",
            featOkTst);
    casFeatCode_arrayString = (null == casFeat_arrayString) ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_arrayString).getCode();

    casFeat_plainInt = jcas
            .getRequiredFeatureDE(casType, "plainInt", "uima.cas.Integer", featOkTst);
    casFeatCode_plainInt = (null == casFeat_plainInt) ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_plainInt).getCode();

    casFeat_plainFloat = jcas.getRequiredFeatureDE(casType, "plainFloat", "uima.cas.Float",
            featOkTst);
    casFeatCode_plainFloat = (null == casFeat_plainFloat) ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_plainFloat).getCode();

    casFeat_plainString = jcas.getRequiredFeatureDE(casType, "plainString", "uima.cas.String",
            featOkTst);
    casFeatCode_plainString = (null == casFeat_plainString) ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_plainString).getCode();

    casFeat_plainRef = jcas.getRequiredFeatureDE(casType, "plainRef", "aa.Root", featOkTst);
    casFeatCode_plainRef = (null == casFeat_plainRef) ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_plainRef).getCode();

    casFeat_concreteString = jcas.getRequiredFeatureDE(casType, "concreteString",
            "uima.cas.String", featOkTst);
    casFeatCode_concreteString = (null == casFeat_concreteString) ? JCas.INVALID_FEATURE_CODE
            : ((FeatureImpl) casFeat_concreteString).getCode();

  }
}

Generated by  Doxygen 1.6.0   Back to index