Objects¶
Resource¶
-
class
dlkit.resource.objects.Resource¶ Bases:
dlkit.osid.objects.OsidObjectA
Resourcerepresents an arbitrary entity.Resources are used to define an object to accompany an OSID
Idused in other OSIDs. A resource may be used to represent a meeting room in the Scheduling OSID, or a student in the Course OSID.A
Resourcemay also represent a group or organization. A provider may present such a group in an opaque manner through a single resource definition, or the provider may expose the resource collection for examination or manipulation. If such a resource collection is visible,is_group()istrueand can be used in one of the group sessions available in this OSID.-
is_group()¶ Tests if this resource is a group.
A resource that is a group can be used in the group sessions.
Returns: trueif this resource is a group,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
is_demographic()¶ Tests if this resource is a demographic.
A resource that is a demographic can be used in the demographic service and the group sessions.
Returns: trueif this resource is a demographic,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
has_avatar()¶ Tests if this resource has an avatar.
Returns: trueif this resource has an avatar,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
avatar_id¶ Gets the asset
Id.Returns: the asset IdReturn type: osid.id.IdRaise: IllegalState–has_avatar()isfalsecompliance: mandatory – This method must be implemented.
-
avatar¶ Gets the asset.
Returns: the asset Return type: osid.repository.AssetRaise: IllegalState–has_avatar()isfalseRaise: OperationFailed– unable to complete requestcompliance: mandatory – This method must be implemented.
-
get_resource_record(resource_record_type)¶ Gets the resource record corresponding to the given
ResourcerecordType.This method is used to retrieve an object implementing the requested record. The
resource_record_typemay be theTypereturned inget_record_types()or any of its parents in aTypehierarchy wherehas_record_type(resource_record_type)istrue.Parameters: resource_record_type ( osid.type.Type) – the resource record typeReturns: the resource record Return type: osid.resource.records.ResourceRecordRaise: NullArgument–resource_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(resource_record_type)isfalsecompliance: mandatory – This method must be implemented.
-
Resource Form¶
-
class
dlkit.resource.objects.ResourceForm¶ Bases:
dlkit.osid.objects.OsidObjectFormThis is the form for creating and updating
Resources.Like all
OsidFormobjects, various data elements may be set here for use in the create and update methods in theResourceAdminSession. For each data element that may be set, metadata may be examined to provide display hints or data constraints.Resources can be designated as a group. The group metadata indicates if it is possible to convert a resource to a group and vice-versa.
-
group_metadata¶ Gets the metadata for a group.
Returns: metadata for the group Return type: osid.Metadatacompliance: mandatory – This method must be implemented.
-
group¶
-
avatar_metadata¶ Gets the metadata for an asset.
Returns: metadata for the asset Return type: osid.Metadatacompliance: mandatory – This method must be implemented.
-
avatar¶
-
get_resource_form_record(resource_record_type)¶ Gets the
ResourceFormRecordcorresponding to the givenResourcerecordType.Parameters: resource_record_type ( osid.type.Type) – the resource record typeReturns: the resource form record Return type: osid.resource.records.ResourceFormRecordRaise: NullArgument–resource_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(resource_record_type)isfalsecompliance: mandatory – This method must be implemented.
-
Resource List¶
-
class
dlkit.resource.objects.ResourceList¶ Bases:
dlkit.osid.objects.OsidListLike all
OsidLists,ResourceListprovides a means for accessingResourceelements sequentially either one at a time or many at a time.Examples: while (rl.hasNext()) { Resource resource = rl.getNextResource(); }
- or
- while (rl.hasNext()) {
- Resource[] resources = rl.getNextResources(rl.available());
}
-
next_resource¶ Gets the next
Resourcein this list.Returns: the next Resourcein this list. Thehas_next()method should be used to test that a nextResourceis available before calling this method.Return type: osid.resource.ResourceRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete requestcompliance: mandatory – This method must be implemented.
-
get_next_resources(n)¶ Gets the next set of
Resourcesin this list which must be less than or equal to the return fromavailable().Parameters: n ( cardinal) – the number ofResourceelements requested which must be less than or equal toavailable()Returns: an array of Resourceelements.The length of the array is less than or equal to the number specified.Return type: osid.resource.ResourceRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete requestcompliance: mandatory – This method must be implemented.
Resource Node¶
-
class
dlkit.resource.objects.ResourceNode¶ 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
BinHierarchySession.-
resource¶ Gets the
Resourceat this node.Returns: the resource represented by this node Return type: osid.resource.Resourcecompliance: mandatory – This method must be implemented.
-
parent_resource_nodes¶ Gets the parents of this resource.
Returns: the parents of the resource Return type: osid.resource.ResourceNodeListcompliance: mandatory – This method must be implemented.
-
child_resource_nodes¶ Gets the children of this resource.
Returns: the children of this resource Return type: osid.resource.ResourceNodeListcompliance: mandatory – This method must be implemented.
-
Resource Node List¶
-
class
dlkit.resource.objects.ResourceNodeList¶ Bases:
dlkit.osid.objects.OsidListLike all
OsidLists,ResourceNodeListprovides a means for accessingResourceNodeelements sequentially either one at a time or many at a time.Examples: while (rnl.hasNext()) { ResourceNode node = rnl.getNextResourceNode(); }
- or
- while rnl.hasNext()) {
- ResourceNode[] nodes = rnl.getNextResourceNodes(rnl.available());
}
-
next_resource_node¶ Gets the next
ResourceNodein this list.Returns: the next ResourceNodein this list. Thehas_next()method should be used to test that a nextResourceNodeis available before calling this method.Return type: osid.resource.ResourceNodeRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete requestcompliance: mandatory – This method must be implemented.
-
get_next_resource_nodes(n)¶ Gets the next set of
ResourceNodeelements in this list which must be less than or equal to the return fromavailable().Parameters: n ( cardinal) – the number ofResourceNodeelements requested which must be less than or equal toavailable()Returns: an array of ResourceNodeelements.The length of the array is less than or equal to the number specified.Return type: osid.resource.ResourceNodeRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete requestcompliance: mandatory – This method must be implemented.
Bin¶
-
class
dlkit.resource.objects.Bin(abc_resource_objects.Bin, osid_objects.OsidCatalog)¶ -
:noindex: -
get_bin_record(bin_record_type)¶ Gets the bin record corresponding to the given
BinrecordType.This method is used to retrieve an object implementing the requested record. The
bin_record_typemay be theTypereturned inget_record_types()or any of its parents in aTypehierarchy wherehas_record_type(bin_record_type)istrue.Parameters: bin_record_type ( osid.type.Type) – the bin record typeReturns: the bin record Return type: osid.resource.records.BinRecordRaise: NullArgument–bin_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(bin_record_type)isfalsecompliance: mandatory – This method must be implemented.
-
Bin Form¶
-
class
dlkit.resource.objects.BinForm¶ Bases:
dlkit.osid.objects.OsidCatalogFormThis is the form for creating and updating bins.
Like all
OsidFormobjects, various data elements may be set here for use in the create and update methods in theBinAdminSession. For each data element that may be set, metadata may be examined to provide display hints or data constraints.-
get_bin_form_record(bin_record_type)¶ Gets the
BinFormRecordcorresponding to the given bin recordType.Parameters: bin_record_type ( osid.type.Type) – the bin record typeReturns: the bin form record Return type: osid.resource.records.BinFormRecordRaise: NullArgument–bin_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(bin_record_type)isfalsecompliance: mandatory – This method must be implemented.
-
Bin List¶
-
class
dlkit.resource.objects.BinList¶ Bases:
dlkit.osid.objects.OsidListLike all
OsidLists,BinListprovides a means for accessingBinelements sequentially either one at a time or many at a time.Examples: while (bl.hasNext()) { Bin bin = bl.getNextBin(); }
- or
- while (bl.hasNext()) {
- Bin[] bins = bl.getNextBins(bl.available());
}
-
next_bin¶ Gets the next
Binin this list.Returns: the next Binin this list. Thehas_next()method should be used to test that a nextBinis available before calling this method.Return type: osid.resource.BinRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete requestcompliance: mandatory – This method must be implemented.
-
get_next_bins(n)¶ Gets the next set of
Binelements in this list which must be less than or equal to the return fromavailable().Parameters: n ( cardinal) – the number ofBinelements requested which must be less than or equal toavailable()Returns: an array of Binelements.The length of the array is less than or equal to the number specified.Return type: osid.resource.BinRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete requestcompliance: mandatory – This method must be implemented.
Bin Node¶
-
class
dlkit.resource.objects.BinNode¶ 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
BinHierarchySession.-
bin¶ Gets the
Binat this node.Returns: the bin represented by this node Return type: osid.resource.Bincompliance: mandatory – This method must be implemented.
-
parent_bin_nodes¶ Gets the parents of this bin.
Returns: the parents of the idReturn type: osid.resource.BinNodeListcompliance: mandatory – This method must be implemented.
-
child_bin_nodes¶ Gets the children of this bin.
Returns: the children of this bin Return type: osid.resource.BinNodeListcompliance: mandatory – This method must be implemented.
-
Bin Node List¶
-
class
dlkit.resource.objects.BinNodeList¶ Bases:
dlkit.osid.objects.OsidListLike all
OsidLists,BinNodeListprovides a means for accessingBinNodeelements sequentially either one at a time or many at a time.Examples: while (bnl.hasNext()) { BinNode node = bnl.getNextBinNode(); }
- or
- while (bnl.hasNext()) {
- BinNode[] nodes = bnl.getNextBinNodes(bnl.available());
}
-
next_bin_node¶ Gets the next
BinNodein this list.Returns: the next BinNodein this list. Thehas_next()method should be used to test that a nextBinNodeis available before calling this method.Return type: osid.resource.BinNodeRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete requestcompliance: mandatory – This method must be implemented.
-
get_next_bin_nodes(n)¶ Gets the next set of
BinNodeelements in this list which must be less than or equal to the return fromavailable().Parameters: n ( cardinal) – the number ofBinNodeelements requested which must be less than or equal toavailable()Returns: an array of BinNodeelements.The length of the array is less than or equal to the number specified.Return type: osid.resource.BinNodeRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete requestcompliance: mandatory – This method must be implemented.