Objects¶
Relationship¶
-
class
dlkit.relationship.objects.Relationship¶ Bases:
dlkit.osid.objects.OsidRelationshipA
Relationshipis an object between two peers.The genus type indicates the relationship between the peer and the related peer.
-
source_id¶ Gets the from peer
Idin this relationship.Returns: the peer Return type: osid.id.Idcompliance: mandatory – This method must be implemented.
-
destination_id¶ Gets the to peer
Idin this relationship.Returns: the related peer Return type: osid.id.Idcompliance: mandatory – This method must be implemented.
-
get_relationship_record(relationship_record_type)¶ Gets the relationshop record corresponding to the given
RelationshiprecordType.This method is used to retrieve an object implementing the requested record. The
relationship_record_typemay be theTypereturned inget_record_types()or any of its parents in aTypehierarchy wherehas_record_type(relationship_record_type)istrue.Parameters: relationship_record_type ( osid.type.Type) – the type of relationship record to retrieveReturns: the relationship record Return type: osid.relationship.records.RelationshipRecordRaise: NullArgument–relationship_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–has_record_type(relationship_record_type)isfalsecompliance: mandatory – This method must be implemented.
-
Relationship Form¶
-
class
dlkit.relationship.objects.RelationshipForm¶ Bases:
dlkit.osid.objects.OsidRelationshipFormThis is the form for creating and updating
Relationships.Like all
OsidFormobjects, various data elements may be set here for use in the create and update methods in theRelationshipAdminSession. For each data element that may be set, metadata may be examined to provide display hints or data constraints.-
get_relationship_form_record(relationship_record_type)¶ Gets the
RelationshipFormRecordcorresponding to the given relationship recordType.Parameters: relationship_record_type ( osid.type.Type) – a relationship record typeReturns: the relationship form record Return type: osid.relationship.records.RelationshipFormRecordRaise: NullArgument–relationship_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–has_record_type(relationship_record_type)isfalsecompliance: mandatory – This method must be implemented.
-
Relationship List¶
-
class
dlkit.relationship.objects.RelationshipList¶ Bases:
dlkit.osid.objects.OsidListLike all
OsidLists,Relationshipprovides a means for accessingRelationshipelements sequentially either one at a time or many at a time.Examples: while (rl.hasNext()) { Relationship relationship = rl.getNextRelationship(); }
- or
- while (rl.hasNext()) {
- Relationship[] relationships = rl.getNextRelationships(rl.available());
}
-
next_relationship¶ Gets the next
Relationshipin this list.Returns: the next Relationshipin this list. Thehas_next()method should be used to test that a nextRelationshipis available before calling this method.Return type: osid.relationship.RelationshipRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete requestcompliance: mandatory – This method must be implemented.
-
get_next_relationships(n)¶ Gets the next set of
Relationshipselements in this list.The specified amount must be less than or equal to the return from
available().Parameters: n ( cardinal) – the number ofRelationshipelements requested which must be less than or equal toavailable()Returns: an array of Relationshipelements.The length of the array is less than or equal to the number specified.Return type: osid.relationship.RelationshipRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete requestcompliance: mandatory – This method must be implemented.
Family¶
-
class
dlkit.relationship.objects.Family(abc_relationship_objects.Family, osid_objects.OsidCatalog)¶ -
:noindex: -
get_family_record(family_record_type)¶ Gets the famly record corresponding to the given
FamilyrecordType.This method is used to retrieve an object implementing the requested record. The
family_record_typemay be theTypereturned inget_record_types()or any of its parents in aTypehierarchy wherehas_record_type(family_record_type)istrue.Parameters: family_record_type ( osid.type.Type) – the type of family record to retrieveReturns: the family record Return type: osid.relationship.records.FamilyRecordRaise: NullArgument–family_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–has_record_type(family_record_type)isfalsecompliance: mandatory – This method must be implemented.
-
Family Form¶
-
class
dlkit.relationship.objects.FamilyForm¶ Bases:
dlkit.osid.objects.OsidCatalogFormThis is the form for creating and updating
Familyobjects.Like all
OsidFormobjects, various data elements may be set here for use in the create and update methods in theFamilyAdminSession. For each data element that may be set, metadata may be examined to provide display hints or data constraints.-
get_family_form_record(family_record_type)¶ Gets the
FamilyFormRecordcorresponding to the given family recordType.Parameters: family_record_type ( osid.type.Type) – the family record typeReturns: the family form record Return type: osid.relationship.records.FamilyFormRecordRaise: NullArgument–family_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–has_record_type(family_record_type)isfalsecompliance: mandatory – This method must be implemented.
-
Family List¶
-
class
dlkit.relationship.objects.FamilyList¶ Bases:
dlkit.osid.objects.OsidListLike all
OsidLists,FamilyListprovides a means for accessingFamilyelements sequentially either one at a time or many at a time.Examples: while (fl.hasNext()) { Family family = fl.getNextFamily(); }
- or
- while (fl.hasNext()) {
- Family[] families = fl.getNextFamilies(fl.available());
}
-
next_family¶ Gets the next
Familyin this list.Returns: the next Familyin this list. Thehas_next()method should be used to test that a nextFamilyis available before calling this method.Return type: osid.relationship.FamilyRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete requestcompliance: mandatory – This method must be implemented.
-
get_next_families(n)¶ Gets the next set of
Family elementsin this list.The specified amount must be less than or equal to the return from
available().Parameters: n ( cardinal) – the number ofFamilyelements requested which must be less than or equal toavailable()Returns: an array of Familyelements.The length of the array is less than or equal to the number specified.Return type: osid.relationship.FamilyRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete requestcompliance: mandatory – This method must be implemented.
Family Node¶
-
class
dlkit.relationship.objects.FamilyNode¶ 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
FamilyHierarchySession.-
family¶ Gets the
Familyat this node.Returns: the family represented by this node Return type: osid.relationship.Familycompliance: mandatory – This method must be implemented.
-
parent_family_nodes¶ Gets the parents of this family.
Returns: the parents of the idReturn type: osid.relationship.FamilyNodeListcompliance: mandatory – This method must be implemented.
-
child_family_nodes¶ Gets the children of this family.
Returns: the children of this family Return type: osid.relationship.FamilyNodeListcompliance: mandatory – This method must be implemented.
-
Family Node List¶
-
class
dlkit.relationship.objects.FamilyNodeList¶ Bases:
dlkit.osid.objects.OsidListLike all
OsidLists,FamilyNodeListprovides a means for accessingFamilyNodeelements sequentially either one at a time or many at a time.Examples: while (fnl.hasNext()) { FamilyNode node = fnl.getNextFamilyNode(); }
- or
- while (fnl.hasNext()) {
- FamilyNode[] nodes = fnl.getNextFamilyNodes(fnl.available());
}
-
next_family_node¶ Gets the next
FamilyNodein this list.Returns: the next FamilyNodein this list. Thehas_next()method should be used to test that a nextFamilyNodeis available before calling this method.Return type: osid.relationship.FamilyNodeRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete requestcompliance: mandatory – This method must be implemented.
-
get_next_family_nodes(n)¶ Gets the next set of
FamilyNode elementsin this list.The specified amount must be less than or equal to the return from
available().Parameters: n ( cardinal) – the number ofFamilyNodeelements requested which must be less than or equal toavailable()Returns: an array of FamilyNodeelements.The length of the array is less than or equal to the number specified.Return type: osid.relationship.FamilyNodeRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete requestcompliance: mandatory – This method must be implemented.