OSID Logo
OSID Specifications
lexicon package
Version 3.1.0
Interfaceosid.lexicon.PressHierarchySession
Implementsosid.OsidSession
Used Byosid.lexicon.LexiconManager
osid.lexicon.LexiconProxyManager
Description

This session defines methods for traversing a hierarchy of Presses. Each node in the hierarchy is a unique Press. The hierarchy may be traversed recursively to establish the tree structure through getParentPresses() and getChildPresses(). To relate these Ids to another OSID, getPressNodes() can be used for retrievals that can be used for bulk lookups in other OSIDs. Any Press available in the Lexicon OSID is known to this hierarchy but does not appear in the hierarchy traversal until added as a root press or a child of another press.

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 getParentPresses() or getChildPresses() in lieu of a PERMISSION_DENIED error that may disrupt the traversal through authorized textways.

This session defines views that offer differing behaviors when retrieving multiple objects.

  • comparative press view: press elements may be silently omitted or re-ordered
  • plenary press view: provides a complete set or is an error condition
MethodgetPressHierarchyId
Description

Gets the hierarchy Id associated with this session.

Returnosid.id.Id the hierarchy Id associated with this session
Compliancemandatory This method must be implemented.
MethodgetPressHierarchy
Description

Gets the hierarchy associated with this session.

Returnosid.hierarchy.Hierarchy the hierarchy associated with this session
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodcanAccessPressHierarchy
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 PERMISSION_DENIED. This is intended as a hint to an press that may opt not to offer lookup operations.

Returnboolean false if hierarchy traversal methods are not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethoduseComparativePressView
Description

The returns from the press 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.

Compliancemandatory This method is must be implemented.
MethodusePlenaryPressView
Description

A complete view of the Presses 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.

Compliancemandatory This method is must be implemented.
MethodgetRootPressIds
Description

Gets the root press Ids in this hierarchy.

Returnosid.id.IdList the root press Ids
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodgetRootPresses
Description

Gets the root press in the press hierarchy. an press with no parents is an orphan. While all press Ids are known to the hierarchy, an orphan does not appear in the hierarchy unless explicitly added as a root press or child of another press.

Returnosid.lexicon.PressList the root presses
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method is must be implemented.
MethodhasParentPresses
Description

Tests if the Press has any parents.

Parametersosid.id.IdpressId an press Id
Returnboolean true if the press has parents, f alse otherwise
ErrorsNOT_FOUND pressId is not found
NULL_ARGUMENT pressId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodisParentOfPress
Description

Tests if an Id is a direct parent of press.

Parametersosid.id.Idid an Id
osid.id.IdpressId the Id of an press
Returnboolean true if this id is a parent of pressId, f alse otherwise
ErrorsNOT_FOUND pressId is not found
NULL_ARGUMENT id or pressId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
Provider Notes

If id not found return false.

MethodgetParentPressIds
Description

Gets the parent Ids of the given press.

Parametersosid.id.IdpressId an press Id
Returnosid.id.IdList the parent Ids of the press
ErrorsNOT_FOUND pressId is not found
NULL_ARGUMENT pressId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodgetParentPresses
Description

Gets the parents of the given press.

Parametersosid.id.IdpressId the Id to query
Returnosid.lexicon.PressList the parents of the press
ErrorsNOT_FOUND pressId not found
NULL_ARGUMENT pressId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodisAncestorOfPress
Description

Tests if an Id is an ancestor of an press.

Parametersosid.id.Idid an Id
osid.id.IdpressId the Id of an press
Returnboolean true if this id is an ancestor of pressId, false otherwise
ErrorsNOT_FOUND pressId not found
NULL_ARGUMENT pressId or id is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
Provider Notes

If id not found return false.

MethodhasChildPresses
Description

Tests if an press has any children.

Parametersosid.id.IdpressId an press Id
Returnboolean true if the pressId has children, false otherwise
ErrorsNOT_FOUND pressId not found
NULL_ARGUMENT pressId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodisChildOfPress
Description

Tests if an press is a direct child of another.

Parametersosid.id.Idid an Id
osid.id.IdpressId the Id of an press
Returnboolean true if the id is a child of pressId, false otherwise
ErrorsNOT_FOUND pressId not found
NULL_ARGUMENT id or pressId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
Provider Notes

If id not found return false.

MethodgetChildPressIds
Description

Gets the child Ids of the given press.

Parametersosid.id.IdpressId the Id to query
Returnosid.id.IdList the children of the press
ErrorsNOT_FOUND pressId not found
NULL_ARGUMENT pressId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodgetChildPresses
Description

Gets the children of the given press.

Parametersosid.id.IdpressId the Id to query
Returnosid.lexicon.PressList the children of the press
ErrorsNOT_FOUND pressId not found
NULL_ARGUMENT pressId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodisDescendantOfPress
Description

Tests if an Id is a descendant of an press.

Parametersosid.id.Idid an Id
osid.id.IdpressId the Id of an press
Returnboolean true if the id is a descendant of the pressId, false otherwise
ErrorsNOT_FOUND pressId not found
NULL_ARGUMENT id or pressId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
Provider Notes

If id is not found return false.

MethodgetPressNodeIds
Description

Gets a portion of the hierarchy for the given press.

Parametersosid.id.IdpressId the Id to query
cardinalancestorLevels the maximum number of ancestor levels to include. A value of 0 returns no parents in the press.
cardinaldescendantLevels the maximum number of descendant levels to include. A value of 0 returns no children in the press.
booleanincludeSiblings true to include the siblings of the given press, false to omit the siblings
Returnosid.hierarchy.Node an press node
ErrorsNOT_FOUND pressId not found
NULL_ARGUMENT pressId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodgetPressNodes
Description

Gets a portion of the hierarchy for the given press.

Parametersosid.id.IdpressId the Id to query
cardinalancestorLevels the maximum number of ancestor levels to include. A value of 0 returns no parents in the hierarchy.
cardinaldescendantLevels the maximum number of descendant levels to include. A value of 0 returns no children in the hierarchy.
booleanincludeSiblings true to include the siblings of the given press, false to omit the siblings
Returnosid.lexicon.PressNode an press node
ErrorsNOT_FOUND pressId not found
NULL_ARGUMENT pressId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.