Objects¶
Hierarchy¶
-
class
dlkit.hierarchy.objects.Hierarchy(abc_hierarchy_objects.Hierarchy, osid_objects.OsidCatalog)¶ -
:noindex: -
get_hierarchy_record(hierarchy_record_type)¶ Gets the hierarchy record corresponding to the given
HierarchyrecordType.This method is used to retrieve an object implementing the requested record. The
hierarchy_record_typemay be theTypereturned inget_record_types()or any of its parents in aTypehierarchy wherehas_record_type(hierarchy_record_type)istrue.Parameters: hierarchy_record_type ( osid.type.Type) – the type of the record to retrieveReturns: the hierarchy record Return type: osid.hierarchy.records.HierarchyRecordRaise: NullArgument–hierarchy_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(hierarchyrecord_type)isfalsecompliance: mandatory – This method must be implemented.
-
Hierarchy Form¶
-
class
dlkit.hierarchy.objects.HierarchyForm¶ Bases:
dlkit.osid.objects.OsidCatalogFormThis is the form for creating and updating
Hierarchyobjects.Like all
OsidFormobjects, various data elements may be set here for use in the create and update methods in theHierarchyAdminSession. For each data element that may be set, metadata may be examined to provide display hints or data constraints.-
get_hierarchy_form_record(hierarchy_record_type)¶ Gets the
HierarchyFormRecordcorresponding to the given hierarchy recordType.Parameters: hierarchy_record_type ( osid.type.Type) – the hierarchy record typeReturns: the hierarchy form record Return type: osid.hierarchy.records.HierarchyFormRecordRaise: NullArgument–hierarchy_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(hierarchy_record_type)isfalsecompliance: mandatory – This method must be implemented.
-
Hierarchy List¶
-
class
dlkit.hierarchy.objects.HierarchyList¶ Bases:
dlkit.osid.objects.OsidListLike all
OsidLists,HierarchyListprovides a means for accessingIdelements sequentially either one at a time or many at a time.Examples: while (hl.hasNext()) { Hierarchy hierarchy = hl.getNextHierarchy(); }
- or
- while (hl.hasNext()) {
- Hierarchy[] hierarchies = hl.getNextHierarchies(hl.available());
}
-
next_hierarchy¶ Gets the next
Hierarchyin this list.Returns: the next Hierarchyin this list. Thehas_next()method should be used to test that a nextHierarchyis available before calling this method.Return type: osid.hierarchy.HierarchyRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete requestcompliance: mandatory – This method must be implemented.
-
get_next_hierarchies(n)¶ Gets the next set of
Hierarchyobjects in this list.The specified amount must be less than or equal to the return from
available().Parameters: n ( cardinal) – the number ofHierarchyelements requested which must be less than or equal toavailable()Returns: an array of Hierarchyelements.The length of the array is less than or equal to the number specified.Return type: osid.hierarchy.HierarchyRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete requestcompliance: mandatory – This method must be implemented.
Node¶
-
class
dlkit.hierarchy.objects.Node¶ Bases:
dlkit.osid.objects.OsidNodeThis interface is a container for a partial hierarchy retrieval.
The number of hierarchy levels traversable through this interface depend on the number of levels requested in the hierarchy traversal session.
-
parents¶ Gets the parents of this node.
Returns: the parents of this node Return type: osid.hierarchy.NodeListcompliance: mandatory – This method must be implemented.
-
children¶ Gets the children of this node.
Returns: the children of this node Return type: osid.hierarchy.NodeListcompliance: mandatory – This method must be implemented.
-
Node List¶
-
class
dlkit.hierarchy.objects.NodeList¶ Bases:
dlkit.osid.objects.OsidListLike all
OsidLists,NodeListprovides a means for accessingIdelements sequentially either one at a time or many at a time.Examples: while (nl.hasNext()) { Node node = nl.getNextNode(); }
- or
- while (nl.hasNext()) {
- Node[] nodes = nl.getNextNodes(nl.available());
}
-
next_node¶ Gets the next
Nodein this list.Returns: the next Nodein this list. Thehas_next()method should be used to test that a nextNodeis available before calling this method.Return type: osid.hierarchy.NodeRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete requestcompliance: mandatory – This method must be implemented.
-
get_next_nodes(n)¶ Gets the next set of
Nodeobjects in this list.The specified amount must be less than or equal to the return from
available().Parameters: n ( cardinal) – the number ofNodeelements requested which must be less than or equal toavailable()Returns: an array of Nodeelements.The length of the array is less than or equal to the number specified.Return type: osid.hierarchy.NodeRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete requestcompliance: mandatory – This method must be implemented.