Interface | osid.mapping.LocationHierarchySession | ||
---|---|---|---|
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 | getLocationHierarchyId | ||
Description |
Gets the hierarchy | ||
Return | osid.id.Id | the hierarchy Id associated with this session | |
Compliance | mandatory | This method must be implemented. | |
Method | getLocationHierarchy | ||
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 | canAccessLocationHierarchy | ||
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 | useComparativeLocationView | ||
Description |
The returns from the location 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 | usePlenaryLocationView | ||
Description |
A complete view of the | ||
Compliance | mandatory | This method is must be implemented. | |
Method | getRootLocationIds | ||
Description |
Gets the root location | ||
Return | osid.id.IdList | the root location Ids | |
Errors | OPERATION_FAILED | unable to complete request | |
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getRootLocations | ||
Description |
Gets the root location in the location hierarchy. A
location with no parents is an orphan. While all location
| ||
Return | osid.mapping.LocationList | the root locations | |
Errors | OPERATION_FAILED | unable to complete request | |
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method is must be implemented. | |
Method | hasParentLocations | ||
Description |
Tests if the | ||
Parameters | osid.id.Id | locationId | a location Id |
Return | boolean | true if the location has parents, f alse
otherwise | |
Errors | NOT_FOUND | locationId is not found | |
NULL_ARGUMENT | locationId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | isParentOfLocation | ||
Description |
Tests if an | ||
Parameters | osid.id.Id | id | an Id |
osid.id.Id | locationId | the Id of a location | |
Return | boolean | true if this id is a parent of
locationId, f alse otherwise | |
Errors | NOT_FOUND | locationId is not found | |
NULL_ARGUMENT | id or locationId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Provider Notes |
If | ||
Method | getParentLocationIds | ||
Description |
Gets the parent | ||
Parameters | osid.id.Id | locationId | a location Id |
Return | osid.id.IdList | the parent Ids of the location | |
Errors | NOT_FOUND | locationId is not found | |
NULL_ARGUMENT | locationId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getParentLocations | ||
Description |
Gets the parents of the given location. | ||
Parameters | osid.id.Id | locationId | a location Id |
Return | osid.mapping.LocationList | the parents of the location | |
Errors | NOT_FOUND | locationId is not found | |
NULL_ARGUMENT | locationId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | isAncestorOfLocation | ||
Description |
Tests if an | ||
Parameters | osid.id.Id | id | an Id |
osid.id.Id | locationId | the Id of a location | |
Return | boolean | tru e if this id is an ancestor of
locationId, false otherwise | |
Errors | NOT_FOUND | locationId is not found | |
NULL_ARGUMENT | id or locationId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Provider Notes |
If | ||
Method | hasChildLocations | ||
Description |
Tests if a location has any children. | ||
Parameters | osid.id.Id | locationId | a location Id |
Return | boolean | true if the locationId has children,
false otherwise | |
Errors | NOT_FOUND | locationId is not found | |
NULL_ARGUMENT | locationId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | isChildOfLocation | ||
Description |
Tests if a location is a direct child of another. | ||
Parameters | osid.id.Id | id | an Id |
osid.id.Id | locationId | a location Id | |
Return | boolean | true if the id is a child of
locationId, false otherwise | |
Errors | NOT_FOUND | locationId is not found | |
NULL_ARGUMENT | id or locationId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Provider Notes |
If | ||
Method | getChildLocationIds | ||
Description |
Gets the child | ||
Parameters | osid.id.Id | locationId | a location Id |
Return | osid.id.IdList | the children of the location | |
Errors | NOT_FOUND | locationId is not found | |
NULL_ARGUMENT | locationId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getChildLocations | ||
Description |
Gets the children of the given location. | ||
Parameters | osid.id.Id | locationId | a location Id |
Return | osid.mapping.LocationList | the children of the location | |
Errors | NOT_FOUND | locationId is not found | |
NULL_ARGUMENT | locationId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | isDescendantOfLocation | ||
Description |
Tests if an | ||
Parameters | osid.id.Id | id | an Id |
osid.id.Id | locationId | the Id of a location | |
Return | boolean | true if the id is a descendant of the
locationId, false otherwise | |
Errors | NOT_FOUND | locationId not found | |
NULL_ARGUMENT | id or locationId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Provider Notes |
If | ||
Method | getLocationNodeIds | ||
Description |
Gets a portion of the hierarchy for the given location. | ||
Parameters | osid.id.Id | locationId | the Id to query |
cardinal | ancestorLevels | the maximum number of ancestor levels to include. A value of 0 returns no parents in the location. | |
cardinal | descendantLevels | the maximum number of descendant levels to include. A value of 0 returns no children in the location. | |
boolean | includeSiblings | true to include the siblings of the given location,
false to omit the siblings | |
Return | osid.hierarchy.Node | a location node | |
Errors | NOT_FOUND | locationId is not found | |
NULL_ARGUMENT | locationId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getLocationNodes | ||
Description |
Gets a portion of the hierarchy for the given location. | ||
Parameters | osid.id.Id | locationId | the Id to query |
cardinal | ancestorLevels | the maximum number of ancestor levels to include. A value of 0 returns no parents in the location. | |
cardinal | descendantLevels | the maximum number of descendant levels to include. A value of 0 returns no children in the location. | |
boolean | includeSiblings | true to include the siblings of the given location,
false to omit the siblings | |
Return | osid.mapping.LocationNode | a location node | |
Errors | NOT_FOUND | locationId is not found | |
NULL_ARGUMENT | locationId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. |