uk.ac.ebi.intact.util
Class GoServerProxy

java.lang.Object
  |
  +--uk.ac.ebi.intact.util.GoServerProxy

public class GoServerProxy
extends java.lang.Object

The proxy to the Go server. An example for the use of this class:

 GoServerProxy proxy = new GoServerProxy( "http://www.ebi.ac.uk/ego/DisplayGoTerm" );
 // Could use the default: GoServerProxy proxy = new GoServerProxy( );
 GoResponse response = proxy.query( "GO:0000074" );
 System.out.println ( response );
 

Version:
$Id: GoServerProxy.java,v 1.3 2004/02/23 14:28:52 skerrien Exp $
Author:
Samuel Kerrien (skerrien@ebi.ac.uk)
See Also:
uk.ac.ebi.intact.util.test.GoServerProxyTest

Nested Class Summary
 class GoServerProxy.GoHandler
          Parse the XML output given by the EGO web site.
static class GoServerProxy.GoIdNotFoundException
           
static class GoServerProxy.GoResponse
           
 
Field Summary
static java.lang.String DEFAULT_EGO_URL
           
static java.lang.String EGO_QUERY
           
static java.lang.String GOID_FLAG
           
 
Constructor Summary
GoServerProxy()
           
GoServerProxy(java.lang.String url)
          Constructs an instance of this class using the URL to connect to the Newt server.
 
Method Summary
 GoServerProxy.GoResponse query(java.io.InputStream is, java.lang.String goId)
          Queries the ego (http://www.ebi.ac.uk/ego) server with given GO term id.
 GoServerProxy.GoResponse query(java.lang.String goId)
          Queries the ego (http://www.ebi.ac.uk/ego) server with given GO term id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GOID_FLAG

public static final java.lang.String GOID_FLAG
See Also:
Constant Field Values

DEFAULT_EGO_URL

public static final java.lang.String DEFAULT_EGO_URL
See Also:
Constant Field Values

EGO_QUERY

public static final java.lang.String EGO_QUERY
See Also:
Constant Field Values
Constructor Detail

GoServerProxy

public GoServerProxy(java.lang.String url)
Constructs an instance of this class using the URL to connect to the Newt server.

Parameters:
url - the URL to connect to the server.

GoServerProxy

public GoServerProxy()
Method Detail

query

public GoServerProxy.GoResponse query(java.lang.String goId)
                               throws java.io.IOException,
                                      GoServerProxy.GoIdNotFoundException
Queries the ego (http://www.ebi.ac.uk/ego) server with given GO term id.

Parameters:
goId - the GO term to query the ego server.
Returns:
the GO term definition.
Throws:
java.io.IOException - for network errors.
GoServerProxy.GoIdNotFoundException - thrown when the server fails to find a response for GO id.
GoServerProxy.GoIdNotFoundException

query

public GoServerProxy.GoResponse query(java.io.InputStream is,
                                      java.lang.String goId)
                               throws java.io.IOException,
                                      GoServerProxy.GoIdNotFoundException
Queries the ego (http://www.ebi.ac.uk/ego) server with given GO term id.

Parameters:
is - the content of the GO term's XML definition.
goId - the GO term to query the ego server.
Returns:
the GO term definition.
Throws:
java.io.IOException - for network errors.
GoServerProxy.GoIdNotFoundException - thrown when the server fails to find a response for GO id.
GoServerProxy.GoIdNotFoundException


IntAct Project - EMBL-EBI 2004 - intact-help@ebi.ac.uk