com.bookpac.server.search.document
Interface IWSSearchDocument

All Superinterfaces:
IWS

public interface IWSSearchDocument
extends IWS

Web Service for searching for or through documents.

Author:
rvuine

Method Summary
 WSTSearchDocumentResultList createBlockingPlainSearch(String token, String searchString, ArrayList<String> sources, int minResults, int timeout)
          Deprecated. use createBlockingSearch(String, String, ArrayList, int, int, String, boolean, ArrayList, ArrayList, WSTMap)
 WSTSearchDocumentResultList createBlockingSearch(String token, String searchString, ArrayList<String> sources, int minResults, int timeout, String sortBy, boolean invert, ArrayList<String> related, ArrayList<String> range, WSTMap options)
          Creates a document search using the given search string and wait until minResults results have been found.
 String createDocumentFromSearchFreeDocumentResult(String token, String searchResultID)
          Method that copies a free external document after the user checks it out, and returns the document id.
 String createDocumentFromSearchFreeDocumentResultJob(String token, String searchResultID)
          Method that queues the process of copying a free external document after the user checks it out, and returns the job id.
 String createPlainSearch(String token, String searchString, ArrayList<String> sources)
          Deprecated. use createBlockingSearch(String, String, ArrayList, int, int, String, boolean, ArrayList, ArrayList, WSTMap)
 WSTSearchDocumentResultList getResults(String token, int offset, int numberOfResults)
          Deprecated. use getResultsBySearchID(String, String, int, int)
 WSTSearchDocumentResultList getResultsBySearchID(String token, String searchID, int offset, int numberOfResults)
          Checks for document search results.
 WSTSearchDocumentResultList getResultsBySearchIDResorted(String token, String searchID, int offset, int numberOfResults, String sortBy, boolean invert)
          Checks for document search results.
 

Method Detail

createPlainSearch

@Deprecated
String createPlainSearch(String token,
                                    String searchString,
                                    ArrayList<String> sources)
                         throws WSException
Deprecated. use createBlockingSearch(String, String, ArrayList, int, int, String, boolean, ArrayList, ArrayList, WSTMap)

Creates a document search using the given search string.

Parameters:
token - a session ID or nature name e.g txtr.de / txtr.hu / etc.
searchString - a search string, according to http://lucene.apache.org/java/2_3_2/queryparsersyntax.html, see
sources - see WSTDocumentSearchSource
Returns:
a search session ID, to be used as a token in subsequent requests to this webservice
Throws:
WSException - if an error occurs

createBlockingPlainSearch

@Deprecated
WSTSearchDocumentResultList createBlockingPlainSearch(String token,
                                                                 String searchString,
                                                                 ArrayList<String> sources,
                                                                 int minResults,
                                                                 int timeout)
                                                      throws WSException
Deprecated. use createBlockingSearch(String, String, ArrayList, int, int, String, boolean, ArrayList, ArrayList, WSTMap)

Creates a document search using the given search string and wait until minResults results have been found. If the timeout is reached before the search has ended, everything found so far is returned. In that case, you can get additional results later by calling getResults(String, int, int).

Parameters:
token - a session ID or nature name e.g txtr.de / txtr.hu / etc.
searchString - a search string, according to http://lucene.apache.org/java/2_3_2/queryparsersyntax.html, see
sources - see WSTDocumentSearchSource
minResults - number of results to wait for before returning
timeout - timeout in milliseconds
Returns:
the result list
Throws:
WSException - if an error occurs

createBlockingSearch

WSTSearchDocumentResultList createBlockingSearch(String token,
                                                 String searchString,
                                                 @Nullable
                                                 ArrayList<String> sources,
                                                 int minResults,
                                                 int timeout,
                                                 @Nullable
                                                 String sortBy,
                                                 boolean invert,
                                                 @Nullable
                                                 ArrayList<String> related,
                                                 @Nullable
                                                 ArrayList<String> range,
                                                 @Nullable
                                                 WSTMap options)
                                                 throws WSException
Creates a document search using the given search string and wait until minResults results have been found. If the timeout is reached before the search has ended, everything found so far is returned. In that case, you can get additional results later by calling getResults(String, int, int).

Parameters:
token - a session ID or nature name e.g txtr.de / txtr.hu / etc.
searchString - a search string, according to http://lucene.apache.org/java/2_3_2/queryparsersyntax.html, see
sources - see WSTDocumentSearchSource
minResults - number of results to wait for before returning
timeout - timeout in milliseconds
sortBy - the results returned in the result list are sorted according to a search field. Also see getResultsBySearchID(String, String, int, int). If null is given, the default "relevance" is used for sorting.
invert - if the sort order should be inverted
related - return related objects for these search fields, use null or an empty list if you want no related results
range - return the ranges of these search fields, use null or an empty list if you want no ranges
options - see WSTDocumentSearchOption
Returns:
the result list
Throws:
WSException - if an error occurs

getResults

@Deprecated
WSTSearchDocumentResultList getResults(String token,
                                                  int offset,
                                                  int numberOfResults)
                                       throws WSException
Deprecated. use getResultsBySearchID(String, String, int, int)

Checks for document search results.

Parameters:
token - the token or nature name e.g txtr.de / txtr.hu / etc.
offset - the first result to be returned
numberOfResults - maximum number of results to be returned.
Returns:
a search result list which may contain no entries, but never be null
Throws:
WSException - if an error occurs

getResultsBySearchID

WSTSearchDocumentResultList getResultsBySearchID(String token,
                                                 String searchID,
                                                 int offset,
                                                 int numberOfResults)
                                                 throws WSException
Checks for document search results. All results that have not been returned yet are sorted according to the sortBy key that provided when the search was created.

Parameters:
token - the token or nature name e.g txtr.de / txtr.hu / etc.
searchID - the ID of the created search, must not be null
offset - the first result to be returned
numberOfResults - maximum number of results to be returned.
Returns:
the result list
Throws:
WSException - if an error occurs

getResultsBySearchIDResorted

WSTSearchDocumentResultList getResultsBySearchIDResorted(String token,
                                                         String searchID,
                                                         int offset,
                                                         int numberOfResults,
                                                         String sortBy,
                                                         boolean invert)
                                                         throws WSException
Checks for document search results. All results are sorted according to sortBy, not just the results that have not been delivered yet.

Parameters:
token - the token or nature name e.g txtr.de / txtr.hu / etc.
searchID - the ID of the created search, must not be null
offset - the first result to be returned
numberOfResults - maximum number of results to be returned.
sortBy - sort by this search field. Use null to use the same sorting as before
invert - if the sort order should be inverted
Returns:
the result list
Throws:
WSException - if an error occurs

createDocumentFromSearchFreeDocumentResult

String createDocumentFromSearchFreeDocumentResult(String token,
                                                  String searchResultID)
                                                  throws WSException
Method that copies a free external document after the user checks it out, and returns the document id.

Parameters:
token - The user token
searchResultID - The search result ID returned by the blocking search.
Returns:
Returns the id of the document created into the user's vault.
Throws:
WSException - if an error occurs

createDocumentFromSearchFreeDocumentResultJob

String createDocumentFromSearchFreeDocumentResultJob(String token,
                                                     String searchResultID)
                                                     throws WSException
Method that queues the process of copying a free external document after the user checks it out, and returns the job id. Use IWSJobMgmt.getJob(String, String) to check the status of the job.

Parameters:
token - The user token
searchResultID - The search result ID returned by the blocking search.
Returns:
Returns the id of the created job. This id can be used to query the status of the job using IWSJobMgmt.getJob(String, String)
Throws:
WSException - if an error occurs