Interface WorkSearchSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession, WorkQuerySession

public interface WorkSearchSession extends WorkQuerySession

This session provides methods for searching among Work objects. The search query is constructed using the WorkQuery.

getWorksByQuery() is the basic search method and returns a list of Works. A more advanced search may be performed with getWorksBySearch(). It accepts a WorkSearch in addition to the query for the purpose of specifying additional options affecting the entire search, such as ordering. getWorksBySearch() returns a WorkSearchResults that can be used to access the resulting WorkList or be used to perform a search within the result set through WorkSearch.

This session defines views that offer differing behaviors for searching.

  • federated foundry view: searches include works in foundries of which this foundry is an ancestor in the foundry hierarchy
  • isolated foundry view: searches are restricted to works in this foundry

Works may have a query record indicated by their respective record types. The query record is accessed via the WorkQuery.

  • Method Details

    • getWorkSearch

      WorkSearch getWorkSearch()
      Gets a work search.
      Returns:
      the work search
      Compliance:
      mandatory - This method must be implemented.
    • getWorkSearchOrder

      WorkSearchOrder getWorkSearchOrder()
      Gets a work search order. The WorkSearchOrder is supplied to a WorkSearch to specify the ordering of results.
      Returns:
      the work search order
      Compliance:
      mandatory - This method must be implemented.
    • getWorksBySearch

      Gets the search results matching the given search query using the given search.
      Parameters:
      workQuery - the work query
      workSearch - the work search order
      Returns:
      the returned search results
      Throws:
      NullArgumentException - workQuery or workSearch is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - workQuery or workSearch is not of this service
      Compliance:
      mandatory - This method must be implemented.
    • getWorkQueryFromInspector

      WorkQuery getWorkQueryFromInspector(WorkQueryInspector workQueryInspector)
      Gets a work query from an inspector. The inspector is available from a WorkSearchResults.
      Parameters:
      workQueryInspector - a work query inspector
      Returns:
      the work query
      Throws:
      NullArgumentException - workQueryInspector is null
      UnsupportedException - workQueryInspector is not of this service
      Compliance:
      mandatory - This method must be implemented.