org.ispheres.shared.process
Interface SearchPublicInterface

All Known Implementing Classes:
Search, SearchClient, SearchLocalCollection, SearchRemoteCollection

public interface SearchPublicInterface

An interface defining the public functions of a Search, only functions defined in this interface are accessible to the outside world via SOAP.

Author:
Clinton Freeman mochumbo@users.sourceforge.net

Method Summary
 void close()
          This function is used by nice clients to indicate to the iSphere that they have finished with the search and that it can be removed from the system.
 int getNumResults()
          This function returns the total number of results matching the initial search query that has been found to date.
 int getOffset()
          Search results are broken into pages, and as the user thumbs through these pages the offSet within the searchResult listing changes (the offSet indicates where in the search result listing the user is).
 MetadataObject[] getResults(int offSet, boolean universal)
          This function returns a page of results (an array of MetadataObjects).
 boolean hasTalliedAll()
           
 boolean isBufferFull()
           
 boolean isNextFull()
           
 boolean isPrevFull()
           
 MetadataObject[] next(boolean universal)
          This function returns an array of metadata objects which are in the next page of results.
 MetadataObject[] prev(boolean universal)
          This function returns an array of MetadataObjects which are in the previous page of results.
 

Method Detail

close

void close()
           throws ISphereException
This function is used by nice clients to indicate to the iSphere that they have finished with the search and that it can be removed from the system.

Throws:
ISphereException - When unable to get close the search on the parent ISphere.

getNumResults

int getNumResults()
                  throws ISphereException
This function returns the total number of results matching the initial search query that has been found to date. Please note that the num results may change with time as the search progresses.

Returns:
A positive int indicating the total matches found.
Throws:
ISphereException - when unable to get the total number of results found by the search.

getOffset

int getOffset()
              throws ISphereException
Search results are broken into pages, and as the user thumbs through these pages the offSet within the searchResult listing changes (the offSet indicates where in the search result listing the user is).

Returns:
A positive int indicating the position of the client within the serach results.
Throws:
ISphereException - when unable to fetch the current offSet within all the search results.

getResults

MetadataObject[] getResults(int offSet,
                            boolean universal)
                            throws ISphereException
This function returns a page of results (an array of MetadataObjects). The user may use this function to jump or seek to specific point in the search results.

Parameters:
offSet - The offset to use as the starting point of the results page.
universal - Return the results in either the local or universal schema. When true, return them in the universal schema, otherwise return in the local schema.
Returns:
The desired page of search results (an array of MetadataObjects).
Throws:
ISphereException - thrown when unable to jump to a specific page of results.

hasTalliedAll

boolean hasTalliedAll()
                      throws ISphereException
Returns:
True if the search has found all matching search results. False otherwise.
Throws:
ISphereException - thrown when unable to determine if all the matching results have been tallied.

isBufferFull

boolean isBufferFull()
                     throws ISphereException
Returns:
This function returns true if the search buffer is full, false otherwise.
Throws:
ISphereException - thrown when unable to dettermine if the search buffer is full or not.

isNextFull

boolean isNextFull()
                   throws ISphereException
Returns:
This function returns true if the search buffer has enough entries to call next.
Throws:
ISphereException - thrown when unable to determine if the search buffer has enough entries to call next or not.

isPrevFull

boolean isPrevFull()
                   throws ISphereException
Returns:
This function returns true if the search buffer has enough entries to call prev.
Throws:
ISphereException - thrown when unable to determine if the search buffer has enough entries to call prev or not.

next

MetadataObject[] next(boolean universal)
                      throws ISphereException
This function returns an array of metadata objects which are in the next page of results. This essentially provides the action of thumbing forward in the results.

Parameters:
universal - Return the results in either the local or universal schema. When true, return them in the universal schema, otherwise return in the local schema.
Returns:
The next page of search results (an array of MetadataObjects).
Throws:
ISphereException - thrown when unable to fetch the next page of results

prev

MetadataObject[] prev(boolean universal)
                      throws ISphereException
This function returns an array of MetadataObjects which are in the previous page of results. This essentially provides the action of thumbing backwards in the results.

Parameters:
universal - Return the results in either the local or universal schema. When true, return them in the universal schema, otherwise return in the local schema.
Returns:
The prev page of search results (an array of MetadataObjects).
Throws:
ISphereException - thrown when unable to fetch the previous page of results.


Copyright © 2004-2005 The Archaeological Computing Laboratory, University of Sydney. All Rights Reserved.