OSID Logo
OSID Specifications
search package
Version 3.0.0
Release Candidate Preview
Interfaceosid.search.EngineHierarchySession
Implementsosid.OsidSession
Description

This session defines methods for traversing a hierarchy of Engine objects. Each node in the hierarchy is a unique Engine. The hierarchy may be traversed recursively to establish the tree structure through getParentEngines() and getChildEngines(). To relate these Ids to another OSID, getEngienNodes() can be used for retrievals that can be used for bulk lookups in other OSIDs. Any Engine available in the Rule 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 getParentEngines() or getChildEngines() 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.

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

Gets the hierarchy Id associated with this session.

Returnosid.id.Idthe hierarchy Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetEngineHierarchy
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.
MethodcanAccessEngineHierarchy
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 an application that may wish not to offer traversal operations to unauthorized users.

Returnboolean false if hierarchy traversal methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoduseComparativeEngineView
Description

The returns from the engine 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.
MethodusePlenaryEngineView
Description

A complete view of the Engine 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.
MethodgetRootEngineIds
Description

Gets the root engine Ids in this hierarchy.

Returnosid.id.IdListthe root engine Ids
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetRootEngines
Description

Gets the root engines in this engine hierarchy.

Returnosid.search.EngineListthe root engines
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method is must be implemented.
MethodhasParentEngines
Description

Tests if the Engine has any parents.

Parametersosid.id.IdengineIdthe Id of an engine
Returnboolean true if the engine has parents, false otherwise
ErrorsNOT_FOUND engineId is not found
NULL_ARGUMENT engineId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodisParentOfEngine
Description

Tests if an Id is a direct parent of an engine.

Parametersosid.id.Ididan Id
osid.id.IdengineIdthe Id of an egine
Returnboolean true if this id is a parent of engineId, false otherwise
ErrorsNOT_FOUND engineId is not found
NULL_ARGUMENT id or engineId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
Provider Notes

If id not found return false.

MethodgetParentEngineIds
Description

Gets the parent Ids of the given engine

Parametersosid.id.IdengineIdthe Id of an egine
Returnosid.id.IdListthe parent Ids of the engine
ErrorsNOT_FOUND engineId is not found
NULL_ARGUMENT engineId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetParentEngines
Description

Gets the parent engines of the given id.

Parametersosid.id.IdengineIdthe Id of the Engine to query
Returnosid.search.EngineListthe parent engines of the id
ErrorsNOT_FOUNDan Engine identified by Id is not found
NULL_ARGUMENT engineId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodisAncestorOfEngine
Description

Tests if an Id is an ancestor of an engine.

Parametersosid.id.Ididan Id
osid.id.IdengineIdthe Id of an engine
Returnboolean true if this id is an ancestor of engineId, false otherwise
ErrorsNOT_FOUND engineId is not found
NULL_ARGUMENT id or engineId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
Provider Notes

If id not found return false.

MethodhasChildEngines
Description

Tests if an engine has any children.

Parametersosid.id.IdengineIdthe Id of an engine
Returnboolean true if the engineId has children, false otherwise
ErrorsNOT_FOUND engineId is not found
NULL_ARGUMENT engineId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodisChildOfEngine
Description

Tests if an engine is a direct child of another.

Parametersosid.id.Ididan Id
osid.id.IdengineIdthe Id of an engine
Returnboolean true if the id is a child of engineId, false otherwise
ErrorsNOT_FOUND engineId is not found
NULL_ARGUMENT id or engineId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
Provider Notes

If id not found return false.

MethodgetChildEngineIds
Description

Gets the child Ids of the given engine.

Parametersosid.id.IdengineIdthe Id to query
Returnosid.id.IdListthe children of the engine
ErrorsNOT_FOUND engineId is not found
NULL_ARGUMENT engineId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetChildEngines
Description

Gets the child engines of the given id.

Parametersosid.id.IdengineIdthe Id of the Engine to query
Returnosid.search.EngineListthe child engines of the id
ErrorsNOT_FOUNDan Engine identified by Id is not found
NULL_ARGUMENT engineId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodisDescendantOfEngine
Description

Tests if an Id is a descendant of an egine.

Parametersosid.id.Ididan Id
osid.id.IdengineIdthe Id of an engine
Returnboolean true if the id is a descendant of the engineId, false otherwise
ErrorsNOT_FOUND engineId is not found
NULL_ARGUMENT id or engineId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
Provider Notes

If id is not found return false.

MethodgetEngineNodeIds
Description

Gets a portion of the hierarchy for the given engine.

Parametersosid.id.IdengineIdthe Id to query
cardinalancestorLevelsthe maximum number of ancestor levels to include. A value of 0 returns no parents in the node.
cardinaldescendantLevelsthe maximum number of descendant levels to include. A value of 0 returns no children in the node.
booleanincludeSiblings true to include the siblings of the given node, false to omit the siblings
Returnosid.hierarchy.Nodean engine node
ErrorsNOT_FOUND engineId is not found
NULL_ARGUMENT engineId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetEngineNodes
Description

Gets a portion of the hierarchy for the given engine.

Parametersosid.id.IdengineIdthe Id to query
cardinalancestorLevelsthe maximum number of ancestor levels to include. A value of 0 returns no parents in the node.
cardinaldescendantLevelsthe maximum number of descendant levels to include. A value of 0 returns no children in the node.
booleanincludeSiblings true to include the siblings of the given node, false to omit the siblings
Returnosid.search.EngineNodean engine node
ErrorsNOT_FOUND engineId is not found
NULL_ARGUMENT engineId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.