com.languagecomputer.api
Class DocumentRetrievalWebServiceImpl

java.lang.Object
  extended by com.languagecomputer.api.BaseWebServiceImpl
      extended by com.languagecomputer.api.DocumentRetrievalWebServiceImpl
All Implemented Interfaces:
BaseWebService, DocumentRetrievalWebService

public class DocumentRetrievalWebServiceImpl
extends BaseWebServiceImpl
implements DocumentRetrievalWebService

Implementation of DocumentRetrievalWebService.

Since:
1.0
Author:
Kirk Roberts

Field Summary
 
Fields inherited from class com.languagecomputer.api.BaseWebServiceImpl
sessionManager
 
Constructor Summary
DocumentRetrievalWebServiceImpl(SessionManager sessionManager)
          Creates a new DocumentRetrievalWebServiceImpl using the given sessionManager.
 
Method Summary
 String retrieve(String sessionID, String query, String format)
          Retrieves a list of results for the given query.
 void setPath(String sessionID, String path)
          Sets the location used to retrieve documents.
 
Methods inherited from class com.languagecomputer.api.BaseWebServiceImpl
registerSession, 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.BaseWebService
registerSession, unregisterSession
 

Constructor Detail

DocumentRetrievalWebServiceImpl

public DocumentRetrievalWebServiceImpl(SessionManager sessionManager)
Creates a new DocumentRetrievalWebServiceImpl using the given sessionManager.

Parameters:
sessionManager - The SessionManager to use for Session control.
Method Detail

setPath

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

Specified by:
setPath in interface DocumentRetrievalWebService
Parameters:
sessionID - The unique identifier String for the session for this operation.
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.
Exception

retrieve

public String retrieve(String sessionID,
                       String query,
                       String format)
                throws Exception
Retrieves a list of results for the given query.

Specified by:
retrieve in interface DocumentRetrievalWebService
Parameters:
sessionID - The unique identifier String for the session for this operation.
query - The query in the format described in the format parameter.
format - The format in which the query is in and in which the query results should be returned. Defaults to XML.
Returns:
The results of the query.
Throws:
Exception - If there was an error retrieving documents.


Copyright © 2009. All Rights Reserved.