public interface DictionaryHierarchySession extends OsidSession
This session defines methods for traversing a hierarchy of
Dictionary objects. Each node in the hierarchy is a unique
Dictionary. The hierarchy may be traversed recursively to
establish the tree structure through getParentDIctionaries()
and getChildDictionaries(). To relate these
Ids to another OSID, getDictionaryNodes() can be
used for retrievals that can be used for bulk lookups in other OSIDs. Any
Dictionary available in the Dictionary OSID is known to
this hierarchy but does not appear in the hierarchy traversal until added
as a root node or a child of another node.
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 getParentDictionaries() or getChildDictionaries()
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 |
canAccessDictionaryHierarchy()
Tests if this user can perform hierarchy queries.
|
DictionaryList |
getChildDictionaries(Id dictionaryId)
Gets the child dictionaries of the given
id. |
IdList |
getChildDictionaryIds(Id dictionaryId)
Gets the child
Ids of the given dictionary. |
Hierarchy |
getDictionaryHierarchy()
Gets the hierarchy associated with this session.
|
Id |
getDictionaryHierarchyId()
Gets the hierarchy
Id associated with this session. |
Node |
getDictionaryNodeIds(Id dictionaryId,
long ancestorLevels,
long descendantLevels,
boolean includeSiblings)
Gets a portion of the hierarchy for the given dictionary.
|
DictionaryNode |
getDictionaryNodes(Id dictionaryId,
long ancestorLevels,
long descendantLevels,
boolean includeSiblings)
Gets a portion of the hierarchy for the given dictionary.
|
DictionaryList |
getParentDictionaries(Id dictionaryId)
Gets the parent dictionaries of the given
id. |
IdList |
getParentDictionaryIds(Id dictionaryId)
Gets the parent
Ids of the given dictionary. |
DictionaryList |
getRootDictionaries()
Gets the root subjects in the dictionary hierarchy.
|
IdList |
getRootDictionaryIds()
Gets the root dictionary
Ids in this hierarchy. |
boolean |
hasChildDictionaries(Id dictionaryId)
Tests if a dictionary has any children.
|
boolean |
hasParentDictionaries(Id dictionaryId)
Tests if the
Dictionary has any parents. |
boolean |
isAncestorOfDictionary(Id id,
Id dictionaryId)
Tests if an
Id is an ancestor of a dictionary. |
boolean |
isChildOfDictionary(Id id,
Id dictionaryId)
Tests if a dictionary is a direct child of another.
|
boolean |
isDescendantOfDictionary(Id id,
Id dictionaryId)
Tests if an
Id is a descendant of a dictionary. |
boolean |
isParentOfDictionary(Id id,
Id dictionaryId)
Tests if an
Id is a direct parent of dictionary. |
void |
useComparativeDictionaryView()
The returns from the dictionary methods may omit or translate elements
based on this session, such as authorization, and not result in an
error.
|
void |
usePlenaryDictionaryView()
A complete view of the
Dictionary returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getDictionaryHierarchyId()
Id associated with this session. Id associated with this sessionmandatory - This method must be implemented. Hierarchy getDictionaryHierarchy() throws OperationFailedException, PermissionDeniedException
OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canAccessDictionaryHierarchy()
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 useComparativeDictionaryView()
mandatory - This method is must be implemented. void usePlenaryDictionaryView()
Dictionary 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 getRootDictionaryIds() throws OperationFailedException, PermissionDeniedException
Ids in this hierarchy. Ids OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DictionaryList getRootDictionaries() throws OperationFailedException, PermissionDeniedException
Ids are
known to the hierarchy, an orphan does not appear in the hierarchy
unless explicitly added as a root node or child of another node.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method is must be implemented. boolean hasParentDictionaries(Id dictionaryId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Dictionary has any parents.dictionaryId - a dictionary Id true if the dictionary has parents, f
alse otherwiseNotFoundException - dictionaryId is not
foundNullArgumentException - dictionaryId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isParentOfDictionary(Id id, Id dictionaryId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id is a direct parent of dictionary.id - an Id dictionaryId - the Id of a dictionary true if this id is a parent of
dictionaryId, f alse otherwiseNotFoundException - dictionaryId is not
foundNullArgumentException - id or
dictionaryId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. If - id not found return false. IdList getParentDictionaryIds(Id dictionaryId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids of the given dictionary.dictionaryId - a dictionary Id NotFoundException - dictionaryId is not
foundNullArgumentException - dictionaryId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DictionaryList getParentDictionaries(Id dictionaryId) throws NotFoundException, OperationFailedException, PermissionDeniedException
id. dictionaryId - the Id of the Dictionary
to query id NotFoundException - a Dictionary
identified by Id is not foundNullArgumentException - dictionaryId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isAncestorOfDictionary(Id id, Id dictionaryId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id is an ancestor of a dictionary.id - an Id dictionaryId - the Id of a dictionary tru e if this id is an ancestor
of dictionaryId, false otherwiseNotFoundException - dictionaryId is not
foundNullArgumentException - dictionaryId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. If - id not found return false. boolean hasChildDictionaries(Id dictionaryId) throws NotFoundException, OperationFailedException, PermissionDeniedException
dictionaryId - a dictionary Id true if the dictionaryId has
children, false otherwiseNotFoundException - dictionaryId is not
foundNullArgumentException - dictionaryId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isChildOfDictionary(Id id, Id dictionaryId) throws NotFoundException, OperationFailedException, PermissionDeniedException
id - an Id dictionaryId - the Id of a dictionary true if the id is a child of
dictionaryId, false otherwiseNotFoundException - dictionaryId is not
foundNullArgumentException - id or
dictionaryId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. If - id not found return false. IdList getChildDictionaryIds(Id dictionaryId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids of the given dictionary.dictionaryId - the Id to queryNotFoundException - dictionaryId is not
foundNullArgumentException - dictionaryId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DictionaryList getChildDictionaries(Id dictionaryId) throws NotFoundException, OperationFailedException, PermissionDeniedException
id. dictionaryId - the Id of the Dictionary
to query id NotFoundException - a Dictionary
identified by Id is not foundNullArgumentException - dictionaryId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isDescendantOfDictionary(Id id, Id dictionaryId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id is a descendant of a dictionary.id - an Id dictionaryId - the Id of a dictionary true if the id is a descendant
of the dictionaryId, false
otherwiseNotFoundException - dictionaryId not
foundNullArgumentException - id or
dictionaryId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. If - id is not found return false. Node getDictionaryNodeIds(Id dictionaryId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException
dictionaryId - the Id to queryancestorLevels - the maximum number of ancestor levels to
include. A value of 0 returns no parents in the node.descendantLevels - the maximum number of descendant levels to
include. A value of 0 returns no children in the node.includeSiblings - true to include the siblings of
the given node, false to omit the siblingsNotFoundException - dictionaryId is not
foundNullArgumentException - dictionaryId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DictionaryNode getDictionaryNodes(Id dictionaryId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException
dictionaryId - the Id to queryancestorLevels - the maximum number of ancestor levels to
include. A value of 0 returns no parents in the node.descendantLevels - the maximum number of descendant levels to
include. A value of 0 returns no children in the node.includeSiblings - true to include the siblings of
the given node, false to omit the siblingsNotFoundException - dictionaryId is not
foundNullArgumentException - dictionaryId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.