Interface | osid.course.TermHierarchySession | ||
---|---|---|---|
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 | getTermHierarchyId | ||
Description |
Gets the hierarchy | ||
Return | osid.id.Id | the hierarchy Id associated with this session | |
Compliance | mandatory | This method must be implemented. | |
Method | getTermHierarchy | ||
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 | canAccessTermHierarchy | ||
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 | useComparativeTermView | ||
Description |
The returns from the term 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 | usePlenaryTermView | ||
Description |
A complete view of the | ||
Compliance | mandatory | This method is must be implemented. | |
Method | getRootTermIds | ||
Description |
Gets the root term | ||
Return | osid.id.IdList | the root term Ids | |
Errors | OPERATION_FAILED | unable to complete request | |
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getRootTerms | ||
Description |
Gets the root terms in the term hierarchy. A node with
no parents is an orphan. While all term | ||
Return | osid.course.TermList | the root terms | |
Errors | OPERATION_FAILED | unable to complete request | |
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method is must be implemented. | |
Method | hasParentTerms | ||
Description |
Tests if the | ||
Parameters | osid.id.Id | termId | a term Id |
Return | boolean | true if the term has parents, false otherwise | |
Errors | NOT_FOUND | termId is not found | |
NULL_ARGUMENT | termId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | isParentOfTerm | ||
Description |
Tests if an | ||
Parameters | osid.id.Id | id | an Id |
osid.id.Id | termId | the Id of a term | |
Return | boolean | true if this id is a parent of termId,
false otherwise | |
Errors | NOT_FOUND | termId is not found | |
NULL_ARGUMENT | id or termId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Provider Notes |
If | ||
Method | getParentTermIds | ||
Description |
Gets the parent | ||
Parameters | osid.id.Id | termId | a term Id |
Return | osid.id.IdList | the parent Ids of the term | |
Errors | NOT_FOUND | termId is not found | |
NULL_ARGUMENT | termId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getParentTerms | ||
Description |
Gets the parents of the given term. | ||
Parameters | osid.id.Id | termId | the Id to query |
Return | osid.course.TermList | the parents of the term | |
Errors | NOT_FOUND | termId not found | |
NULL_ARGUMENT | termId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | isAncestorOfTerm | ||
Description |
Tests if an | ||
Parameters | osid.id.Id | id | an Id |
osid.id.Id | termId | the Id of a term | |
Return | boolean | true if this id is an ancestor of
termId, false otherwise | |
Errors | NOT_FOUND | termId not found | |
NULL_ARGUMENT | id or termId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Provider Notes |
If | ||
Method | hasChildTerms | ||
Description |
Tests if a term has any children. | ||
Parameters | osid.id.Id | termId | a term Id |
Return | boolean | true if the termId has children, false
otherwise | |
Errors | NOT_FOUND | termId not found | |
NULL_ARGUMENT | termId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | isChildOfTerm | ||
Description |
Tests if a node is a direct child of another. | ||
Parameters | osid.id.Id | id | an Id |
osid.id.Id | termId | the Id of a term | |
Return | boolean | true if the id is a child of termId,
false otherwise | |
Errors | NOT_FOUND | termId not found | |
NULL_ARGUMENT | termId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Provider Notes |
If | ||
Method | getChildTermIds | ||
Description |
Gets the child | ||
Parameters | osid.id.Id | termId | a term Id |
Return | osid.id.IdList | the child Ids of the term | |
Errors | NOT_FOUND | termId is not found | |
NULL_ARGUMENT | termId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getChildTerms | ||
Description |
Gets the children of the given term. | ||
Parameters | osid.id.Id | termId | the Id to query |
Return | osid.course.TermList | the children of the term | |
Errors | NOT_FOUND | termId not found | |
NULL_ARGUMENT | termId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | isDescendantOfTerm | ||
Description |
Tests if an | ||
Parameters | osid.id.Id | id | an Id |
osid.id.Id | termId | the Id of a term | |
Return | boolean | true if the id is a descendant of the
termId, false otherwise | |
Errors | NOT_FOUND | termId not found | |
NULL_ARGUMENT | termId or id is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Provider Notes |
If | ||
Method | getTermNodeIds | ||
Description |
Gets a portion of the hierarchy for the given term. | ||
Parameters | osid.id.Id | termId | 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 term node | |
Errors | NOT_FOUND | termId not found | |
NULL_ARGUMENT | termId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getTermNodes | ||
Description |
Gets a portion of the hierarchy for the given term. | ||
Parameters | osid.id.Id | termId | 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.course.TermNode | a term node | |
Errors | NOT_FOUND | termId not found | |
NULL_ARGUMENT | termId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. |