com.languagecomputer.api
Class QuestionAnsweringServiceWebClient

java.lang.Object
  extended by com.languagecomputer.api.BaseWebClient<QuestionAnsweringWebService>
      extended by com.languagecomputer.api.QuestionAnsweringServiceWebClient
All Implemented Interfaces:
QuestionAnsweringService, Service

public class QuestionAnsweringServiceWebClient
extends BaseWebClient<QuestionAnsweringWebService>
implements QuestionAnsweringService

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

Since:
1.0
Author:
Kirk Roberts

Constructor Summary
QuestionAnsweringServiceWebClient(ServiceConfig serviceConfig)
          Creates a new QuestionAnsweringServiceWebClient with the given ServiceConfig.
 
Method Summary
 List<Answer> getAnswers(Query query)
          Finds answers to the given Query (optional operation).
 List<Answer> getAnswers(String question)
          Finds answers to the given question. The QuestionAnsweringWebService does not support this method, so calls are redirected to getAnswers(Query).
 String getName()
          Returns the name of the service to use for URL lookup.
protected  Class<QuestionAnsweringWebService> 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

QuestionAnsweringServiceWebClient

public QuestionAnsweringServiceWebClient(ServiceConfig serviceConfig)
Creates a new QuestionAnsweringServiceWebClient 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<QuestionAnsweringWebService>

getWebServiceClass

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

Specified by:
getWebServiceClass in class BaseWebClient<QuestionAnsweringWebService>

getAnswers

public List<Answer> getAnswers(String question)
Finds answers to the given question. The QuestionAnsweringWebService does not support this method, so calls are redirected to getAnswers(Query).

Specified by:
getAnswers in interface QuestionAnsweringService
Parameters:
question - The String question to find answers to. Cannot be null.
Returns:
A List of Answers to the question.

getAnswers

public List<Answer> getAnswers(Query query)
Finds answers to the given Query (optional operation). This method may optionally be implemented in order to allow the caller to override specific elements of the Query.

Specified by:
getAnswers in interface QuestionAnsweringService
Parameters:
query - The Query to find answers to. Cannot be null.
Returns:
A List of Answers to the question.


Copyright © 2009. All Rights Reserved.