Queries¶
Relationship Query¶
-
class
dlkit.relationship.queries.RelationshipQuery¶ Bases:
dlkit.osid.queries.OsidRelationshipQueryThis is the query for searching relationships.
Each method match specifies an
ANDterm while multiple invocations of the same method produce a nestedOR.-
match_source_id(peer, match)¶ Matches a relationship peer.
Parameters: - peer (
osid.id.Id) – peerIdto match - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–peerisnullcompliance: mandatory – This method must be implemented.
- peer (
-
source_id_terms¶
-
match_destination_id(peer, match)¶ Matches the other relationship peer.
Parameters: - peer (
osid.id.Id) – peerIdto match - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–peerisnullcompliance: mandatory – This method must be implemented.
- peer (
-
destination_id_terms¶
-
match_same_peer_id(match)¶ Matches circular relationships to the same peer.
Parameters: match ( boolean) –truefor a positive match,falsefor a negative matchcompliance: mandatory – This method must be implemented.
-
same_peer_id_terms¶
-
match_family_id(family_id, match)¶ Sets the family
Idfor this query.Parameters: - family_id (
osid.id.Id) – a familyId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–family_idisnullcompliance: mandatory – This method must be implemented.
- family_id (
-
family_id_terms¶
-
supports_family_query()¶ Tests if a
FamilyQueryis available.Returns: trueif a family query is available,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
family_query¶ Gets the query for a family.
Multiple retrievals produce a nested
ORterm.Returns: the family query Return type: osid.relationship.FamilyQueryRaise: Unimplemented–supports_family_query()isfalsecompliance: optional – This method must be implemented if ``supports_family_query()`` is ``true``.
-
family_terms¶
-
get_relationship_query_record(relationship_record_type)¶ Gets the relationship query record corresponding to the given
RelationshiprecordType.Multiple record retrievals produce a nested
ORterm.Parameters: relationship_record_type ( osid.type.Type) – a relationship record typeReturns: the relationship query record Return type: osid.relationship.records.RelationshipQueryRecordRaise: 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.
-
Family Query¶
-
class
dlkit.relationship.queries.FamilyQuery¶ Bases:
dlkit.osid.queries.OsidCatalogQueryThis is the query interface for searching for families.
Each method specifies an
ANDterm while multiple invocations of the same method produce a nestedOR.-
match_relationship_id(relationship_id, match)¶ Matches a relationship
Id.Parameters: - relationship_id (
osid.id.Id) – a relationshipId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–relationship_idisnullcompliance: mandatory – This method must be implemented.
- relationship_id (
-
relationship_id_terms¶
-
supports_relationship_query()¶ Tests if a relationship query is available.
Returns: trueif a relationship query is available,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
relationship_query¶ Gets the query interface for a relationship.
Returns: the relationship query Return type: osid.relationship.RelationshipQueryRaise: Unimplemented–supports_relationship_query()isfalsecompliance: optional – This method must be implemented if ``supports_relationship_query()`` is ``true``.
-
match_any_relationship(match)¶ Matches families with any relationship.
Parameters: match ( boolean) –trueto match families with any relationship,falseto match families with no relationshipcompliance: mandatory – This method must be implemented.
-
relationship_terms¶
-
match_ancestor_family_id(family_id, match)¶ Sets the family
Idfor this query to match families that have the specified family as an ancestor.Parameters: - family_id (
osid.id.Id) – a familyId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–family_idisnullcompliance: mandatory – This method must be implemented.
- family_id (
-
ancestor_family_id_terms¶
-
supports_ancestor_family_query()¶ Tests if a
FamilyQueryis available.Returns: trueif a family query interface is available,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
ancestor_family_query¶ Gets the query interface for a family.
Multiple retrievals produce a nested
ORterm.Returns: the family query Return type: osid.relationship.FamilyQueryRaise: Unimplemented–supports_ancestor_family_query()isfalsecompliance: optional – This method must be implemented if ``supports_ancestor_family_query()`` is ``true``.
-
match_any_ancestor_family(match)¶ Matches families with any ancestor.
Parameters: match ( boolean) –trueto match families with any ancestor,falseto match root familiescompliance: mandatory – This method must be implemented.
-
ancestor_family_terms¶
-
match_descendant_family_id(family_id, match)¶ Sets the family
Idfor this query to match families that have the specified family as a descednant.Parameters: - family_id (
osid.id.Id) – a familyId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–family_idisnullcompliance: mandatory – This method must be implemented.
- family_id (
-
descendant_family_id_terms¶
-
supports_descendant_family_query()¶ Tests if a
FamilyQueryis available.Returns: trueif a family query interface is available,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
descendant_family_query¶ Gets the query interface for a family.
Multiple retrievals produce a nested
ORterm.Returns: the family query Return type: osid.relationship.FamilyQueryRaise: Unimplemented–supports_descendant_family_query()isfalsecompliance: optional – This method must be implemented if ``supports_descendant_family_query()`` is ``true``.
-
match_any_descendant_family(match)¶ Matches families with any decendant.
Parameters: match ( boolean) –trueto match families with any decendants,falseto match leaf familiescompliance: mandatory – This method must be implemented.
-
descendant_family_terms¶
-
get_family_query_record(family_record_type)¶ Gets the family query record corresponding to the given
FamilyrecordType.Multiple record retrievals produce a nested boolean
ORterm.Parameters: family_record_type ( osid.type.Type) – a family record typeReturns: the family query record Return type: osid.relationship.records.FamilyQueryRecordRaise: 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.
-