Interface ResourceSearchSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession, ResourceQuerySession

public interface ResourceSearchSession extends ResourceQuerySession

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

getResourcesByQuery() is the basic search method and returns a list of Resources . A more advanced search may be performed with getResourcesBySearch() .It accepts an ResourceSearch in addition to the query for the purpose of specifying additional options affecting the entire search, such as ordering. getResourcesBySearch() returns an ResourceSearchResults that can be used to access the resulting ResourceList or be used to perform a search within the result set through ResourceList .

This session defines views that offer differing behaviors for searching.

  • federated bin view: searches include resources in bins of which this bin is an ancestor in the bin hierarchy
  • isolated bin view: searches are restricted to resources in this bin

Resources may have a resource query record indicated by their respective record types. The resource query record is accessed via the ResourceQuery .

  • Method Details

    • getResourceSearch

      ResourceSearch getResourceSearch()
      Gets a resource search.
      Returns:
      the resource search
      Compliance:
      mandatory - This method must be implemented.
    • getResourceSearchOrder

      ResourceSearchOrder getResourceSearchOrder()
      Gets a resource search order. The ResourceSearchOrder is supplied to a ResourceSearch to specify the ordering of results.
      Returns:
      the resource search order
      Compliance:
      mandatory - This method must be implemented.
    • getResourcesBySearch

      ResourceSearchResults getResourcesBySearch(ResourceQuery resourceQuery, ResourceSearch resourceSearch) throws OperationFailedException, PermissionDeniedException
      Gets the search results matching the given search query using the given search.
      Parameters:
      resourceQuery - the resource query
      resourceSearch - the resource search
      Returns:
      the resource search results
      Throws:
      NullArgumentException - resourceQuery or resourceSearch is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - resourceQuery or resourceSearch is not of this service
      Compliance:
      mandatory - This method must be implemented.
    • getResourceQueryFromInspector

      ResourceQuery getResourceQueryFromInspector(ResourceQueryInspector resourceQueryInspector)
      Gets a resource query from an inspector. The inspector is available from a ResourceSearchResults .
      Parameters:
      resourceQueryInspector - a resource query inspector
      Returns:
      the resource query
      Throws:
      NullArgumentException - resourceQueryInspector is null
      UnsupportedException - resourceQueryInspector is not of this service
      Compliance:
      mandatory - This method must be implemented.