package nsdb.NucFeaturePackage;


/**
* nsdb/NucFeaturePackage/QualifierValue_u.java .
* Generated by the IDL-to-Java compiler (portable), version "3.1"
* from corba/nsdb.idl
* Friday, February 25, 2005 10:35:45 AM GMT
*/

public final class QualifierValue_u implements org.omg.CORBA.portable.IDLEntity
{
  private boolean ___applicable;
  private String ___text;
  private int ___integer;
  private float ___real;
  private type.TranslationException ___translation_exception;
  private type.CodonTranslation ___codon_translation;
  private type.AntiCodon ___anti_codon;
  private type.SpliceConsensus ___splice_consensus;
  private type.RepeatUnit ___repeat_unit;
  private type.DbXref ___db_xref;
  private int __discriminator;
  private boolean __uninitialized = true;

  public QualifierValue_u ()
  {
  }

  public int discriminator ()
  {
    if (__uninitialized)
      throw new org.omg.CORBA.BAD_OPERATION ();
    return __discriminator;
  }

  public boolean applicable ()
  {
    if (__uninitialized)
      throw new org.omg.CORBA.BAD_OPERATION ();
    verifyapplicable (__discriminator);
    return ___applicable;
  }

  public void applicable (boolean value)
  {
    __discriminator = nsdb.NucFeature.boolean_qtc;
    ___applicable = value;
    __uninitialized = false;
  }

  public void applicable (int discriminator, boolean value)
  {
    verifyapplicable (discriminator);
    __discriminator = discriminator;
    ___applicable = value;
    __uninitialized = false;
  }

  private void verifyapplicable (int discriminator)
  {
    if (discriminator != nsdb.NucFeature.boolean_qtc)
      throw new org.omg.CORBA.BAD_OPERATION ();
  }

  public String text ()
  {
    if (__uninitialized)
      throw new org.omg.CORBA.BAD_OPERATION ();
    verifytext (__discriminator);
    return ___text;
  }

  public void text (String value)
  {
    __discriminator = nsdb.NucFeature.string_qtc;
    ___text = value;
    __uninitialized = false;
  }

  public void text (int discriminator, String value)
  {
    verifytext (discriminator);
    __discriminator = discriminator;
    ___text = value;
    __uninitialized = false;
  }

  private void verifytext (int discriminator)
  {
    if (discriminator != nsdb.NucFeature.string_qtc)
      throw new org.omg.CORBA.BAD_OPERATION ();
  }

  public int integer ()
  {
    if (__uninitialized)
      throw new org.omg.CORBA.BAD_OPERATION ();
    verifyinteger (__discriminator);
    return ___integer;
  }

  public void integer (int value)
  {
    __discriminator = nsdb.NucFeature.integer_qtc;
    ___integer = value;
    __uninitialized = false;
  }

  public void integer (int discriminator, int value)
  {
    verifyinteger (discriminator);
    __discriminator = discriminator;
    ___integer = value;
    __uninitialized = false;
  }

  private void verifyinteger (int discriminator)
  {
    if (discriminator != nsdb.NucFeature.integer_qtc)
      throw new org.omg.CORBA.BAD_OPERATION ();
  }

  public float real ()
  {
    if (__uninitialized)
      throw new org.omg.CORBA.BAD_OPERATION ();
    verifyreal (__discriminator);
    return ___real;
  }

  public void real (float value)
  {
    __discriminator = nsdb.NucFeature.real_qtc;
    ___real = value;
    __uninitialized = false;
  }

  public void real (int discriminator, float value)
  {
    verifyreal (discriminator);
    __discriminator = discriminator;
    ___real = value;
    __uninitialized = false;
  }

  private void verifyreal (int discriminator)
  {
    if (discriminator != nsdb.NucFeature.real_qtc)
      throw new org.omg.CORBA.BAD_OPERATION ();
  }

  public type.TranslationException translation_exception ()
  {
    if (__uninitialized)
      throw new org.omg.CORBA.BAD_OPERATION ();
    verifytranslation_exception (__discriminator);
    return ___translation_exception;
  }

  public void translation_exception (type.TranslationException value)
  {
    __discriminator = nsdb.NucFeature.TranslationException_qtc;
    ___translation_exception = value;
    __uninitialized = false;
  }

  public void translation_exception (int discriminator, type.TranslationException value)
  {
    verifytranslation_exception (discriminator);
    __discriminator = discriminator;
    ___translation_exception = value;
    __uninitialized = false;
  }

  private void verifytranslation_exception (int discriminator)
  {
    if (discriminator != nsdb.NucFeature.TranslationException_qtc)
      throw new org.omg.CORBA.BAD_OPERATION ();
  }

  public type.CodonTranslation codon_translation ()
  {
    if (__uninitialized)
      throw new org.omg.CORBA.BAD_OPERATION ();
    verifycodon_translation (__discriminator);
    return ___codon_translation;
  }

  public void codon_translation (type.CodonTranslation value)
  {
    __discriminator = nsdb.NucFeature.CodonTranslation_qtc;
    ___codon_translation = value;
    __uninitialized = false;
  }

  public void codon_translation (int discriminator, type.CodonTranslation value)
  {
    verifycodon_translation (discriminator);
    __discriminator = discriminator;
    ___codon_translation = value;
    __uninitialized = false;
  }

  private void verifycodon_translation (int discriminator)
  {
    if (discriminator != nsdb.NucFeature.CodonTranslation_qtc)
      throw new org.omg.CORBA.BAD_OPERATION ();
  }

  public type.AntiCodon anti_codon ()
  {
    if (__uninitialized)
      throw new org.omg.CORBA.BAD_OPERATION ();
    verifyanti_codon (__discriminator);
    return ___anti_codon;
  }

  public void anti_codon (type.AntiCodon value)
  {
    __discriminator = nsdb.NucFeature.Anticodon_qtc;
    ___anti_codon = value;
    __uninitialized = false;
  }

  public void anti_codon (int discriminator, type.AntiCodon value)
  {
    verifyanti_codon (discriminator);
    __discriminator = discriminator;
    ___anti_codon = value;
    __uninitialized = false;
  }

  private void verifyanti_codon (int discriminator)
  {
    if (discriminator != nsdb.NucFeature.Anticodon_qtc)
      throw new org.omg.CORBA.BAD_OPERATION ();
  }

  public type.SpliceConsensus splice_consensus ()
  {
    if (__uninitialized)
      throw new org.omg.CORBA.BAD_OPERATION ();
    verifysplice_consensus (__discriminator);
    return ___splice_consensus;
  }

  public void splice_consensus (type.SpliceConsensus value)
  {
    __discriminator = nsdb.NucFeature.SpliceConsensus_qtc;
    ___splice_consensus = value;
    __uninitialized = false;
  }

  public void splice_consensus (int discriminator, type.SpliceConsensus value)
  {
    verifysplice_consensus (discriminator);
    __discriminator = discriminator;
    ___splice_consensus = value;
    __uninitialized = false;
  }

  private void verifysplice_consensus (int discriminator)
  {
    if (discriminator != nsdb.NucFeature.SpliceConsensus_qtc)
      throw new org.omg.CORBA.BAD_OPERATION ();
  }

  public type.RepeatUnit repeat_unit ()
  {
    if (__uninitialized)
      throw new org.omg.CORBA.BAD_OPERATION ();
    verifyrepeat_unit (__discriminator);
    return ___repeat_unit;
  }

  public void repeat_unit (type.RepeatUnit value)
  {
    __discriminator = nsdb.NucFeature.RepeatUnit_qtc;
    ___repeat_unit = value;
    __uninitialized = false;
  }

  public void repeat_unit (int discriminator, type.RepeatUnit value)
  {
    verifyrepeat_unit (discriminator);
    __discriminator = discriminator;
    ___repeat_unit = value;
    __uninitialized = false;
  }

  private void verifyrepeat_unit (int discriminator)
  {
    if (discriminator != nsdb.NucFeature.RepeatUnit_qtc)
      throw new org.omg.CORBA.BAD_OPERATION ();
  }

  public type.DbXref db_xref ()
  {
    if (__uninitialized)
      throw new org.omg.CORBA.BAD_OPERATION ();
    verifydb_xref (__discriminator);
    return ___db_xref;
  }

  public void db_xref (type.DbXref value)
  {
    __discriminator = nsdb.NucFeature.DbXref_qtc;
    ___db_xref = value;
    __uninitialized = false;
  }

  public void db_xref (int discriminator, type.DbXref value)
  {
    verifydb_xref (discriminator);
    __discriminator = discriminator;
    ___db_xref = value;
    __uninitialized = false;
  }

  private void verifydb_xref (int discriminator)
  {
    if (discriminator != nsdb.NucFeature.DbXref_qtc)
      throw new org.omg.CORBA.BAD_OPERATION ();
  }

  public void _default ()
  {
    __discriminator = -2147483648;
    __uninitialized = false;
  }

  public void _default (int discriminator)
  {
    verifyDefault( discriminator ) ;
    __discriminator = discriminator ;
    __uninitialized = false;
  }

  private void verifyDefault( int value )
  {
    switch (value) {
      case nsdb.NucFeature.boolean_qtc:
      case nsdb.NucFeature.string_qtc:
      case nsdb.NucFeature.integer_qtc:
      case nsdb.NucFeature.real_qtc:
      case nsdb.NucFeature.TranslationException_qtc:
      case nsdb.NucFeature.CodonTranslation_qtc:
      case nsdb.NucFeature.Anticodon_qtc:
      case nsdb.NucFeature.SpliceConsensus_qtc:
      case nsdb.NucFeature.RepeatUnit_qtc:
      case nsdb.NucFeature.DbXref_qtc:
        throw new org.omg.CORBA.BAD_OPERATION() ;

      default:
        return;
    }
  }

} // class QualifierValue_u
