OSID Logo
OSID Specifications
commenting package
Version 3.0.0
Release Candidate Preview
Interfaceosid.commenting.BookQuery
Implementsosid.OsidCatalogQuery
Description

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

MethodmatchCommentId
Description

Sets the comment Id for this query to match comments assigned to books.

Parametersosid.id.IdcommentIda comment Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT commentId is null
CompliancemandatoryThis method must be implemented.
MethodclearCommentIdTerms
Description

Clears the comment Id terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsCommentQuery
Description

Tests if a comment query is available.

Returnboolean true if a comment query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetCommentQuery
Description

Gets the query for a comment.

Returnosid.commenting.CommentQuerythe comment query
ErrorsUNIMPLEMENTED supportsCommentQuery() is false
ComplianceoptionalThis method must be implemented if supportsCommentQuery() is true.
MethodmatchAnyComment
Description

Matches books with any comment.

Parametersbooleanmatch true to match books with any comment, false to match books with no comments
CompliancemandatoryThis method must be implemented.
MethodclearCommentTerms
Description

Clears the comment terms.

CompliancemandatoryThis method must be implemented.
MethodmatchAncestorBookId
Description

Sets the book Id for this query to match books that have the specified book as an ancestor.

Parametersosid.id.IdbookIda book Id
booleanmatch true for a positive match, a false for a negative match
ErrorsNULL_ARGUMENT bookId is null
CompliancemandatoryThis method must be implemented.
MethodclearAncestorBookIdTerms
Description

Clears the ancestor book Id terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsAncestorBookQuery
Description

Tests if a BookQuery is available.

Returnboolean true if a book query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetAncestorBookQuery
Description

Gets the query for a book. Multiple retrievals produce a nested OR term.

Returnosid.commenting.BookQuerythe book query
ErrorsUNIMPLEMENTED supportsAncestorBookQuery() is false
ComplianceoptionalThis method must be implemented if supportsAncestorBookQuery() is true.
MethodmatchAnyAncestorBook
Description

Matches books with any ancestor.

Parametersbooleanmatch true to match books with any ancestor, false to match root books
CompliancemandatoryThis method must be implemented.
MethodclearAncestorBookTerms
Description

Clears the ancestor book terms.

CompliancemandatoryThis method must be implemented.
MethodmatchDescendantBookId
Description

Sets the book Id for this query to match books that have the specified book as a descendant.

Parametersosid.id.IdbookIda book Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT bookId is null
CompliancemandatoryThis method must be implemented.
MethodclearDescendantBookIdTerms
Description

Clears the descendant book Id terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsDescendantBookQuery
Description

Tests if a BookQuery is available.

Returnboolean true if a book query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetDescendantBookQuery
Description

Gets the query for a book. Multiple retrievals produce a nested OR term.

Returnosid.commenting.BookQuerythe book query
ErrorsUNIMPLEMENTED supportsDescendantBookQuery() is false
ComplianceoptionalThis method must be implemented if supportsDescendantBookQuery() is true.
MethodmatchAnyDescendantBook
Description

Matches books with any descendant.

Parametersbooleanmatch true to match books with any descendant, false to match leaf books
CompliancemandatoryThis method must be implemented.
MethodclearDescendantBookTerms
Description

Clears the descendant book terms.

CompliancemandatoryThis method must be implemented.
MethodgetBookQueryRecord
Description

Gets the book query record corresponding to the given Book record Type. Multiple record retrievals produce a nested boolean OR term.

Parametersosid.type.TypebookRecordTypea book record type
Returnosid.commenting.records.BookQueryRecordthe book query record
ErrorsNULL_ARGUMENT bookRecordType is null
OPERATION_FAILEDunable to complete request
UNSUPPORTED hasRecordType(bookRecordType) is false
CompliancemandatoryThis method must be implemented.