com.languagecomputer.api
Class DocumentRetrievalServiceWebClient

java.lang.Object
  extended by com.languagecomputer.api.BaseWebClient<DocumentRetrievalWebService>
      extended by com.languagecomputer.api.DocumentRetrievalServiceWebClient
All Implemented Interfaces:
DocumentRetrievalService, Service

public class DocumentRetrievalServiceWebClient
extends BaseWebClient<DocumentRetrievalWebService>
implements DocumentRetrievalService

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

Since:
1.0
Author:
Kirk Roberts

Constructor Summary
DocumentRetrievalServiceWebClient(ServiceConfig serviceConfig)
          Creates a new DocumentRetrievalServiceWebClient with the given ServiceConfig.
 
Method Summary
 String getName()
          Returns the name of the service to use for URL lookup.
protected  Class<DocumentRetrievalWebService> getWebServiceClass()
          Returns the BaseWebService class this BaseWebClient wraps.
 List<QueryResult> retrieve(Query query)
          Retrieves a List of sorted QueryResults for the given Query.
 void setPath(String path)
          Sets the location used to retrieve documents.
 
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

DocumentRetrievalServiceWebClient

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

getWebServiceClass

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

Specified by:
getWebServiceClass in class BaseWebClient<DocumentRetrievalWebService>

setPath

public void setPath(String path)
             throws IOException
Sets the location used to retrieve documents. This is an optional operation.

Specified by:
setPath in interface DocumentRetrievalService
Parameters:
path - The location to search for documents.
Throws:
IOException - If there is an issue accessing any I/O component required by the DocumentRetrievalService. Implementors may or may not validate the path and throw an exception if it is inaccessible.

retrieve

public List<QueryResult> retrieve(Query query)
Retrieves a List of sorted QueryResults for the given Query.

Specified by:
retrieve in interface DocumentRetrievalService
Parameters:
query - The Query to use. At least one of the query methods must be non-null.
Returns:
A List of retrieved QueryResults. Will be empty if this DocumentRetrievalService cannot use any of the non-null query representations.


Copyright © 2009. All Rights Reserved.