Interface AntimatroidHierarchySession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, 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.
- comparative antimatroid view: antimatroid elements may be silently omitted or re-ordered
- plenary antimatroid view: provides a complete set or is an error condition
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can perform hierarchy queries.Gets the hierarchy associated with this session.Gets the hierarchyIdassociated with this session.getAntimatroidNodeIds(Id antimatroidId, long ancestorLevels, long descendantLevels, boolean includeSiblings) Gets a portion of the hierarchy for the given antimatroid.getAntimatroidNodes(Id antimatroidId, long ancestorLevels, long descendantLevels, boolean includeSiblings) Gets a portion of the hierarchy for the given antimatroid.getChildAntimatroidIds(Id antimatroidId) Gets the childIdsof the given antimatroid.getChildAntimatroids(Id antimatroidId) Gets the children of the given antimatroid.getParentAntimatroidIds(Id antimatroidId) Gets the parentIdsof the given antimatroid.getParentAntimatroids(Id antimatroidId) Gets the parents of the given antimatroid.Gets the root antimatroidIdsin this hierarchy.Gets the root antimatroid in the antimatroid hierarchy.booleanhasChildAntimatroids(Id antimatroidId) Tests if an antimatroid has any children.booleanhasParentAntimatroids(Id antimatroidId) Tests if theAntimatroidhas any parents.booleanisAncestorOfAntimatroid(Id id, Id antimatroidId) Tests if anIdis an ancestor of an antimatroid.booleanisChildOfAntimatroid(Id id, Id antimatroidId) Tests if an antimatroid is a direct child of another.booleanisDescendantOfAntimatroid(Id id, Id antimatroidId) Tests if anIdis a descendant of an antimatroid.booleanisParentOfAntimatroid(Id id, Id antimatroidId) Tests if anIdis a direct parent of antimatroid.voidThe returns from the antimatroid methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidA complete view of theAntimatroidsreturns is desired.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getAntimatroidHierarchyId
Id getAntimatroidHierarchyId()Gets the hierarchyIdassociated with this session.- Returns:
- the hierarchy
Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getAntimatroidHierarchy
Gets the hierarchy associated with this session.- Returns:
- the hierarchy associated with this session
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canAccessAntimatroidHierarchy
boolean canAccessAntimatroidHierarchy()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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations.- Returns:
falseif hierarchy traversal methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useComparativeAntimatroidView
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. This view is used when greater interoperability is desired at the expense of precision.- Compliance:
mandatory- This method is must be implemented.
-
usePlenaryAntimatroidView
void usePlenaryAntimatroidView()A complete view of theAntimatroidsreturns 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.- Compliance:
mandatory- This method is must be implemented.
-
getRootAntimatroidIds
Gets the root antimatroidIdsin this hierarchy.- Returns:
- the root antimatroid
Ids - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRootAntimatroids
Gets the root antimatroid in the antimatroid hierarchy. an antimatroid with no parents is an orphan. While all antimatroidIdsare known to the hierarchy, an orphan does not appear in the hierarchy unless explicitly added as a root antimatroid or child of another antimatroid.- Returns:
- the root antimatroids
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
hasParentAntimatroids
boolean hasParentAntimatroids(Id antimatroidId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if theAntimatroidhas any parents.- Parameters:
antimatroidId- an antimatroidId- Returns:
trueif the antimatroid has parents, falseotherwise- Throws:
NotFoundException-antimatroidIdis not foundNullArgumentException-antimatroidIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
isParentOfAntimatroid
boolean isParentOfAntimatroid(Id id, Id antimatroidId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if anIdis a direct parent of antimatroid.- Parameters:
id- anIdantimatroidId- theIdof an antimatroid- Returns:
trueif thisidis a parent ofantimatroidId, falseotherwise- Throws:
NotFoundException-antimatroidIdis not foundNullArgumentException-idorantimatroidIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.- Notes:
If- {@code id} not found return {@code false} .
-
getParentAntimatroidIds
IdList getParentAntimatroidIds(Id antimatroidId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the parentIdsof the given antimatroid.- Parameters:
antimatroidId- an antimatroidId- Returns:
- the parent
Idsof the antimatroid - Throws:
NotFoundException-antimatroidIdis not foundNullArgumentException-antimatroidIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getParentAntimatroids
AntimatroidList getParentAntimatroids(Id antimatroidId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the parents of the given antimatroid.- Parameters:
antimatroidId- theIdto query- Returns:
- the parents of the antimatroid
- Throws:
NotFoundException-antimatroidIdnot foundNullArgumentException-antimatroidIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
isAncestorOfAntimatroid
boolean isAncestorOfAntimatroid(Id id, Id antimatroidId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if anIdis an ancestor of an antimatroid.- Parameters:
id- anIdantimatroidId- theIdof an antimatroid- Returns:
trueif thisidis an ancestor ofantimatroidId,falseotherwise- Throws:
NotFoundException-antimatroidIdnot foundNullArgumentException-antimatroidIdoridisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.- Notes:
If- {@code id} not found return {@code false} .
-
hasChildAntimatroids
boolean hasChildAntimatroids(Id antimatroidId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if an antimatroid has any children.- Parameters:
antimatroidId- an antimatroidId- Returns:
trueif theantimatroidIdhas children,falseotherwise- Throws:
NotFoundException-antimatroidIdnot foundNullArgumentException-antimatroidIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
isChildOfAntimatroid
boolean isChildOfAntimatroid(Id id, Id antimatroidId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if an antimatroid is a direct child of another.- Parameters:
id- anIdantimatroidId- theIdof an antimatroid- Returns:
trueif theidis a child ofantimatroidId,falseotherwise- Throws:
NotFoundException-antimatroidIdnot foundNullArgumentException-idorantimatroidIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.- Notes:
If- {@code id} not found return {@code false} .
-
getChildAntimatroidIds
IdList getChildAntimatroidIds(Id antimatroidId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the childIdsof the given antimatroid.- Parameters:
antimatroidId- theIdto query- Returns:
- the children of the antimatroid
- Throws:
NotFoundException-antimatroidIdnot foundNullArgumentException-antimatroidIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getChildAntimatroids
AntimatroidList getChildAntimatroids(Id antimatroidId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the children of the given antimatroid.- Parameters:
antimatroidId- theIdto query- Returns:
- the children of the antimatroid
- Throws:
NotFoundException-antimatroidIdnot foundNullArgumentException-antimatroidIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
isDescendantOfAntimatroid
boolean isDescendantOfAntimatroid(Id id, Id antimatroidId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if anIdis a descendant of an antimatroid.- Parameters:
id- anIdantimatroidId- theIdof an antimatroid- Returns:
trueif theidis a descendant of theantimatroidId,falseotherwise- Throws:
NotFoundException-antimatroidIdnot foundNullArgumentException-idorantimatroidIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.- Notes:
If- {@code id} is not found return {@code false} .
-
getAntimatroidNodeIds
Node getAntimatroidNodeIds(Id antimatroidId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets a portion of the hierarchy for the given antimatroid.- Parameters:
antimatroidId- theIdto 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-trueto include the siblings of the given antimatroid,falseto omit the siblings- Returns:
- an antimatroid node
- Throws:
NotFoundException-antimatroidIdnot foundNullArgumentException-antimatroidIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getAntimatroidNodes
AntimatroidNode getAntimatroidNodes(Id antimatroidId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets a portion of the hierarchy for the given antimatroid.- Parameters:
antimatroidId- theIdto 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-trueto include the siblings of the given antimatroid,falseto omit the siblings- Returns:
- an antimatroid node
- Throws:
NotFoundException-antimatroidIdnot foundNullArgumentException-antimatroidIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-