com.languagecomputer.api
Interface DocumentRetrievalService

All Superinterfaces:
Service
All Known Implementing Classes:
DocumentRetrievalServiceWebClient

public interface DocumentRetrievalService
extends Service

Service capable of retrieving Documents given some Query.

Since:
1.0
Author:
Kirk Roberts
See Also:
Query

Method Summary
 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 interface com.languagecomputer.api.Service
getName, setSession
 

Method Detail

setPath

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

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

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

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.