Interface ResultSearchSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession, ResultQuerySession

public interface ResultSearchSession extends ResultQuerySession

This session provides methods for searching Results . The search query is constructed using the ResultQuery . The result record Type also specifies the record for the result query.

getResultsByQuery() is the basic search method and returns a list of Result elements. A more advanced search may be performed with getResultsBySearch() . It accepts a ResultSearch in addition to the query for the purpose of specifying additional options affecting the entire search, such as ordering. getResultsBySearch() returns a ResultSearchResults that can be used to access the resulting ResultList or be used to perform a search within the result set through ResultSearch .

This session defines views that offer differing behaviors for searching.

  • federated catalogue view: searches include results in catalogues of which this catalogue is an ancestor in the catalogue hierarchy
  • isolated catalogue view: searches are restricted to results in this catalogue

Results may have a query record indicated by their respective record types. The query record is accessed via the ResultQuery . The returns in this session may not be cast directly to these interfaces.

  • Method Details

    • getResultSearch

      ResultSearch getResultSearch()
      Gets a result search.
      Returns:
      the result search
      Compliance:
      mandatory - This method must be implemented.
    • getResultSearchOrder

      ResultSearchOrder getResultSearchOrder()
      Gets a result search order. The ResultSearchOrder is supplied to a ResultSearch to specify the ordering of results.
      Returns:
      the result search order
      Compliance:
      mandatory - This method must be implemented.
    • getResultsBySearch

      ResultSearchResults getResultsBySearch(ResultQuery resultQuery, ResultSearch resultSearch) throws OperationFailedException, PermissionDeniedException
      Gets the search results matching the given search.
      Parameters:
      resultQuery - the result query
      resultSearch - the result search
      Returns:
      the search results
      Throws:
      NullArgumentException - resultQuery or resultSearch is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - resultQuery or resultSearch is not of this service
      Compliance:
      mandatory - This method must be implemented.
    • getResultQueryFromInspector

      ResultQuery getResultQueryFromInspector(ResultQueryInspector resultQueryInspector)
      Gets a result query from an inspector. The inspector is available from a ResultSearchResults .
      Parameters:
      resultQueryInspector - a result query inspector
      Returns:
      the result query
      Throws:
      NullArgumentException - resultQueryInspector is null
      UnsupportedException - resultQueryInspector is not of this service
      Compliance:
      mandatory - This method must be implemented.