Interface RepositorySearchSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession, RepositoryQuerySession

public interface RepositorySearchSession extends RepositoryQuerySession

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

getRepositoriesByQuery() is the basic search method and returns a list of Repository objects.A more advanced search may be performed with getRepositoriesBySearch() . It accepts a RepositorySearch in addition to the query for the purpose of specifying additional options affecting the entire search, such as ordering. getRepositoriesBySearch() returns a RepositorySearchResults that can be used to access the resulting RepositoryList or be used to perform a search within the result set through RepositorySearch .

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

  • Method Details

    • getRepositorySearch

      RepositorySearch getRepositorySearch()
      Gets a repository search.
      Returns:
      the repository search
      Compliance:
      mandatory - This method must be implemented.
    • getRepositorySearchOrder

      RepositorySearchOrder getRepositorySearchOrder()
      Gets a repository search order. The RepositorySearchOrder is supplied to a RepositorySearch to specify the ordering of results.
      Returns:
      the repository search order
      Compliance:
      mandatory - This method must be implemented.
    • getRepositoriesBySearch

      RepositorySearchResults getRepositoriesBySearch(RepositoryQuery repositoryQuery, RepositorySearch repositorySearch) throws OperationFailedException, PermissionDeniedException
      Gets the search results matching the given search query using the given search.
      Parameters:
      repositoryQuery - the repository query
      repositorySearch - the repository search
      Returns:
      the repository search results
      Throws:
      NullArgumentException - repositoryQuery or repositorySearch is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - repositoryQuery or repositorySearch is not of this service
      Compliance:
      mandatory - This method must be implemented.
    • getRepositoryQueryFromInspector

      RepositoryQuery getRepositoryQueryFromInspector(RepositoryQueryInspector repositoryQueryInspector)
      Gets a repository query from an inspector. The inspector is available from a RepositorySearchResults .
      Parameters:
      repositoryQueryInspector - a repository query inspector
      Returns:
      the repository query
      Throws:
      NullArgumentException - repositoryQueryInspector is null
      UnsupportedException - repositoryQueryInspector is not of this service
      Compliance:
      mandatory - This method must be implemented.