| Interface | osid.commenting.BookHierarchySession | ||
|---|---|---|---|
| Implements | osid.OsidSession | ||
| Description | 
                 This session defines methods for traversing a hierarchy of 
                  A user may not be authorized to traverse the entire 
                hierarchy. Parts of the hierarchy may be made invisible 
                through omission from the returns of  This session defines views that offer differing behaviors when retrieving multiple objects. 
  | ||
| Method | getBookHierarchyId | ||
| Description | 
                     Gets the hierarchy   | ||
| Return | osid.id.Id | the hierarchy  Id  associated with this session  | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getBookHierarchy | ||
| Description | 
                     Gets the hierarchy associated with this session.  | ||
| Return | osid.hierarchy.Hierarchy | the hierarchy associated with this session | |
| Errors | OPERATION_FAILED | unable to complete request | |
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method must be implemented. | |
| Method | canAccessBookHierarchy | ||
| Description | 
                     Tests if this user can perform hierarchy queries. 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   | ||
| Return | boolean |  false  if hierarchy traversal methods are not authorized, 
 true  otherwise  | |
| Compliance | mandatory | This method must be implemented. | |
| Method | useComparativeBookView | ||
| Description | 
                     The returns from the book methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.  | ||
| Compliance | mandatory | This method is must be implemented. | |
| Method | usePlenaryBookView | ||
| Description | 
                     A complete view of the   | ||
| Compliance | mandatory | This method is must be implemented. | |
| Method | getRootBookIds | ||
| Description | 
                     Gets the root book   | ||
| Return | osid.id.IdList | the root book  Ids   | |
| Errors | OPERATION_FAILED | unable to complete request | |
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method must be implemented. | |
| Method | getRootBooks | ||
| Description | 
                     Gets the root books in the book hierarchy. A node with 
                    no parents is an orphan. While all book   | ||
| Return | osid.commenting.BookList | the root books | |
| Errors | OPERATION_FAILED | unable to complete request | |
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method is must be implemented. | |
| Method | hasParentBooks | ||
| Description | 
                     Tests if the   | ||
| Parameters | osid.id.Id | bookId | a book  Id   | 
| Return | boolean |  true  if the book has parents, f  alse  
otherwise  | |
| Errors | NOT_FOUND |  bookId  is not found  |                 |
| NULL_ARGUMENT |  bookId  is  null   |                 ||
| OPERATION_FAILED | unable to complete request | ||
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method must be implemented. | |
| Method | isParentOfBook | ||
| Description | 
                     Tests if an   | ||
| Parameters | osid.id.Id | id | an  Id   | 
osid.id.Id | bookId | the  Id  of a book  | |
| Return | boolean |  true  if this  id  is a parent of  bookId, 
 f  alse  otherwise  | |
| Errors | NOT_FOUND |  bookId  is not found  |                 |
| NULL_ARGUMENT |  id  or  bookId  is  null   |                 ||
| OPERATION_FAILED | unable to complete request | ||
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method must be implemented. | |
| Provider Notes | 
                                       If   | ||
| Method | getParentBookIds | ||
| Description | 
                     Gets the parent   | ||
| Parameters | osid.id.Id | bookId | a book  Id   | 
| Return | osid.id.IdList | the parent  Ids  of the book  | |
| Errors | NOT_FOUND |  bookId  is not found  |                 |
| NULL_ARGUMENT |  bookId  is  null   |                 ||
| OPERATION_FAILED | unable to complete request | ||
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method must be implemented. | |
| Method | getParentBooks | ||
| Description | 
                     Gets the parent books of the given   | ||
| Parameters | osid.id.Id | bookId | the  Id  of the  Book  to query  | 
| Return | osid.commenting.BookList | the parent books of the  id   | |
| Errors | NOT_FOUND | a  Book  identified by  Id is  not found  |                 |
| NULL_ARGUMENT |  bookId  is  null   |                 ||
| OPERATION_FAILED | unable to complete request | ||
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method must be implemented. | |
| Method | isAncestorOfBook | ||
| Description | 
                     Tests if an   | ||
| Parameters | osid.id.Id | id | an  Id   | 
osid.id.Id | bookId | the  Id  of a book  | |
| Return | boolean |  tru  e if this  id  is an ancestor of  
bookId,   false  otherwise  | |
| Errors | NOT_FOUND |  bookId  is not found  |                 |
| NULL_ARGUMENT |  id  or  bookId  is  null   |                 ||
| OPERATION_FAILED | unable to complete request | ||
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method must be implemented. | |
| Provider Notes | 
                                       If   | ||
| Method | hasChildBooks | ||
| Description | 
                     Tests if a book has any children.  | ||
| Parameters | osid.id.Id | bookId | a book  Id   | 
| Return | boolean |  true  if the  bookId  has children,  false 
 otherwise  | |
| Errors | NOT_FOUND |  bookId  is not found  |                 |
| NULL_ARGUMENT |  bookId  is  null   |                 ||
| OPERATION_FAILED | unable to complete request | ||
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method must be implemented. | |
| Method | isChildOfBook | ||
| Description | 
                     Tests if a book is a direct child of another.  | ||
| Parameters | osid.id.Id | id | an  Id   | 
osid.id.Id | bookId | the  Id  of a book  | |
| Return | boolean |  true  if the  id  is a child of  bookId, 
  false  otherwise  | |
| Errors | NOT_FOUND |  bookId  is not found  |                 |
| NULL_ARGUMENT |  id  or  bookId  is  null   |                 ||
| OPERATION_FAILED | unable to complete request | ||
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method must be implemented. | |
| Provider Notes | 
                                       If   | ||
| Method | getChildBookIds | ||
| Description | 
                     Gets the child   | ||
| Parameters | osid.id.Id | bookId | the  Id  to query  | 
| Return | osid.id.IdList | the children of the book | |
| Errors | NOT_FOUND |  bookId  is not found  |                 |
| NULL_ARGUMENT |  bookId  is  null   |                 ||
| OPERATION_FAILED | unable to complete request | ||
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method must be implemented. | |
| Method | getChildBooks | ||
| Description | 
                     Gets the child books of the given   | ||
| Parameters | osid.id.Id | bookId | the  Id  of the  Book  to query  | 
| Return | osid.commenting.BookList | the child books of the  id   | |
| Errors | NOT_FOUND | a  Book  identified by  Id is  not found  |                 |
| NULL_ARGUMENT |  bookId  is  null   |                 ||
| OPERATION_FAILED | unable to complete request | ||
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method must be implemented. | |
| Method | isDescendantOfBook | ||
| Description | 
                     Tests if an   | ||
| Parameters | osid.id.Id | id | an  Id   | 
osid.id.Id | bookId | the  Id  of a book  | |
| Return | boolean |  true  if the  id  is a descendant of the  
bookId,   false  otherwise  | |
| Errors | NOT_FOUND |  bookId  is not found  |                 |
| NULL_ARGUMENT |  id  or  bookId  is  null   |                 ||
| OPERATION_FAILED | unable to complete request | ||
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method must be implemented. | |
| Provider Notes | 
                                       If   | ||
| Method | getBookNodeIds | ||
| Description | 
                     Gets a portion of the hierarchy for the given book.  | ||
| Parameters | osid.id.Id | bookId | the  Id  to query  | 
cardinal | ancestorLevels | the maximum number of ancestor levels to include. A value of 0 returns no parents in the node. | |
cardinal | descendantLevels | the maximum number of descendant levels to include. A value of 0 returns no children in the node. | |
boolean | includeSiblings |  true  to include the siblings of the given node,  false 
 to omit the siblings  | |
| Return | osid.hierarchy.Node | a book node | |
| Errors | NOT_FOUND |  bookId  is not found  |                 |
| NULL_ARGUMENT |  bookId  is  null   |                 ||
| OPERATION_FAILED | unable to complete request | ||
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method must be implemented. | |
| Method | getBookNodes | ||
| Description | 
                     Gets a portion of the hierarchy for the given book.  | ||
| Parameters | osid.id.Id | bookId | the  Id  to query  | 
cardinal | ancestorLevels | the maximum number of ancestor levels to include. A value of 0 returns no parents in the node. | |
cardinal | descendantLevels | the maximum number of descendant levels to include. A value of 0 returns no children in the node. | |
boolean | includeSiblings |  true  to include the siblings of the given node,  false 
 to omit the siblings  | |
| Return | osid.commenting.BookNode | a book node | |
| Errors | NOT_FOUND |  bookId  is not found  |                 |
| NULL_ARGUMENT |  bookId  is  null   |                 ||
| OPERATION_FAILED | unable to complete request | ||
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method must be implemented. | |