Interface IdiomQuerySession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
All Known Subinterfaces:
IdiomSearchSession

public interface IdiomQuerySession extends OsidSession

This session provides methods for searching among Idioms . The search query is constructed using the IdiomQuery .

This session defines views that offer differing behaviors for searching.

  • federated press view: searches include idioms in presses of which this press is an ancestor in the press hierarchy
  • isolated press view: searches are restricted to idioms in this press

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

  • Method Details

    • getPressId

      Id getPressId()
      Gets the Press Id associated with this session.
      Returns:
      the Press Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getPress

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

      boolean canSearchIdioms()
      Tests if this user can perform Idiom lookups. 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 press that may not offer lookup operations to unauthorized users.
      Returns:
      false if search methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • useFederatedPressView

      void useFederatedPressView()
      Federates the view for methods in this session. A federated view will include idioms in presses which are children of this press in the press hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedPressView

      void useIsolatedPressView()
      Isolates the view for methods in this session. An isolated view restricts lookups to this press only.
      Compliance:
      mandatory - This method is must be implemented.
    • getIdiomQuery

      IdiomQuery getIdiomQuery()
      Gets an idiom query.
      Returns:
      the idiom query
      Compliance:
      mandatory - This method must be implemented.
    • getIdiomsByQuery

      Gets a list of Idioms matching the given idiom query.
      Parameters:
      idiomQuery - the idiom query
      Returns:
      the returned IdiomList
      Throws:
      NullArgumentException - idiomQuery is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - idiomQuery is not of this service
      Compliance:
      mandatory - This method must be implemented.