package nsdb;

/** stream-based skeleton class */

public abstract class EmblSeqPOA
	extends org.omg.PortableServer.Servant
	implements org.omg.CORBA.portable.InvokeHandler, nsdb.EmblSeqOperations
{
	static private final java.util.Hashtable m_opsHash = new java.util.Hashtable();
	static
	{
		m_opsHash.put ( "getCountC", new java.lang.Integer(0));
		m_opsHash.put ( "getNucFeatures", new java.lang.Integer(1));
		m_opsHash.put ( "getCountA", new java.lang.Integer(2));
		m_opsHash.put ( "getNucFeaturesByKey", new java.lang.Integer(3));
		m_opsHash.put ( "getReferences", new java.lang.Integer(4));
		m_opsHash.put ( "getKeywords", new java.lang.Integer(5));
		m_opsHash.put ( "getLength", new java.lang.Integer(6));
		m_opsHash.put ( "getMoleculeType", new java.lang.Integer(7));
		m_opsHash.put ( "getAnySeq", new java.lang.Integer(8));
		m_opsHash.put ( "getDbXrefs", new java.lang.Integer(9));
		m_opsHash.put ( "getTopology", new java.lang.Integer(10));
		m_opsHash.put ( "getEntryVersion", new java.lang.Integer(11));
		m_opsHash.put ( "getReferenceLocation", new java.lang.Integer(12));
		m_opsHash.put ( "getCheckSum", new java.lang.Integer(13));
		m_opsHash.put ( "getDescription", new java.lang.Integer(14));
		m_opsHash.put ( "getBioSeqVersion", new java.lang.Integer(15));
		m_opsHash.put ( "getBioSeqId", new java.lang.Integer(16));
		m_opsHash.put ( "getSubSeqByFeature", new java.lang.Integer(17));
		m_opsHash.put ( "getComments", new java.lang.Integer(18));
		m_opsHash.put ( "getLocalLocation", new java.lang.Integer(19));
		m_opsHash.put ( "getSecondaryIds", new java.lang.Integer(20));
		m_opsHash.put ( "getCountT", new java.lang.Integer(21));
		m_opsHash.put ( "getSubSeq", new java.lang.Integer(22));
		m_opsHash.put ( "getEntryStatus", new java.lang.Integer(23));
		m_opsHash.put ( "getCountG", new java.lang.Integer(24));
		m_opsHash.put ( "getEntryName", new java.lang.Integer(25));
		m_opsHash.put ( "getOrganisms", new java.lang.Integer(26));
		m_opsHash.put ( "getRevisions", new java.lang.Integer(27));
		m_opsHash.put ( "getSeq", new java.lang.Integer(28));
	}
	private String[] ids = {"IDL:nsdb/EmblSeq:1.0","IDL:nsdb/EntryInfo:1.0","IDL:nsdb/NucSeq:1.0","IDL:seqdb/SeqInfo:1.0","IDL:seqdb/BioSeq:1.0"};
	public nsdb.EmblSeq _this()
	{
		return nsdb.EmblSeqHelper.narrow(_this_object());
	}
	public nsdb.EmblSeq _this(org.omg.CORBA.ORB orb)
	{
		return nsdb.EmblSeqHelper.narrow(_this_object(orb));
	}
	public org.omg.CORBA.portable.OutputStream _invoke(String method, org.omg.CORBA.portable.InputStream _input, org.omg.CORBA.portable.ResponseHandler handler)
		throws org.omg.CORBA.SystemException
	{
		org.omg.CORBA.portable.OutputStream _out = null;
		// do something
		// quick lookup of operation
		java.lang.Integer opsIndex = (java.lang.Integer)m_opsHash.get ( method );
		if ( null == opsIndex )
			throw new org.omg.CORBA.BAD_OPERATION(method + " not found");
		switch ( opsIndex.intValue() )
		{
			case 0: // getCountC
			{
				_out = handler.createReply();
				_out.write_long(getCountC());
				break;
			}
			case 1: // getNucFeatures
			{
			try
			{
				_out = handler.createReply();
				nsdb.NucFeatureListHelper.write(_out,getNucFeatures());
			}
			catch(type.NoResult _ex0)
			{
				_out = handler.createExceptionReply();
				type.NoResultHelper.write(_out, _ex0);
			}
				break;
			}
			case 2: // getCountA
			{
				_out = handler.createReply();
				_out.write_long(getCountA());
				break;
			}
			case 3: // getNucFeaturesByKey
			{
			try
			{
				java.lang.String _arg0=_input.read_string();
				_out = handler.createReply();
				nsdb.NucFeatureListHelper.write(_out,getNucFeaturesByKey(_arg0));
			}
			catch(type.NoResult _ex0)
			{
				_out = handler.createExceptionReply();
				type.NoResultHelper.write(_out, _ex0);
			}
			catch(type.InvalidArgumentValue _ex1)
			{
				_out = handler.createExceptionReply();
				type.InvalidArgumentValueHelper.write(_out, _ex1);
			}
				break;
			}
			case 4: // getReferences
			{
			try
			{
				_out = handler.createReply();
				type.DbXrefListHelper.write(_out,getReferences());
			}
			catch(type.NoResult _ex0)
			{
				_out = handler.createExceptionReply();
				type.NoResultHelper.write(_out, _ex0);
			}
				break;
			}
			case 5: // getKeywords
			{
			try
			{
				_out = handler.createReply();
				type.stringListHelper.write(_out,getKeywords());
			}
			catch(type.NoResult _ex0)
			{
				_out = handler.createExceptionReply();
				type.NoResultHelper.write(_out, _ex0);
			}
				break;
			}
			case 6: // getLength
			{
				_out = handler.createReply();
				_out.write_long(getLength());
				break;
			}
			case 7: // getMoleculeType
			{
				_out = handler.createReply();
				_out.write_string(getMoleculeType());
				break;
			}
			case 8: // getAnySeq
			{
				_out = handler.createReply();
				_out.write_any(getAnySeq());
				break;
			}
			case 9: // getDbXrefs
			{
			try
			{
				_out = handler.createReply();
				type.DbXrefListHelper.write(_out,getDbXrefs());
			}
			catch(type.NoResult _ex0)
			{
				_out = handler.createExceptionReply();
				type.NoResultHelper.write(_out, _ex0);
			}
				break;
			}
			case 10: // getTopology
			{
				_out = handler.createReply();
				_out.write_string(getTopology());
				break;
			}
			case 11: // getEntryVersion
			{
				_out = handler.createReply();
				_out.write_long(getEntryVersion());
				break;
			}
			case 12: // getReferenceLocation
			{
			try
			{
				java.lang.String _arg0=_input.read_string();
				_out = handler.createReply();
				nsdb.LocationHelper.write(_out,getReferenceLocation(_arg0));
			}
			catch(type.InvalidRelation _ex0)
			{
				_out = handler.createExceptionReply();
				type.InvalidRelationHelper.write(_out, _ex0);
			}
			catch(type.NoResult _ex1)
			{
				_out = handler.createExceptionReply();
				type.NoResultHelper.write(_out, _ex1);
			}
				break;
			}
			case 13: // getCheckSum
			{
				_out = handler.createReply();
				_out.write_long(getCheckSum());
				break;
			}
			case 14: // getDescription
			{
			try
			{
				_out = handler.createReply();
				_out.write_string(getDescription());
			}
			catch(type.NoResult _ex0)
			{
				_out = handler.createExceptionReply();
				type.NoResultHelper.write(_out, _ex0);
			}
				break;
			}
			case 15: // getBioSeqVersion
			{
				_out = handler.createReply();
				_out.write_long(getBioSeqVersion());
				break;
			}
			case 16: // getBioSeqId
			{
				_out = handler.createReply();
				_out.write_string(getBioSeqId());
				break;
			}
			case 17: // getSubSeqByFeature
			{
			try
			{
				nsdb.NucFeature _arg0=nsdb.NucFeatureHelper.read(_input);
				_out = handler.createReply();
				_out.write_string(getSubSeqByFeature(_arg0));
			}
			catch(type.InvalidRelation _ex0)
			{
				_out = handler.createExceptionReply();
				type.InvalidRelationHelper.write(_out, _ex0);
			}
			catch(nsdb.InexactLocation _ex1)
			{
				_out = handler.createExceptionReply();
				nsdb.InexactLocationHelper.write(_out, _ex1);
			}
				break;
			}
			case 18: // getComments
			{
			try
			{
				_out = handler.createReply();
				type.stringListHelper.write(_out,getComments());
			}
			catch(type.NoResult _ex0)
			{
				_out = handler.createExceptionReply();
				type.NoResultHelper.write(_out, _ex0);
			}
				break;
			}
			case 19: // getLocalLocation
			{
			try
			{
				nsdb.NucFeature _arg0=nsdb.NucFeatureHelper.read(_input);
				_out = handler.createReply();
				nsdb.LocationHelper.write(_out,getLocalLocation(_arg0));
			}
			catch(type.InvalidRelation _ex0)
			{
				_out = handler.createExceptionReply();
				type.InvalidRelationHelper.write(_out, _ex0);
			}
				break;
			}
			case 20: // getSecondaryIds
			{
				_out = handler.createReply();
				type.stringListHelper.write(_out,getSecondaryIds());
				break;
			}
			case 21: // getCountT
			{
				_out = handler.createReply();
				_out.write_long(getCountT());
				break;
			}
			case 22: // getSubSeq
			{
			try
			{
				int _arg0=_input.read_long();
				int _arg1=_input.read_long();
				_out = handler.createReply();
				_out.write_string(getSubSeq(_arg0,_arg1));
			}
			catch(type.IndexOutOfRange _ex0)
			{
				_out = handler.createExceptionReply();
				type.IndexOutOfRangeHelper.write(_out, _ex0);
			}
				break;
			}
			case 23: // getEntryStatus
			{
				_out = handler.createReply();
				_out.write_string(getEntryStatus());
				break;
			}
			case 24: // getCountG
			{
				_out = handler.createReply();
				_out.write_long(getCountG());
				break;
			}
			case 25: // getEntryName
			{
				_out = handler.createReply();
				_out.write_string(getEntryName());
				break;
			}
			case 26: // getOrganisms
			{
			try
			{
				_out = handler.createReply();
				type.DbXrefListHelper.write(_out,getOrganisms());
			}
			catch(type.NoResult _ex0)
			{
				_out = handler.createExceptionReply();
				type.NoResultHelper.write(_out, _ex0);
			}
				break;
			}
			case 27: // getRevisions
			{
				_out = handler.createReply();
				type.RevisionListHelper.write(_out,getRevisions());
				break;
			}
			case 28: // getSeq
			{
				_out = handler.createReply();
				_out.write_string(getSeq());
				break;
			}
		}
		return _out;
	}

	public String[] _all_interfaces(org.omg.PortableServer.POA poa, byte[] obj_id)
	{
		return ids;
	}
}
