package nsdb.NucFeaturePackage;
public class QualifierValue_uHelper
{
	private static org.omg.CORBA.TypeCode _type;
	public QualifierValue_uHelper ()
	{
	}
	public static void insert(org.omg.CORBA.Any any, nsdb.NucFeaturePackage.QualifierValue_u s)
	{
		any.type(type());
		write( any.create_output_stream(),s);
	}
	public static nsdb.NucFeaturePackage.QualifierValue_u extract(org.omg.CORBA.Any any)
	{
		return read(any.create_input_stream());
	}
	public String get_id()
	{
		return id();
	}
	public org.omg.CORBA.TypeCode get_type()
	{
		return type();
	}
	public void write_Object(org.omg.CORBA.portable.OutputStream out, java.lang.Object obj)
	{
		 throw new RuntimeException(" not implemented");
	}
	public java.lang.Object read_Object(org.omg.CORBA.portable.InputStream in)
	{
		 throw new RuntimeException(" not implemented");
	}
	public static String id()
	{
		return "IDL:nsdb/NucFeature/QualifierValue_u:1.0";
	}
	public static QualifierValue_u read(org.omg.CORBA.portable.InputStream in)
	{
		QualifierValue_u result = new QualifierValue_u();
		int disc=in.read_long();
		switch(disc)
		{
			case 22:
			{
				type.DbXref _var;
				_var=type.DbXrefHelper.read(in);
				result.db_xref(_var);
				break;
			}
			case 21:
			{
				type.RepeatUnit _var;
				_var=type.RepeatUnitHelper.read(in);
				result.repeat_unit(_var);
				break;
			}
			case 20:
			{
				type.SpliceConsensus _var;
				_var=type.SpliceConsensusHelper.read(in);
				result.splice_consensus(_var);
				break;
			}
			case 19:
			{
				type.AntiCodon _var;
				_var=type.AntiCodonHelper.read(in);
				result.anti_codon(_var);
				break;
			}
			case 18:
			{
				type.CodonTranslation _var;
				_var=type.CodonTranslationHelper.read(in);
				result.codon_translation(_var);
				break;
			}
			case 17:
			{
				type.TranslationException _var;
				_var=type.TranslationExceptionHelper.read(in);
				result.translation_exception(_var);
				break;
			}
			case 4:
			{
				float _var;
				_var=in.read_float();
				result.real(_var);
				break;
			}
			case 3:
			{
				int _var;
				_var=in.read_long();
				result.integer(_var);
				break;
			}
			case 1:
			{
				java.lang.String _var;
				_var=in.read_string();
				result.text(_var);
				break;
			}
			case 2:
			{
				boolean _var;
				_var=in.read_boolean();
				result.applicable(_var);
				break;
			}
			default: result.__default();
		}
		return result;
	}
	public static void write(org.omg.CORBA.portable.OutputStream out, QualifierValue_u s)
	{
		out.write_long(s.discriminator());;
		switch(s.discriminator())
		{
			case 22:
			{
				type.DbXrefHelper.write(out,s.db_xref());
				break;
			}
			case 21:
			{
				type.RepeatUnitHelper.write(out,s.repeat_unit());
				break;
			}
			case 20:
			{
				type.SpliceConsensusHelper.write(out,s.splice_consensus());
				break;
			}
			case 19:
			{
				type.AntiCodonHelper.write(out,s.anti_codon());
				break;
			}
			case 18:
			{
				type.CodonTranslationHelper.write(out,s.codon_translation());
				break;
			}
			case 17:
			{
				type.TranslationExceptionHelper.write(out,s.translation_exception());
				break;
			}
			case 4:
			{
				out.write_float(s.real());
				break;
			}
			case 3:
			{
				out.write_long(s.integer());
				break;
			}
			case 1:
			{
				out.write_string(s.text());
				break;
			}
			case 2:
			{
				out.write_boolean(s.applicable());
				break;
			}
		}
	}
	public static org.omg.CORBA.TypeCode type()
	{
		if( _type == null )
		{
			org.omg.CORBA.UnionMember[] members = new org.omg.CORBA.UnionMember[10];
			org.omg.CORBA.Any label_any;
			label_any = org.omg.CORBA.ORB.init().create_any();
			members[0] = new org.omg.CORBA.UnionMember("db_xref",label_any,type.DbXrefHelper.type(),null);
			label_any = org.omg.CORBA.ORB.init().create_any();
			members[1] = new org.omg.CORBA.UnionMember("repeat_unit",label_any,type.RepeatUnitHelper.type(),null);
			label_any = org.omg.CORBA.ORB.init().create_any();
			members[2] = new org.omg.CORBA.UnionMember("splice_consensus",label_any,type.SpliceConsensusHelper.type(),null);
			label_any = org.omg.CORBA.ORB.init().create_any();
			members[3] = new org.omg.CORBA.UnionMember("anti_codon",label_any,type.AntiCodonHelper.type(),null);
			label_any = org.omg.CORBA.ORB.init().create_any();
			members[4] = new org.omg.CORBA.UnionMember("codon_translation",label_any,type.CodonTranslationHelper.type(),null);
			label_any = org.omg.CORBA.ORB.init().create_any();
			members[5] = new org.omg.CORBA.UnionMember("translation_exception",label_any,type.TranslationExceptionHelper.type(),null);
			label_any = org.omg.CORBA.ORB.init().create_any();
			members[6] = new org.omg.CORBA.UnionMember("real",label_any,org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(6)),null);
			label_any = org.omg.CORBA.ORB.init().create_any();
			members[7] = new org.omg.CORBA.UnionMember("integer",label_any,org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(3)),null);
			label_any = org.omg.CORBA.ORB.init().create_any();
			members[8] = new org.omg.CORBA.UnionMember("text",label_any,org.omg.CORBA.ORB.init().create_string_tc(0),null);
			label_any = org.omg.CORBA.ORB.init().create_any();
			members[9] = new org.omg.CORBA.UnionMember("applicable",label_any,org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(8)),null);
			 _type = org.omg.CORBA.ORB.init().create_union_tc(id(),"QualifierValue_u",org.omg.CORBA.ORB.init().create_alias_tc( id(),"QualifierTypeCode",org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(3))), members);
		}
		return _type;
	}
}
