Interface SearchSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface SearchSession extends OsidSession

This session provides methods to evaluate and execute search.

  • Method Details

    • getEngineId

      Id getEngineId()
      Gets the Engine Id associated with this session.
      Returns:
      the Engine Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getEngine

      Gets the Engine associated with this session.
      Returns:
      the engine
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canSearch

      boolean canSearch()
      Tests if this user can evaluate search. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer these operations.
      Returns:
      false if evaluation methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • useFederatedEngineView

      void useFederatedEngineView()
      Federates the view for methods in this session. A federated view will include searches in engines which are children of this engine in the engine hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedEngineView

      void useIsolatedEngineView()
      Isolates the view for methods in this session. An isolated view restricts searches to this engine only.
      Compliance:
      mandatory - This method is must be implemented.
    • getQuery

      Query getQuery()
      Gets the query interface.
      Returns:
      the returned Query interface
      Compliance:
      mandatory - This method must be implemented.
    • getSearch

      Search getSearch()
      Gets the search interface.
      Returns:
      the returned Search interface
      Compliance:
      mandatory - This method must be implemented.
    • search

      Gets the search results matching the given search query using the given search.
      Parameters:
      query - a rule Id
      search - input conditions
      Returns:
      result of the search
      Throws:
      NullArgumentException - query or search is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - query or search not of this service
      Compliance:
      mandatory - This method must be implemented.
    • getQueryFromInspector

      Query getQueryFromInspector(QueryInspector queryInspector)
      Gets a query interface from an inspector. The inspector is available from a SearchResults .
      Parameters:
      queryInspector - a query inspector
      Returns:
      the query interface
      Throws:
      NullArgumentException - queryInspector is null
      UnsupportedException - queryInspector is not of this service
      Compliance:
      mandatory - This method must be implemented.