com.languagecomputer.api
Class AnswerFusionServiceWebClient

java.lang.Object
  extended by com.languagecomputer.api.BaseWebClient<AnswerFusionWebService>
      extended by com.languagecomputer.api.AnswerFusionServiceWebClient
All Implemented Interfaces:
AnswerFusionService, Service

public class AnswerFusionServiceWebClient
extends BaseWebClient<AnswerFusionWebService>
implements AnswerFusionService

Web service client wrapper for the AnswerFusionService. Handles all the web service interaction code. Combined with the AnswerFusionService class, this provides a java-to-java interaction that masks the web service functionality.

Since:
1.0
Author:
Kirk Roberts

Constructor Summary
AnswerFusionServiceWebClient(ServiceConfig serviceConfig)
          Creates a new AnswerFusionServiceWebClient with the given ServiceConfig.
 
Method Summary
 List<Answer> fuseAnswers(Query query, List<Answer> answers)
          Fuses the given Answers to the given Query into a new list of Answers.
 String getName()
          Returns the name of the service to use for URL lookup.
protected  Class<AnswerFusionWebService> getWebServiceClass()
          Returns the BaseWebService class this BaseWebClient wraps.
 
Methods inherited from class com.languagecomputer.api.BaseWebClient
disconnect, getSessionID, getWebService, registerSession, sessionRegistered, setSession, setSessionID, unregisterSession
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.languagecomputer.api.Service
setSession
 

Constructor Detail

AnswerFusionServiceWebClient

public AnswerFusionServiceWebClient(ServiceConfig serviceConfig)
Creates a new AnswerFusionServiceWebClient with the given ServiceConfig.

Method Detail

getName

public String getName()
Returns the name of the service to use for URL lookup.

Specified by:
getName in interface Service
Specified by:
getName in class BaseWebClient<AnswerFusionWebService>

getWebServiceClass

protected Class<AnswerFusionWebService> getWebServiceClass()
Returns the BaseWebService class this BaseWebClient wraps.

Specified by:
getWebServiceClass in class BaseWebClient<AnswerFusionWebService>

fuseAnswers

public List<Answer> fuseAnswers(Query query,
                                List<Answer> answers)
Fuses the given Answers to the given Query into a new list of Answers.

Specified by:
fuseAnswers in interface AnswerFusionService
Parameters:
query - Query the Answers respond to.
answers - Initial Answers.
Returns:
A List of sorted Answers to the given query.


Copyright © 2009. All Rights Reserved.