Queries¶
Comment Query¶
-
class
dlkit.commenting.queries.CommentQuery¶ Bases:
dlkit.osid.queries.OsidRelationshipQueryThis is the query for searching comments.
Each method specifies an
ANDterm while multiple invocations of the same method produce a nestedOR.-
match_reference_id(source_id, match)¶ Sets reference
Id.Parameters: - source_id (
osid.id.Id) – a sourceId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–source_idisnull- source_id (
-
reference_id_terms¶
-
match_commentor_id(resource_id, match)¶ Sets a resource
Idto match a commentor.Parameters: - resource_id (
osid.id.Id) – a resourceId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–resource_idisnull- resource_id (
-
commentor_id_terms¶
-
supports_commentor_query()¶ Tests if a
ResourceQueryis available.Returns: trueif a resource query is available,falseotherwiseReturn type: boolean
-
commentor_query¶ Gets the query for a resource query.
Multiple retrievals produce a nested
ORterm.Returns: the resource query Return type: osid.resource.ResourceQueryRaise: Unimplemented–supports_commentor_query()isfalse
-
commentor_terms¶
-
match_commenting_agent_id(agent_id, match)¶ Sets an agent
Id.Parameters: - agent_id (
osid.id.Id) – an agentId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–agent_idisnull- agent_id (
-
commenting_agent_id_terms¶
-
supports_commenting_agent_query()¶ Tests if an
AgentQueryis available.Returns: trueif an agent query is available,falseotherwiseReturn type: boolean
-
commenting_agent_query¶ Gets the query for an agent query.
Multiple retrievals produce a nested
ORterm.Returns: the agent query Return type: osid.authentication.AgentQueryRaise: Unimplemented–supports_commenting_agent_query()isfalse
-
commenting_agent_terms¶
-
match_text(text, string_match_type, match)¶ Matches text.
Parameters: - text (
string) – the text - string_match_type (
osid.type.Type) – a string match type - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: InvalidArgument–textis not ofstring_match_typeRaise: NullArgument–textisnullRaise: Unsupported–supports_string_match_type(string_match_type)isfalse- text (
-
match_any_text(match)¶ Matches a comment that has any text assigned.
Parameters: match ( boolean) –trueto match comments with any text,falseto match comments with no text
-
text_terms¶
-
match_rating_id(grade_id, match)¶ Sets a grade
Id.Parameters: - grade_id (
osid.id.Id) – a gradeId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–grade_idisnull- grade_id (
-
rating_id_terms¶
-
supports_rating_query()¶ Tests if a
GradeQueryis available.Returns: trueif a rating query is available,falseotherwiseReturn type: boolean
-
rating_query¶ Gets the query for a rating query.
Multiple retrievals produce a nested
ORterm.Returns: the rating query Return type: osid.grading.GradeQueryRaise: Unimplemented–supports_rating_query()isfalse
-
match_any_rating(match)¶ Matches books with any rating.
Parameters: match ( boolean) –trueto match comments with any rating,falseto match comments with no ratings
-
rating_terms¶
-
match_book_id(book_id, match)¶ Sets the book
Idfor this query to match comments assigned to books.Parameters: - book_id (
osid.id.Id) – a bookId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–book_idisnull- book_id (
-
book_id_terms¶
-
supports_book_query()¶ Tests if a
BookQueryis available.Returns: trueif a book query is available,falseotherwiseReturn type: boolean
-
book_query¶ Gets the query for a book query.
Multiple retrievals produce a nested
ORterm.Returns: the book query Return type: osid.commenting.BookQueryRaise: Unimplemented–supports_book_query()isfalse
-
book_terms¶
-
get_comment_query_record(comment_record_type)¶ Gets the comment query record corresponding to the given
CommentrecordType.Multiple record retrievals produce a nested
ORterm.Parameters: comment_record_type ( osid.type.Type) – a comment record typeReturns: the comment query record Return type: osid.commenting.records.CommentQueryRecordRaise: NullArgument–comment_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(comment_record_type)isfalse
-
Book Query¶
-
class
dlkit.commenting.queries.BookQuery¶ Bases:
dlkit.osid.queries.OsidCatalogQueryThis is the query for searching books.
Each method specifies an
ANDterm while multiple invocations of the same method produce a nestedOR.-
match_comment_id(comment_id, match)¶ Sets the comment
Idfor this query to match comments assigned to books.Parameters: - comment_id (
osid.id.Id) – a commentId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–comment_idisnull- comment_id (
-
comment_id_terms¶
-
supports_comment_query()¶ Tests if a comment query is available.
Returns: trueif a comment query is available,falseotherwiseReturn type: boolean
-
comment_query¶ Gets the query for a comment.
Returns: the comment query Return type: osid.commenting.CommentQueryRaise: Unimplemented–supports_comment_query()isfalse
-
match_any_comment(match)¶ Matches books with any comment.
Parameters: match ( boolean) –trueto match books with any comment,falseto match books with no comments
-
comment_terms¶
-
match_ancestor_book_id(book_id, match)¶ Sets the book
Idfor this query to match books that have the specified book as an ancestor.Parameters: - book_id (
osid.id.Id) – a bookId - match (
boolean) –truefor a positive match, afalsefor a negative match
Raise: NullArgument–book_idisnull- book_id (
-
ancestor_book_id_terms¶
-
supports_ancestor_book_query()¶ Tests if a
BookQueryis available.Returns: trueif a book query is available,falseotherwiseReturn type: boolean
-
ancestor_book_query¶ Gets the query for a book.
Multiple retrievals produce a nested
ORterm.Returns: the book query Return type: osid.commenting.BookQueryRaise: Unimplemented–supports_ancestor_book_query()isfalse
-
match_any_ancestor_book(match)¶ Matches books with any ancestor.
Parameters: match ( boolean) –trueto match books with any ancestor,falseto match root books
-
ancestor_book_terms¶
-
match_descendant_book_id(book_id, match)¶ Sets the book
Idfor this query to match books that have the specified book as a descendant.Parameters: - book_id (
osid.id.Id) – a bookId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–book_idisnull- book_id (
-
descendant_book_id_terms¶
-
supports_descendant_book_query()¶ Tests if a
BookQueryis available.Returns: trueif a book query is available,falseotherwiseReturn type: boolean
-
descendant_book_query¶ Gets the query for a book.
Multiple retrievals produce a nested
ORterm.Returns: the book query Return type: osid.commenting.BookQueryRaise: Unimplemented–supports_descendant_book_query()isfalse
-
match_any_descendant_book(match)¶ Matches books with any descendant.
Parameters: match ( boolean) –trueto match books with any descendant,falseto match leaf books
-
descendant_book_terms¶
-
get_book_query_record(book_record_type)¶ Gets the book query record corresponding to the given
BookrecordType.Multiple record retrievals produce a nested boolean
ORterm.Parameters: book_record_type ( osid.type.Type) – a book record typeReturns: the book query record Return type: osid.commenting.records.BookQueryRecordRaise: NullArgument–book_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(book_record_type)isfalse
-