OSID Logo
OSID Specifications
lexicon package
Version 3.0.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.Idthe hierarchy Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetPressHierarchy
Description

Gets the hierarchy associated with this session.

Returnosid.hierarchy.Hierarchythe hierarchy associated with this session
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis 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.

Returnbooleanfalse if hierarchy traversal methods are not authorized, true otherwise
CompliancemandatoryThis 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.

CompliancemandatoryThis 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.

CompliancemandatoryThis method is must be implemented.
MethodgetRootPressIds
Description

Gets the root press Ids in this hierarchy.

Returnosid.id.IdListthe root press Ids
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis 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.PressListthe root presses
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method is must be implemented.
MethodhasParentPresses
Description

Tests if the Press has any parents.

Parametersosid.id.IdpressIdan press Id
Returnbooleantrue if the press has parents, f alse otherwise
ErrorsNOT_FOUNDpressId is not found
NULL_ARGUMENTpressId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodisParentOfPress
Description

Tests if an Id is a direct parent of press.

Parametersosid.id.Ididan Id
osid.id.IdpressIdthe Id of an press
Returnbooleantrue if this id is a parent of pressId , f alse otherwise
ErrorsNOT_FOUNDpressId is not found
NULL_ARGUMENTid or pressId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
Provider Notes

If id not found return false .

MethodgetParentPressIds
Description

Gets the parent Ids of the given press.

Parametersosid.id.IdpressIdan press Id
Returnosid.id.IdListthe parent Ids of the press
ErrorsNOT_FOUNDpressId is not found
NULL_ARGUMENTpressId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetParentPresses
Description

Gets the parents of the given press.

Parametersosid.id.IdpressIdthe Id to query
Returnosid.lexicon.PressListthe parents of the press
ErrorsNOT_FOUNDpressId not found
NULL_ARGUMENTpressId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodisAncestorOfPress
Description

Tests if an Id is an ancestor of an press.

Parametersosid.id.Ididan Id
osid.id.IdpressIdthe Id of an press
Returnbooleantrue if this id is an ancestor of pressId , false otherwise
ErrorsNOT_FOUNDpressId not found
NULL_ARGUMENTpressId or id is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
Provider Notes

If id not found return false .

MethodhasChildPresses
Description

Tests if an press has any children.

Parametersosid.id.IdpressIdan press Id
Returnbooleantrue if the pressId has children, false otherwise
ErrorsNOT_FOUNDpressId not found
NULL_ARGUMENTpressId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodisChildOfPress
Description

Tests if an press is a direct child of another.

Parametersosid.id.Ididan Id
osid.id.IdpressIdthe Id of an press
Returnbooleantrue if the id is a child of pressId , false otherwise
ErrorsNOT_FOUNDpressId not found
NULL_ARGUMENTid or pressId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
Provider Notes

If id not found return false .

MethodgetChildPressIds
Description

Gets the child Ids of the given press.

Parametersosid.id.IdpressIdthe Id to query
Returnosid.id.IdListthe children of the press
ErrorsNOT_FOUNDpressId not found
NULL_ARGUMENTpressId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetChildPresses
Description

Gets the children of the given press.

Parametersosid.id.IdpressIdthe Id to query
Returnosid.lexicon.PressListthe children of the press
ErrorsNOT_FOUNDpressId not found
NULL_ARGUMENTpressId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodisDescendantOfPress
Description

Tests if an Id is a descendant of an press.

Parametersosid.id.Ididan Id
osid.id.IdpressIdthe Id of an press
Returnbooleantrue if the id is a descendant of the pressId , false otherwise
ErrorsNOT_FOUNDpressId not found
NULL_ARGUMENTid or pressId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis 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.IdpressIdthe Id to query
cardinalancestorLevelsthe maximum number of ancestor levels to include. A value of 0 returns no parents in the press.
cardinaldescendantLevelsthe maximum number of descendant levels to include. A value of 0 returns no children in the press.
booleanincludeSiblingstrue to include the siblings of the given press, false to omit the siblings
Returnosid.hierarchy.Nodean press node
ErrorsNOT_FOUNDpressId not found
NULL_ARGUMENTpressId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetPressNodes
Description

Gets a portion of the hierarchy for the given press.

Parametersosid.id.IdpressIdthe Id to query
cardinalancestorLevelsthe maximum number of ancestor levels to include. A value of 0 returns no parents in the hierarchy.
cardinaldescendantLevelsthe maximum number of descendant levels to include. A value of 0 returns no children in the hierarchy.
booleanincludeSiblingstrue to include the siblings of the given press, false to omit the siblings
Returnosid.lexicon.PressNodean press node
ErrorsNOT_FOUNDpressId not found
NULL_ARGUMENTpressId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.