public interface AntimatroidHierarchySession extends OsidSession
This session defines methods for traversing a hierarchy of
Antimatroid objects. Each node in the hierarchy is a unique
Antimatroid. The hierarchy may be traversed recursively to
establish the tree structure through getParentAntimatroids()
and getChildAntimatroids(). To relate these
Ids to another OSID, getAntimatroidNodes() can be
used for retrievals that can be used for bulk lookups in other OSIDs. Any
Antimatroid available in the Sequencing OSID is known to
this hierarchy but does not appear in the hierarchy traversal until added
as a root antimatroid or a child of another antimatroid.
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 getParentAntimatroids() or getChildAntimatroids()
in lieu of a PERMISSION_DENIED error that may
disrupt the traversal through authorized featureways.
This session defines views that offer differing behaviors when retrieving multiple objects.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canAccessAntimatroidHierarchy()
Tests if this user can perform hierarchy queries.
|
Hierarchy |
getAntimatroidHierarchy()
Gets the hierarchy associated with this session.
|
Id |
getAntimatroidHierarchyId()
Gets the hierarchy
Id associated with this session. |
Node |
getAntimatroidNodeIds(Id antimatroidId,
long ancestorLevels,
long descendantLevels,
boolean includeSiblings)
Gets a portion of the hierarchy for the given antimatroid.
|
AntimatroidNode |
getAntimatroidNodes(Id antimatroidId,
long ancestorLevels,
long descendantLevels,
boolean includeSiblings)
Gets a portion of the hierarchy for the given antimatroid.
|
IdList |
getChildAntimatroidIds(Id antimatroidId)
Gets the child
Ids of the given antimatroid. |
AntimatroidList |
getChildAntimatroids(Id antimatroidId)
Gets the children of the given antimatroid.
|
IdList |
getParentAntimatroidIds(Id antimatroidId)
Gets the parent
Ids of the given antimatroid. |
AntimatroidList |
getParentAntimatroids(Id antimatroidId)
Gets the parents of the given antimatroid.
|
IdList |
getRootAntimatroidIds()
Gets the root antimatroid
Ids in this hierarchy. |
AntimatroidList |
getRootAntimatroids()
Gets the root antimatroid in the antimatroid hierarchy.
|
boolean |
hasChildAntimatroids(Id antimatroidId)
Tests if an antimatroid has any children.
|
boolean |
hasParentAntimatroids(Id antimatroidId)
Tests if the
Antimatroid has any parents. |
boolean |
isAncestorOfAntimatroid(Id id,
Id antimatroidId)
Tests if an
Id is an ancestor of an antimatroid. |
boolean |
isChildOfAntimatroid(Id id,
Id antimatroidId)
Tests if an antimatroid is a direct child of another.
|
boolean |
isDescendantOfAntimatroid(Id id,
Id antimatroidId)
Tests if an
Id is a descendant of an antimatroid. |
boolean |
isParentOfAntimatroid(Id id,
Id antimatroidId)
Tests if an
Id is a direct parent of antimatroid. |
void |
useComparativeAntimatroidView()
The returns from the antimatroid methods may omit or translate
elements based on this session, such as authorization, and not result
in an error.
|
void |
usePlenaryAntimatroidView()
A complete view of the
Antimatroids returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getAntimatroidHierarchyId()
Id associated with this session. Id associated with this sessionmandatory - This method must be implemented. Hierarchy getAntimatroidHierarchy() throws OperationFailedException, PermissionDeniedException
OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canAccessAntimatroidHierarchy()
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 useComparativeAntimatroidView()
mandatory - This method is must be implemented. void usePlenaryAntimatroidView()
Antimatroids 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 getRootAntimatroidIds() throws OperationFailedException, PermissionDeniedException
Ids in this hierarchy. Ids OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. AntimatroidList getRootAntimatroids() throws OperationFailedException, PermissionDeniedException
Ids
are known to the hierarchy, an orphan does not appear in the hierarchy
unless explicitly added as a root antimatroid or child of another
antimatroid.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method is must be implemented. boolean hasParentAntimatroids(Id antimatroidId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Antimatroid has any parents.antimatroidId - an antimatroid Id true if the antimatroid has parents, f
alse otherwiseNotFoundException - antimatroidId is not
foundNullArgumentException - antimatroidId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isParentOfAntimatroid(Id id, Id antimatroidId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id is a direct parent of antimatroid.id - an Id antimatroidId - the Id of an antimatroid true if this id is a parent of
antimatroidId, f alse otherwiseNotFoundException - antimatroidId is not
foundNullArgumentException - id or
antimatroidId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. If - id not found return false. IdList getParentAntimatroidIds(Id antimatroidId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids of the given antimatroid.antimatroidId - an antimatroid Id Ids of the antimatroidNotFoundException - antimatroidId is not
foundNullArgumentException - antimatroidId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. AntimatroidList getParentAntimatroids(Id antimatroidId) throws NotFoundException, OperationFailedException, PermissionDeniedException
antimatroidId - the Id to queryNotFoundException - antimatroidId not
foundNullArgumentException - antimatroidId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isAncestorOfAntimatroid(Id id, Id antimatroidId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id is an ancestor of an antimatroid.id - an Id antimatroidId - the Id of an antimatroid tru e if this id is an ancestor
of antimatroidId, false
otherwiseNotFoundException - antimatroidId not
foundNullArgumentException - antimatroidId or
id is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. If - id not found return false. boolean hasChildAntimatroids(Id antimatroidId) throws NotFoundException, OperationFailedException, PermissionDeniedException
antimatroidId - an antimatroid Id true if the antimatroidId has
children, false otherwiseNotFoundException - antimatroidId not
foundNullArgumentException - antimatroidId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isChildOfAntimatroid(Id id, Id antimatroidId) throws NotFoundException, OperationFailedException, PermissionDeniedException
id - an Id antimatroidId - the Id of an antimatroid true if the id is a child of
antimatroidId, false otherwiseNotFoundException - antimatroidId not
foundNullArgumentException - id or
antimatroidId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. If - id not found return false. IdList getChildAntimatroidIds(Id antimatroidId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids of the given antimatroid.antimatroidId - the Id to queryNotFoundException - antimatroidId not
foundNullArgumentException - antimatroidId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. AntimatroidList getChildAntimatroids(Id antimatroidId) throws NotFoundException, OperationFailedException, PermissionDeniedException
antimatroidId - the Id to queryNotFoundException - antimatroidId not
foundNullArgumentException - antimatroidId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isDescendantOfAntimatroid(Id id, Id antimatroidId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id is a descendant of an antimatroid.id - an Id antimatroidId - the Id of an antimatroid true if the id is a descendant
of the antimatroidId, false
otherwiseNotFoundException - antimatroidId not
foundNullArgumentException - id or
antimatroidId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. If - id is not found return false. Node getAntimatroidNodeIds(Id antimatroidId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException
antimatroidId - the Id to queryancestorLevels - the maximum number of ancestor levels to
include. A value of 0 returns no parents in the antimatroid.descendantLevels - the maximum number of descendant levels to
include. A value of 0 returns no children in the antimatroid.includeSiblings - true to include the siblings of
the given antimatroid, false to omit the
siblingsNotFoundException - antimatroidId not
foundNullArgumentException - antimatroidId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. AntimatroidNode getAntimatroidNodes(Id antimatroidId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException
antimatroidId - the Id to queryancestorLevels - the maximum number of ancestor levels to
include. A value of 0 returns no parents in the hierarchy.descendantLevels - the maximum number of descendant levels to
include. A value of 0 returns no children in the hierarchy.includeSiblings - true to include the siblings of
the given antimatroid, false to omit the
siblingsNotFoundException - antimatroidId not
foundNullArgumentException - antimatroidId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.