com.languagecomputer.api
Class AnswerExtractionServiceWebClient

java.lang.Object
  extended by com.languagecomputer.api.BaseWebClient<AnswerExtractionWebService>
      extended by com.languagecomputer.api.AnswerExtractionServiceWebClient
All Implemented Interfaces:
AnswerExtractionService, Service

public class AnswerExtractionServiceWebClient
extends BaseWebClient<AnswerExtractionWebService>
implements AnswerExtractionService

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

Since:
1.0
Author:
Kirk Roberts

Constructor Summary
AnswerExtractionServiceWebClient(ServiceConfig serviceConfig)
          Creates a new AnswerExtractionServiceWebClient with the given ServiceConfig.
 
Method Summary
 List<Answer> extractAnswers(Query query, List<QueryResult> queryResults)
          Extracts Answers for the given Query from the given QueryResults.
 String getName()
          Returns the name of the service to use for URL lookup.
protected  Class<AnswerExtractionWebService> 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

AnswerExtractionServiceWebClient

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

getWebServiceClass

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

Specified by:
getWebServiceClass in class BaseWebClient<AnswerExtractionWebService>

extractAnswers

public List<Answer> extractAnswers(Query query,
                                   List<QueryResult> queryResults)
Extracts Answers for the given Query from the given QueryResults.

Specified by:
extractAnswers in interface AnswerExtractionService
Parameters:
query - Query to find Answers for.
queryResults - QueryResults to find Answers to the query in.
Returns:
A List of sorted Answers to the given query.


Copyright © 2009. All Rights Reserved.