Interface BookQuery

All Superinterfaces:
Extensible, OsidBrowsableQuery, OsidCatalogQuery, OsidExtensibleQuery, OsidFederateableQuery, OsidIdentifiableQuery, OsidObjectQuery, OsidQuery, OsidSourceableQuery, Suppliable

public interface BookQuery extends OsidCatalogQuery

This is the query for searching books. Each method specifies an AND term while multiple invocations of the same method produce a nested OR .

  • Method Details

    • matchCommentId

      void matchCommentId(Id commentId, boolean match)
      Sets the comment Id for this query to match comments assigned to books.
      Specified by:
      matchCommentId in interface OsidObjectQuery
      Parameters:
      commentId - a comment Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - commentId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearCommentIdTerms

      void clearCommentIdTerms()
      Clears the comment Id terms.
      Specified by:
      clearCommentIdTerms in interface OsidObjectQuery
      Compliance:
      mandatory - This method must be implemented.
    • supportsCommentQuery

      boolean supportsCommentQuery()
      Tests if a comment query is available.
      Specified by:
      supportsCommentQuery in interface OsidObjectQuery
      Returns:
      true if a comment query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCommentQuery

      CommentQuery getCommentQuery()
      Gets the query for a comment.
      Specified by:
      getCommentQuery in interface OsidObjectQuery
      Returns:
      the comment query
      Throws:
      UnimplementedException - supportsCommentQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsCommentQuery()} is {@code true} .
    • matchAnyComment

      void matchAnyComment(boolean match)
      Matches books with any comment.
      Specified by:
      matchAnyComment in interface OsidObjectQuery
      Parameters:
      match - true to match books with any comment, false to match books with no comments
      Compliance:
      mandatory - This method must be implemented.
    • clearCommentTerms

      void clearCommentTerms()
      Clears the comment terms.
      Specified by:
      clearCommentTerms in interface OsidObjectQuery
      Compliance:
      mandatory - This method must be implemented.
    • matchAncestorBookId

      void matchAncestorBookId(Id bookId, boolean match)
      Sets the book Id for this query to match books that have the specified book as an ancestor.
      Parameters:
      bookId - a book Id
      match - true for a positive match, a false for a negative match
      Throws:
      NullArgumentException - bookId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearAncestorBookIdTerms

      void clearAncestorBookIdTerms()
      Clears the ancestor book Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsAncestorBookQuery

      boolean supportsAncestorBookQuery()
      Tests if a BookQuery is available.
      Returns:
      true if a book query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getAncestorBookQuery

      BookQuery getAncestorBookQuery()
      Gets the query for a book. Multiple retrievals produce a nested OR term.
      Returns:
      the book query
      Throws:
      UnimplementedException - supportsAncestorBookQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsAncestorBookQuery()} is {@code true} .
    • matchAnyAncestorBook

      void matchAnyAncestorBook(boolean match)
      Matches books with any ancestor.
      Parameters:
      match - true to match books with any ancestor, false to match root books
      Compliance:
      mandatory - This method must be implemented.
    • clearAncestorBookTerms

      void clearAncestorBookTerms()
      Clears the ancestor book terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDescendantBookId

      void matchDescendantBookId(Id bookId, boolean match)
      Sets the book Id for this query to match books that have the specified book as a descendant.
      Parameters:
      bookId - a book Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - bookId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearDescendantBookIdTerms

      void clearDescendantBookIdTerms()
      Clears the descendant book Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsDescendantBookQuery

      boolean supportsDescendantBookQuery()
      Tests if a BookQuery is available.
      Returns:
      true if a book query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getDescendantBookQuery

      BookQuery getDescendantBookQuery()
      Gets the query for a book. Multiple retrievals produce a nested OR term.
      Returns:
      the book query
      Throws:
      UnimplementedException - supportsDescendantBookQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsDescendantBookQuery()} is {@code true} .
    • matchAnyDescendantBook

      void matchAnyDescendantBook(boolean match)
      Matches books with any descendant.
      Parameters:
      match - true to match books with any descendant, false to match leaf books
      Compliance:
      mandatory - This method must be implemented.
    • clearDescendantBookTerms

      void clearDescendantBookTerms()
      Clears the descendant book terms.
      Compliance:
      mandatory - This method must be implemented.
    • getBookQueryRecord

      BookQueryRecord getBookQueryRecord(Type bookRecordType) throws OperationFailedException
      Gets the book query record corresponding to the given Book record Type .Multiple record retrievals produce a nested boolean OR term.
      Parameters:
      bookRecordType - a book record type
      Returns:
      the book query record
      Throws:
      NullArgumentException - bookRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(bookRecordType) is false
      Compliance:
      mandatory - This method must be implemented.