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
recordType
.This method is used to retrieve an object implementing the requested record. The
relationship_record_type
may be theType
returned inget_record_types()
or any of its parents in aType
hierarchy 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.RelationshipRecord
Raise: NullArgument
–relationship_record_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure occurredRaise: Unsupported
–has_record_type(relationship_record_type)
isfalse
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 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
RelationshipFormRecord
corresponding 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.RelationshipFormRecord
Raise: NullArgument
–relationship_record_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure occurredRaise: Unsupported
–has_record_type(relationship_record_type)
isfalse
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 accessingRelationship
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. Thehas_next()
method should be used to test that a nextRelationship
is available before calling this method.Return type: osid.relationship.Relationship
Raise: 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
Relationships
elements in this list.The specified amount must be less than or equal to the return from
available()
.Parameters: n ( cardinal
) – the number ofRelationship
elements requested which must be less than or equal toavailable()
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 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
Family
recordType
.This method is used to retrieve an object implementing the requested record. The
family_record_type
may be theType
returned inget_record_types()
or any of its parents in aType
hierarchy 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.FamilyRecord
Raise: NullArgument
–family_record_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure occurredRaise: Unsupported
–has_record_type(family_record_type)
isfalse
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 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
FamilyFormRecord
corresponding 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.FamilyFormRecord
Raise: NullArgument
–family_record_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure occurredRaise: Unsupported
–has_record_type(family_record_type)
isfalse
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 accessingFamily
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. Thehas_next()
method should be used to test that a nextFamily
is available before calling this method.Return type: osid.relationship.Family
Raise: 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 elements
in this list.The specified amount must be less than or equal to the return from
available()
.Parameters: n ( cardinal
) – the number ofFamily
elements requested which must be less than or equal toavailable()
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 listRaise: OperationFailed
– unable to complete requestcompliance: 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 accessingFamilyNode
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. Thehas_next()
method should be used to test that a nextFamilyNode
is available before calling this method.Return type: osid.relationship.FamilyNode
Raise: 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 elements
in this list.The specified amount must be less than or equal to the return from
available()
.Parameters: n ( cardinal
) – the number ofFamilyNode
elements requested which must be less than or equal toavailable()
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 listRaise: OperationFailed
– unable to complete requestcompliance: mandatory – This method must be implemented.