public interface MapHierarchySession extends OsidSession
This session defines methods for traversing a hierarchy of Map
objects. Each node in the hierarchy is a unique Map.
The hierarchy may be traversed recursively to establish the tree
structure through getParentMaps() and
getChildMaps(). To relate these Ids to another
OSID, getMapNodes() can be used for retrievals that can be
used for bulk lookups in other OSIDs. Any Map available in
the Mapping OSID is known to this hierarchy but does not appear in the
hierarchy traversal until added as a root location or a child of another
location.
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 getParentMaps() or getChildMaps() in lieu
of a PERMISSION_DENIED error that may disrupt the traversal
through authorized pathways.
This session defines views that offer differing behaviors when retrieving multiple objects.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canAccessMapHierarchy()
Tests if this user can perform hierarchy queries.
|
IdList |
getChildMapIds(Id mapId)
Gets the child
Ids of the given map. |
MapList |
getChildMaps(Id mapId)
Gets the children of the given map.
|
Hierarchy |
getMapHierarchy()
Gets the hierarchy associated with this session.
|
Id |
getMapHierarchyId()
Gets the hierarchy
Id associated with this session. |
Node |
getMapNodeIds(Id mapId,
long ancestorLevels,
long descendantLevels,
boolean includeSiblings)
Gets a portion of the hierarchy for the given map.
|
MapNode |
getMapNodes(Id mapId,
long ancestorLevels,
long descendantLevels,
boolean includeSiblings)
Gets a portion of the hierarchy for the given map.
|
IdList |
getParentMapIds(Id mapId)
Gets the parent
Ids of the given map. |
MapList |
getParentMaps(Id mapId)
Gets the parents of the given map.
|
IdList |
getRootMapIds()
Gets the root map
Ids in this hierarchy. |
MapList |
getRootMaps()
Gets the root map in the map hierarchy.
|
boolean |
hasChildMaps(Id mapId)
Tests if a map has any children.
|
boolean |
hasParentMaps(Id mapId)
Tests if the
Map has any parents. |
boolean |
isAncestorOfMap(Id id,
Id mapId)
Tests if an
Id is an ancestor of a map. |
boolean |
isChildOfMap(Id id,
Id mapId)
Tests if a map is a direct child of another.
|
boolean |
isDescendantOfMap(Id id,
Id mapId)
Tests if an
Id is a descendant of a map. |
boolean |
isParentOfMap(Id id,
Id mapId)
Tests if an
Id is a direct parent of map. |
void |
useComparativeMapView()
The returns from the map methods may omit or translate elements based
on this session, such as authorization, and not result in an error.
|
void |
usePlenaryMapView()
A complete view of the
Maps returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getMapHierarchyId()
Id associated with this session. Id associated with this sessionmandatory - This method must be implemented. Hierarchy getMapHierarchy() throws OperationFailedException, PermissionDeniedException
OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canAccessMapHierarchy()
PERMISSION_DENIED. This is intended as a hint to an
application that may opt not to offer lookup operations. false if hierarchy traversal methods are not
authorized, true otherwisemandatory - This method must be implemented. void useComparativeMapView()
mandatory - This method is must be implemented. void usePlenaryMapView()
Maps returns is desired. Methods
will return what is requested or result in an error. This view is used
when greater precision is desired at the expense of interoperability.mandatory - This method is must be implemented. IdList getRootMapIds() throws OperationFailedException, PermissionDeniedException
Ids in this hierarchy. Ids OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. MapList getRootMaps() throws OperationFailedException, PermissionDeniedException
Ids are known to the
hierarchy, an orphan does not appear in the hierarchy unless
explicitly added as a root location or child of another location.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method is must be implemented. boolean hasParentMaps(Id mapId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Map has any parents.mapId - a map Id true if the map has parents, f alse
otherwiseNotFoundException - mapId is not foundNullArgumentException - mapId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isParentOfMap(Id id, Id mapId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id is a direct parent of map.id - an Id mapId - the Id of a map true if this id is a parent of
mapId, f alse otherwiseNotFoundException - mapId is not foundNullArgumentException - id or
mapId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. If - id not found return false. IdList getParentMapIds(Id mapId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids of the given map.mapId - a map Id Ids of the mapNotFoundException - mapId is not foundNullArgumentException - mapId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. MapList getParentMaps(Id mapId) throws NotFoundException, OperationFailedException, PermissionDeniedException
mapId - the Id to queryNotFoundException - mapId not foundNullArgumentException - mapId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isAncestorOfMap(Id id, Id mapId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id is an ancestor of a map.id - an Id mapId - the Id of a map tru e if this id is an ancestor
of mapId, false otherwiseNotFoundException - mapId not foundNullArgumentException - mapId or
id is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. If - id not found return false. boolean hasChildMaps(Id mapId) throws NotFoundException, OperationFailedException, PermissionDeniedException
mapId - a map Id true if the mapId has children,
false otherwiseNotFoundException - mapId not foundNullArgumentException - mapId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isChildOfMap(Id id, Id mapId) throws NotFoundException, OperationFailedException, PermissionDeniedException
id - an Id mapId - the Id of a map true if the id is a child of
mapId, false otherwiseNotFoundException - mapId not foundNullArgumentException - id or
mapId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. If - id not found return false. IdList getChildMapIds(Id mapId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids of the given map.mapId - the Id to queryNotFoundException - mapId not foundNullArgumentException - mapId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. MapList getChildMaps(Id mapId) throws NotFoundException, OperationFailedException, PermissionDeniedException
mapId - the Id to queryNotFoundException - mapId not foundNullArgumentException - mapId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isDescendantOfMap(Id id, Id mapId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id is a descendant of a map.id - an Id mapId - the Id of a map true if the id is a descendant
of the mapId, false otherwiseNotFoundException - mapId not foundNullArgumentException - id or
mapId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. If - id is not found return false. Node getMapNodeIds(Id mapId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException
mapId - the Id to queryancestorLevels - the maximum number of ancestor levels to
include. A value of 0 returns no parents in the location.descendantLevels - the maximum number of descendant levels to
include. A value of 0 returns no children in the location.includeSiblings - true to include the siblings of
the given location, false to omit the siblingsNotFoundException - mapId not foundNullArgumentException - mapId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. MapNode getMapNodes(Id mapId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException
mapId - the Id to queryancestorLevels - the maximum number of ancestor levels to
include. A value of 0 returns no parents in the location.descendantLevels - the maximum number of descendant levels to
include. A value of 0 returns no children in the location.includeSiblings - true to include the siblings of
the given location, false to omit the siblingsNotFoundException - mapId not foundNullArgumentException - mapId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.