Relationship Open Service Interface Definitions relationship version 3.0.0
The Relationship OSID provides the ability to relate and manage data
between OsidObjects
.
Relationships
The Relationship OSID defines a Relationship
that can be used to
explicitly identify a relationship between two OSID Ids
and manage
information specific to the relationship.
The Relationship OSID is a building block on which relationships defined
in the context of other OSIDs can be built. Examples of relationships
include the enrollment record of a student in a Course
or the
commitment or a person to an Event
.
The Relationship OSID depends on the relationship Type to indicate the
nature of the relationship including its natural ordering between the
source and destination Ids
. A relationship of type “friend” may
place the peers in either order and be queryable in either order. A
relationship of type “parent” is between a father peer and a son peer,
but not the other way around. Queries of the son peer based on the
“parent” type is not equiavelent to queries of the father peer based on
the “parent” type.
Such directional relationships may be accompanied by two types. An additional relationship type of “child” can be used with the son peer to determine the father peer. The directionality and the inverse among the types are part of the type definition.
Family Cataloging
Relationships
may be cataloged using the Family
interface.
Sub Packages
The Relationship OSID includes a Relationship Rules OSID for controlling
the enable status of Relationships
.
Service Managers¶
Relationship Profile¶
-
class
dlkit.services.relationship.
RelationshipProfile
¶ Bases:
dlkit.osid.managers.OsidProfile
The relationship profile describes the interoperability among relationship services.
-
supports_relationship_lookup
()¶ Tests if looking up relationships is supported.
Returns: true
if relationship lookup is supported,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
supports_relationship_query
()¶ Tests if querying relationships is supported.
Returns: true
if relationship query is supported,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
supports_relationship_admin
()¶ Tests if relationship administrative service is supported.
Returns: true
if relationship administration is supported,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
supports_family_lookup
()¶ Tests if looking up families is supported.
Returns: true
if family lookup is supported,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
supports_family_admin
()¶ Tests if familyadministrative service is supported.
Returns: true
if family administration is supported,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
supports_family_hierarchy
()¶ Tests for the availability of a family hierarchy traversal service.
Returns: true
if family hierarchy traversal is available,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented in all providers.
-
supports_family_hierarchy_design
()¶ Tests for the availability of a family hierarchy design service.
Returns: true
if family hierarchy design is available,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
relationship_record_types
¶ Gets the supported
Relationship
record types.Returns: a list containing the supported Relationship
record typesReturn type: osid.type.TypeList
compliance: mandatory – This method must be implemented.
-
relationship_search_record_types
¶ Gets the supported
Relationship
search record types.Returns: a list containing the supported Relationship
search record typesReturn type: osid.type.TypeList
compliance: mandatory – This method must be implemented.
-
family_record_types
¶ Gets the supported
Family
record types.Returns: a list containing the supported Family
typesReturn type: osid.type.TypeList
compliance: mandatory – This method must be implemented.
-
family_search_record_types
¶ Gets the supported
Family
search record types.Returns: a list containing the supported Family
search record typesReturn type: osid.type.TypeList
compliance: mandatory – This method must be implemented.
-
Relationship Manager¶
-
class
dlkit.services.relationship.
RelationshipManager
(proxy=None)¶ Bases:
dlkit.osid.managers.OsidManager
,dlkit.osid.sessions.OsidSession
,dlkit.services.relationship.RelationshipProfile
The relationship manager provides access to relationship sessions and provides interoperability tests for various aspects of this service.
The sessions included in this manager are:
RelationshipLookupSession:
a session to retrieve and examine relationshipsRelationshipQuerySession:
a session to query relationshipsRelationshipSearchSession:
a session to search for relationshipsRelationshipAdminSession:
a session to manage relationshipsRelationshipNotificationSession:
a session to receive notifications pertaining to relationship changesRelationshipFamilySession:
a session to look up relationship to family mappingsRelationshipFamilyAssignmentSession:
a session to manage relationship to family catalog mappingsRelationshipSmartFamilySession:
a session to manage dynamic relationship familiesFamilyLookupSession:
a session to retrieve familiesFamilyQuerySession:
a session to query familiesFamilySearchSession:
a session to search for familiesFamilyAdminSession:
a session to create and delete familiesFamilyNotificationSession:
a session to receive notifications pertaining to family changesFamilyHierarchySession:
a session to traverse a hierarchy of familiesFamilyHierarchyDesignSession:
a session to manage a family hierarchy
-
relationship_batch_manager
¶ Gets the relationship batch manager.
Returns: a RelationshipBatchManager
Return type: osid.relationship.batch.RelationshipBatchManager
Raise: OperationFailed
– unable to complete requestRaise: Unimplemented
–supports_relationship_batch()
isfalse
compliance: optional – This method must be implemented if ``supports_relationship_batch()`` is ``true``.
-
relationship_rules_manager
¶ Gets the relationship rules manager.
Returns: a RelationshipRulesManager
Return type: osid.relationship.rules.RelationshipRulesManager
Raise: OperationFailed
– unable to complete requestRaise: Unimplemented
–supports_relationship_rules()
isfalse
compliance: optional – This method must be implemented if ``supports_relationship_rules()`` is ``true``.
Family Lookup Methods¶
RelationshipManager.
can_lookup_families
()¶Tests if this user can perform
Family
lookups.A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a
PermissionDenied
. This is intended as a hint to an application that may not offer lookup operations to unauthorized users.
Returns: false
if lookup methods are not authorized,true
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
RelationshipManager.
use_comparative_family_view
()¶The returns from the family methods may omit or translate elements based on this session, such as authorization, and not result in an error.
This view is used when greater interoperability is desired at the expense of precision.
compliance: mandatory – This method is must be implemented.
RelationshipManager.
use_plenary_family_view
()¶A complete view of the
Family
returns is desired.Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.
compliance: mandatory – This method is must be implemented.
RelationshipManager.
get_family
(family_id)¶Gets the
Family
specified by itsId
.In plenary mode, the exact
Id
is found or aNotFound
results. Otherwise, the returnedFamily
may have a differentId
than requested, such as the case where a duplicateId
was assigned to aFamily
and retained for compatibil
Parameters: family_id ( osid.id.Id
) –Id
of theFamily
Returns: the family Return type: osid.relationship.Family
Raise: NotFound
–family_id
not foundRaise: NullArgument
–family_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method is must be implemented.
RelationshipManager.
get_families_by_ids
(family_ids)¶Gets a
FamilyList
corresponding to the givenIdList
.In plenary mode, the returned list contains all of the families specified in the
Id
list, in the order of the list, including duplicates, or an error results if anId
in the supplied list is not found or inaccessible. Otherwise, inaccessible families may be omitted from the list and may present the elements in any order including returning a unique set.
Parameters: family_ids ( osid.id.IdList
) – the list ofIds
to retrieveReturns: the returned Family list
Return type: osid.relationship.FamilyList
Raise: NotFound
– anId was
not foundRaise: NullArgument
–family_ids
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
RelationshipManager.
get_families_by_genus_type
(family_genus_type)¶Gets a
FamilyList
corresponding to the given family genusType
which does not include families of genus types derived from the specifiedType
.In plenary mode, the returned list contains all known families or an error results. Otherwise, the returned list may contain only those families that are accessible through this session.
Parameters: family_genus_type ( osid.type.Type
) – a family genus typeReturns: the returned Family list
Return type: osid.relationship.FamilyList
Raise: NullArgument
–family_genus_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
RelationshipManager.
get_families_by_parent_genus_type
(family_genus_type)¶Gets a
FamilyList
corresponding to the given family genusType
and include any additional families with genus types derived from the specifiedType
.In plenary mode, the returned list contains all known families or an error results. Otherwise, the returned list may contain only those families that are accessible through this session.
Parameters: family_genus_type ( osid.type.Type
) – a family genus typeReturns: the returned Family list
Return type: osid.relationship.FamilyList
Raise: NullArgument
–family_genus_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
RelationshipManager.
get_families_by_record_type
(family_record_type)¶Gets a
FamilyList
containing the given family recordType
.In plenary mode, the returned list contains all known families or an error results. Otherwise, the returned list may contain only those families that are accessible through this session.
Parameters: family_record_type ( osid.type.Type
) – a family record typeReturns: the returned Family list
Return type: osid.relationship.FamilyList
Raise: NullArgument
–family_record_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
RelationshipManager.
get_families_by_provider
(resource_id)¶Gets a
FamilyList
from the given provider.In plenary mode, the returned list contains all known families or an error results. Otherwise, the returned list may contain only those families that are accessible through this session.
Parameters: resource_id ( osid.id.Id
) – a resourceId
Returns: the returned Family list
Return type: osid.relationship.FamilyList
Raise: NullArgument
–resource_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
RelationshipManager.
families
¶Gets all families.
In plenary mode, the returned list contains all known families or an error results. Otherwise, the returned list may contain only those families that are accessible through this session.
Returns: a list of families Return type: osid.relationship.FamilyList
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Family Admin Methods¶
RelationshipManager.
can_create_families
()¶Tests if this user can create families.
A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a
Family
will result in aPermissionDenied
. This is intended as a hint to an application that may not wish to offer create operations to unauthorized users.
Returns: false
ifFamily
creation is not authorized,true
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
RelationshipManager.
can_create_family_with_record_types
(family_record_types)¶Tests if this user can create a single
Family
using the desired record types.While
RelationshipManager.getFamilyRecordTypes()
can be used to examine which records are supported, this method tests which record(s) are required for creating a specificFamily
. Providing an empty array tests if aFamily
can be created with no records.
Parameters: family_record_types ( osid.type.Type[]
) – array of family record typesReturns: true
ifFamily
creation using the specified recordTypes
is supported,false
otherwiseReturn type: boolean
Raise: NullArgument
–family_record_types is null
compliance: mandatory – This method must be implemented.
RelationshipManager.
get_family_form_for_create
(family_record_types)¶Gets the family form for creating new families.
A new form should be requested for each create transaction.
Parameters: family_record_types ( osid.type.Type[]
) – array of family record typesReturns: the family form Return type: osid.relationship.FamilyForm
Raise: NullArgument
–family_record_types is null
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failureRaise: Unsupported
– unable to get form for requested record typescompliance: mandatory – This method must be implemented.
RelationshipManager.
create_family
(family_form)¶Creates a new
Family
.
Parameters: family_form ( osid.relationship.FamilyForm
) – the form for thisFamily
.Returns: the new Family
Return type: osid.relationship.Family
Raise: IllegalState
–family_form
already used in a create transactionRaise: InvalidArgument
– one or more of the form elements is invalidRaise: NullArgument
–family_form
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failureRaise: Unsupported
–family_form
did not originate fromget_family_form_for_create()
compliance: mandatory – This method must be implemented.
RelationshipManager.
can_update_families
()¶Tests if this user can update families.
A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a
Family
will result in aPermissionDenied
. This is intended as a hint to an application that may not wish to offer update operations to unauthorized users.
Returns: false
ifFamily
modification is not authorized,true
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
RelationshipManager.
get_family_form_for_update
(family_id)¶Gets the family form for updating an existing family.
A new family form should be requested for each update transaction.
Parameters: family_id ( osid.id.Id
) – theId
of theFamily
Returns: the family form Return type: osid.relationship.FamilyForm
Raise: NotFound
–family_id
is not foundRaise: NullArgument
–family_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
RelationshipManager.
update_family
(family_form)¶Updates an existing family.
Parameters: family_form ( osid.relationship.FamilyForm
) – the form containing the elements to be updatedRaise: IllegalState
–family_form
already used in an update transactionRaise: InvalidArgument
– the form contains an invalid valueRaise: NullArgument
–family_id
orfamily_form
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failureRaise: Unsupported
–family_form
did not originate fromget_family_form_for_update()
compliance: mandatory – This method must be implemented.
RelationshipManager.
can_delete_families
()¶Tests if this user can delete families.
A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a
Family
will result in aPermissionDenied
. This is intended as a hint to an application that may not wish to offer delete operations to unauthorized users.
Returns: false
ifFamily
deletion is not authorized,true
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
RelationshipManager.
delete_family
(family_id)¶Deletes a
Family
.
Parameters: family_id ( osid.id.Id
) – theId
of theFamily
to removeRaise: NotFound
–family_id
not foundRaise: NullArgument
–family_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
RelationshipManager.
can_manage_family_aliases
()¶Tests if this user can manage
Id
aliases for families.A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a
PermissionDenied
. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.
Returns: false
ifFamily
aliasing is not authorized,true
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
RelationshipManager.
alias_family
(family_id, alias_id)¶Adds an
Id
to aFamily
for the purpose of creating compatibility.The primary
Id
of theFamily
is determined by the provider. The newId
performs as an alias to the primaryId
. If the alias is a pointer to another family, it is reassigned to the given familyId
.
Parameters:
- family_id (
osid.id.Id
) – theId
of aFamily
- alias_id (
osid.id.Id
) – the aliasId
Raise:
AlreadyExists
–alias_id
is already assignedRaise:
NotFound
–family_id
not foundRaise:
NullArgument
–family_id
oralias_id
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Family Hierarchy Methods¶
RelationshipManager.
family_hierarchy_id
¶Gets the hierarchy
Id
associated with this session.
Returns: the hierarchy Id
associated with this sessionReturn type: osid.id.Id
compliance: mandatory – This method must be implemented.
RelationshipManager.
family_hierarchy
¶Gets the hierarchy associated with this session.
Returns: the hierarchy associated with this session Return type: osid.hierarchy.Hierarchy
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
RelationshipManager.
can_access_family_hierarchy
()¶Tests if this user can perform hierarchy queries.
A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a
PermissionDenied
. This is intended as a hint to an an application that may not offer hierrachy traversal operations to unauthorized users.
Returns: false
if hierarchy traversal methods are not authorized,true
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
RelationshipManager.
use_comparative_family_view
()The returns from the family methods may omit or translate elements based on this session, such as authorization, and not result in an error.
This view is used when greater interoperability is desired at the expense of precision.
compliance: mandatory – This method is must be implemented.
RelationshipManager.
use_plenary_family_view
()A complete view of the
Family
returns is desired.Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.
compliance: mandatory – This method is must be implemented.
RelationshipManager.
root_family_ids
¶Gets the root family
Ids
in this hierarchy.
Returns: the root family Ids
Return type: osid.id.IdList
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
RelationshipManager.
root_families
¶Gets the root families in the family hierarchy.
A node with no parents is an orphan. While all family
Ids
are known to the hierarchy, an orphan does not appear in the hierarchy unless explicitly added as a root node or child of another node.
Returns: the root families Return type: osid.relationship.FamilyList
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method is must be implemented.
RelationshipManager.
has_parent_families
(family_id)¶Tests if the
Family
has any parents.
Parameters: family_id ( osid.id.Id
) – theId
of a familyReturns: true
if the family has parents,false
otherwiseReturn type: boolean
Raise: NotFound
–family_id
is not foundRaise: NullArgument
–family_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
RelationshipManager.
is_parent_of_family
(id_, family_id)¶Tests if an
Id
is a direct parent of a family.
Parameters:
- id (
osid.id.Id
) – anId
- family_id (
osid.id.Id
) – theId
of a familyReturns:
true
if thisid
is a parent offamily_id,
false
otherwiseReturn type:
boolean
Raise:
NotFound
–family_id
is not foundRaise:
NullArgument
–id
orfamily_id
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented. implementation notes: If
id
not found returnfalse
.
RelationshipManager.
get_parent_family_ids
(family_id)¶Gets the parent
Ids
of the given family.
Parameters: family_id ( osid.id.Id
) – theId
of a familyReturns: the parent Ids
of the familyReturn type: osid.id.IdList
Raise: NotFound
–family_id
is not foundRaise: NullArgument
–family_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
RelationshipManager.
get_parent_families
(family_id)¶Gets the parent families of the given
id
.
Parameters: family_id ( osid.id.Id
) – theId
of theFamily
to queryReturns: the parent families of the id
Return type: osid.relationship.FamilyList
Raise: NotFound
– aFamily
identified byId is
not foundRaise: NullArgument
–family_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
RelationshipManager.
is_ancestor_of_family
(id_, family_id)¶Tests if an
Id
is an ancestor of a family.
Parameters:
- id (
osid.id.Id
) – anId
- family_id (
osid.id.Id
) – theId
of a familyReturns:
true
if thisid
is an ancestor offamily_id,
false
otherwiseReturn type:
boolean
Raise:
NotFound
–family_id
is not foundRaise:
NullArgument
–id
orfamily_id
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented. implementation notes: If
id
not found returnfalse
.
RelationshipManager.
has_child_families
(family_id)¶Tests if a family has any children.
Parameters: family_id ( osid.id.Id
) – theId
of a familyReturns: true
if thefamily_id
has children,false
otherwiseReturn type: boolean
Raise: NotFound
–family_id
is not foundRaise: NullArgument
–family_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
RelationshipManager.
is_child_of_family
(id_, family_id)¶Tests if a family is a direct child of another.
Parameters:
- id (
osid.id.Id
) – anId
- family_id (
osid.id.Id
) – theId
of a familyReturns:
true
if theid
is a child offamily_id,
false
otherwiseReturn type:
boolean
Raise:
NotFound
–family_id
is not foundRaise:
NullArgument
–id
orfamily_id
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented. implementation notes: If
id
not found returnfalse
.
RelationshipManager.
get_child_family_ids
(family_id)¶Gets the child
Ids
of the given family.
Parameters: family_id ( osid.id.Id
) – theId
to queryReturns: the children of the family Return type: osid.id.IdList
Raise: NotFound
–family_id
is not foundRaise: NullArgument
–family_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
RelationshipManager.
get_child_families
(family_id)¶Gets the child families of the given
id
.
Parameters: family_id ( osid.id.Id
) – theId
of theFamily
to queryReturns: the child families of the id
Return type: osid.relationship.FamilyList
Raise: NotFound
– aFamily
identified byId is
not foundRaise: NullArgument
–family_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
RelationshipManager.
is_descendant_of_family
(id_, family_id)¶Tests if an
Id
is a descendant of a family.
Parameters:
- id (
osid.id.Id
) – anId
- family_id (
osid.id.Id
) – theId
of a familyReturns:
true
if theid
is a descendant of thefamily_id,
false
otherwiseReturn type:
boolean
Raise:
NotFound
–family_id
is not foundRaise:
NullArgument
–id
orfamily_id
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented. implementation notes: If
id
is not found returnfalse
.
RelationshipManager.
get_family_node_ids
(family_id, ancestor_levels, descendant_levels, include_siblings)¶Gets a portion of the hierarchy for the given family.
Parameters:
- family_id (
osid.id.Id
) – theId
to query- ancestor_levels (
cardinal
) – the maximum number of ancestor levels to include. A value of 0 returns no parents in the node.- descendant_levels (
cardinal
) – the maximum number of descendant levels to include. A value of 0 returns no children in the node.- include_siblings (
boolean
) –true
to include the siblings of the given node,false
to omit the siblingsReturns: a family node
Return type:
osid.hierarchy.Node
Raise:
NotFound
–family_id
is not foundRaise:
NullArgument
–family_id
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
RelationshipManager.
get_family_nodes
(family_id, ancestor_levels, descendant_levels, include_siblings)¶Gets a portion of the hierarchy for the given family.
Parameters:
- family_id (
osid.id.Id
) – theId
to query- ancestor_levels (
cardinal
) – the maximum number of ancestor levels to include. A value of 0 returns no parents in the node.- descendant_levels (
cardinal
) – the maximum number of descendant levels to include. A value of 0 returns no children in the node.- include_siblings (
boolean
) –true
to include the siblings of the given node,false
to omit the siblingsReturns: a family node
Return type:
osid.relationship.FamilyNode
Raise:
NotFound
–family_id
is not foundRaise:
NullArgument
–family_id
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Family Hierarchy Design Methods¶
RelationshipManager.
family_hierarchy_id
Gets the hierarchy
Id
associated with this session.
Returns: the hierarchy Id
associated with this sessionReturn type: osid.id.Id
compliance: mandatory – This method must be implemented.
RelationshipManager.
family_hierarchy
Gets the hierarchy associated with this session.
Returns: the hierarchy associated with this session Return type: osid.hierarchy.Hierarchy
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
RelationshipManager.
can_modify_family_hierarchy
()¶Tests if this user can change the hierarchy.
A return of true does not guarantee successful authorization. A return of false indicates that it is known performing any update will result in a
PermissionDenied
. This is intended as a hint to an application that may opt not to offer these operations to an unauthorized user.
Returns: false
if changing this hierarchy is not authorized,true
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
RelationshipManager.
add_root_family
(family_id)¶Adds a root family.
Parameters: family_id ( osid.id.Id
) – theId
of a familyRaise: AlreadyExists
–family_id
is already in hierarchyRaise: NotFound
–family_id
not foundRaise: NullArgument
–family_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
RelationshipManager.
remove_root_family
(family_id)¶Removes a root family.
Parameters: family_id ( osid.id.Id
) – theId
of a familyRaise: NotFound
–family_id
not a rootRaise: NullArgument
–family_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
RelationshipManager.
add_child_family
(family_id, child_id)¶Adds a child to a family.
Parameters:
- family_id (
osid.id.Id
) – theId
of a family- child_id (
osid.id.Id
) – theId
of the new childRaise:
AlreadyExists
–family_id
is already a parent ofchild_id
Raise:
NotFound
–family_id
orchild_id
not foundRaise:
NullArgument
–family_id
orchild_id
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
RelationshipManager.
remove_child_family
(family_id, child_id)¶Removes a child from a family.
Parameters:
- family_id (
osid.id.Id
) – theId
of a family- child_id (
osid.id.Id
) – theId
of the new childRaise:
NotFound
–family_id
not a parent ofchild_id
Raise:
NullArgument
–family_id
orchild_id
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
RelationshipManager.
remove_child_families
(family_id)¶Removes all children from a family.
Parameters: family_id ( osid.id.Id
) – theId
of a familyRaise: NotFound
–family_id
not in hierarchyRaise: NullArgument
–family_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.