Objects

Relationship

class dlkit.relationship.objects.Relationship

Bases: dlkit.osid.objects.OsidRelationship

A Relationship is an object between two peers.

The genus type indicates the relationship between the peer and the related peer.

source_id

Gets the from peer Id in this relationship.

Returns:the peer
Return type:osid.id.Id

compliance: mandatory – This method must be implemented.

destination_id

Gets the to peer Id in this relationship.

Returns:the related peer
Return type:osid.id.Id

compliance: mandatory – This method must be implemented.

get_relationship_record(relationship_record_type)

Gets the relationshop record corresponding to the given Relationship record Type.

This method is used to retrieve an object implementing the requested record. The relationship_record_type may be the Type returned in get_record_types() or any of its parents in a Type hierarchy where has_record_type(relationship_record_type) is true .

Parameters:relationship_record_type (osid.type.Type) – the type of relationship record to retrieve
Returns:the relationship record
Return type:osid.relationship.records.RelationshipRecord
Raise:NullArgumentrelationship_record_type is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure occurred
Raise:Unsupportedhas_record_type(relationship_record_type) is false

compliance: mandatory – This method must be implemented.

Relationship Form

class dlkit.relationship.objects.RelationshipForm

Bases: dlkit.osid.objects.OsidRelationshipForm

This is the form for creating and updating Relationships.

Like all OsidForm objects, various data elements may be set here for use in the create and update methods in the RelationshipAdminSession. 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 RelationshipFormRecord corresponding to the given relationship record Type.

Parameters:relationship_record_type (osid.type.Type) – a relationship record type
Returns:the relationship form record
Return type:osid.relationship.records.RelationshipFormRecord
Raise:NullArgumentrelationship_record_type is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure occurred
Raise:Unsupportedhas_record_type(relationship_record_type) is false

compliance: mandatory – This method must be implemented.

Relationship List

class dlkit.relationship.objects.RelationshipList

Bases: dlkit.osid.objects.OsidList

Like all OsidLists, Relationship provides a means for accessing Relationship elements 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 Relationship in this list.

Returns:the next Relationship in this list. The has_next() method should be used to test that a next Relationship is available before calling this method.
Return type:osid.relationship.Relationship
Raise:IllegalState – no more elements available in this list
Raise:OperationFailed – unable to complete request

compliance: mandatory – This method must be implemented.

get_next_relationships(n)

Gets the next set of Relationships elements in this list.

The specified amount must be less than or equal to the return from available().

Parameters:n (cardinal) – the number of Relationship elements requested which must be less than or equal to available()
Returns:an array of Relationship elements.The length of the array is less than or equal to the number specified.
Return type:osid.relationship.Relationship
Raise:IllegalState – no more elements available in this list
Raise:OperationFailed – unable to complete request

compliance: 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 Family record Type.

This method is used to retrieve an object implementing the requested record. The family_record_type may be the Type returned in get_record_types() or any of its parents in a Type hierarchy where has_record_type(family_record_type) is true .

Parameters:family_record_type (osid.type.Type) – the type of family record to retrieve
Returns:the family record
Return type:osid.relationship.records.FamilyRecord
Raise:NullArgumentfamily_record_type is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure occurred
Raise:Unsupportedhas_record_type(family_record_type) is false

compliance: mandatory – This method must be implemented.

Family Form

class dlkit.relationship.objects.FamilyForm

Bases: dlkit.osid.objects.OsidCatalogForm

This is the form for creating and updating Family objects.

Like all OsidForm objects, various data elements may be set here for use in the create and update methods in the FamilyAdminSession. 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 FamilyFormRecord corresponding to the given family record Type.

Parameters:family_record_type (osid.type.Type) – the family record type
Returns:the family form record
Return type:osid.relationship.records.FamilyFormRecord
Raise:NullArgumentfamily_record_type is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure occurred
Raise:Unsupportedhas_record_type(family_record_type) is false

compliance: mandatory – This method must be implemented.

Family List

class dlkit.relationship.objects.FamilyList

Bases: dlkit.osid.objects.OsidList

Like all OsidLists, FamilyList provides a means for accessing Family elements 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 Family in this list.

Returns:the next Family in this list. The has_next() method should be used to test that a next Family is available before calling this method.
Return type:osid.relationship.Family
Raise:IllegalState – no more elements available in this list
Raise:OperationFailed – unable to complete request

compliance: mandatory – This method must be implemented.

get_next_families(n)

Gets the next set of Family elements in this list.

The specified amount must be less than or equal to the return from available().

Parameters:n (cardinal) – the number of Family elements requested which must be less than or equal to available()
Returns:an array of Family elements.The length of the array is less than or equal to the number specified.
Return type:osid.relationship.Family
Raise:IllegalState – no more elements available in this list
Raise:OperationFailed – unable to complete request

compliance: mandatory – This method must be implemented.

Family Node

class dlkit.relationship.objects.FamilyNode

Bases: dlkit.osid.objects.OsidNode

This 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 Family at this node.

Returns:the family represented by this node
Return type:osid.relationship.Family

compliance: mandatory – This method must be implemented.

parent_family_nodes

Gets the parents of this family.

Returns:the parents of the id
Return type:osid.relationship.FamilyNodeList

compliance: 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.FamilyNodeList

compliance: mandatory – This method must be implemented.

Family Node List

class dlkit.relationship.objects.FamilyNodeList

Bases: dlkit.osid.objects.OsidList

Like all OsidLists, FamilyNodeList provides a means for accessing FamilyNode elements 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 FamilyNode in this list.

Returns:the next FamilyNode in this list. The has_next() method should be used to test that a next FamilyNode is available before calling this method.
Return type:osid.relationship.FamilyNode
Raise:IllegalState – no more elements available in this list
Raise:OperationFailed – unable to complete request

compliance: mandatory – This method must be implemented.

get_next_family_nodes(n)

Gets the next set of FamilyNode elements in this list.

The specified amount must be less than or equal to the return from available().

Parameters:n (cardinal) – the number of FamilyNode elements requested which must be less than or equal to available()
Returns:an array of FamilyNode elements.The length of the array is less than or equal to the number specified.
Return type:osid.relationship.FamilyNode
Raise:IllegalState – no more elements available in this list
Raise:OperationFailed – unable to complete request

compliance: mandatory – This method must be implemented.