Interface TextQuerySession

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

public interface TextQuerySession extends OsidSession

This session provides methods for searching among Texts . The search query is constructed using the TextQuery .

This session defines views that offer differing behaviors for searching.

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

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

  • 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.
    • canSearchTexts

      boolean canSearchTexts()
      Tests if this user can perform Text 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 texts 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 searches to this press only.
      Compliance:
      mandatory - This method is must be implemented.
    • getTextQuery

      TextQuery getTextQuery()
      Gets a text query.
      Returns:
      the text query
      Compliance:
      mandatory - This method must be implemented.
    • getTextsByQuery

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