Version: 1.1.1

de.mpg.mpiz_koeln.featureClient
Class FeatureClientResult

java.lang.Object
  extended by de.mpg.mpiz_koeln.featureClient.FeatureClientResult

public class FeatureClientResult
extends Object

The class FeatureClientResult stores the results of a service call from the FeatureClient.

It provides some utility methods to retrieve a webservice result depending if the service was called only once getSingleCallResult() or multiple times getMultipleCallResult().

It additionally stores the MobyService itself to determine which service returned this result. This is needed as this structure is used in case of calling several webservices. In that case one needs to know which results comes from which service.

Author:
Andreas Groscurth

Method Summary
 MobyService getMobyService()
          Returns the BioMOBY service which was called
<T> Collection<T>
getMulipleCallResult(String id)
          Returns the result from a multiple job call for a specific job id.
<T> Collection<T>
getMulitpliCallResultAsOne()
           
<T> Map<String,Collection<T>>
getMultipleCallResult()
          Returns the result from a multiple job call.
<T> Collection<T>
getSingleCallResult()
          Returns the result for a simple, one-time call (so non multiple call).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getMobyService

public MobyService getMobyService()
Returns the BioMOBY service which was called

Returns:
the web service

getSingleCallResult

public <T> Collection<T> getSingleCallResult()
                                  throws FeatureClientException
Returns the result for a simple, one-time call (so non multiple call). The results are returned as a list, as a service might have returned a set of objects. If a service only returns one object the list has the size one.

Type Parameters:
T - the concrete MobyObject (such as AminoAcidSequence etc)
Returns:
a collection with the result objects
Throws:
FeatureClientException - if the casting in the concrete object failed

getMulipleCallResult

public <T> Collection<T> getMulipleCallResult(String id)
                                   throws FeatureClientException
Returns the result from a multiple job call for a specific job id. If a service was called with the simple object type the id is the object identifier. If a service was called with a complex data type or more than one input, the user had to give a specific identifier which is then used here.

Type Parameters:
T - the concrete MobyObject (such as AminoAcidSequence etc)
Parameters:
id - the job id - normally the identifier of the input object
Returns:
a collection of returned objects or null if the job id could not be found
Throws:
FeatureClientException

getMultipleCallResult

public <T> Map<String,Collection<T>> getMultipleCallResult()
                                                throws FeatureClientException
Returns the result from a multiple job call. The map stores for each job identifier the list of returned objects. If a service was called with the simple object type the id of the object is the identifier. If a service was called with a complex data type or more than one input, the user had to give a specific identifier which is then also used here.

Type Parameters:
T - the concrete MobyObject (such as AminoAcidSequence etc)
Returns:
a map mapping the job id with the corresponding collection of result objects
Throws:
FeatureClientException

getMulitpliCallResultAsOne

public <T> Collection<T> getMulitpliCallResultAsOne()
                                         throws FeatureClientException
Throws:
FeatureClientException

Version: 1.1.1

Submit a bug or feature
Generated: Sat May 29 04:26:35 EDT 2010