Queries¶
Hierarchy Query¶
-
class
dlkit.hierarchy.queries.HierarchyQuery¶ Bases:
dlkit.osid.queries.OsidCatalogQueryThis is the query for searching hierarchies.
Results are returned if all the specified elements match. Each method match request produces an
ANDterm while multiple invocations of a method produces a nestedOR,except for accessing theHierarchyQueryrecord.-
match_node_id(id_, match)¶ Matches an
Idof a node in this hierarchy.Multiple nodes can be added to this query which behave as a boolean
AND.Parameters: - id (
osid.id.Id) –Idto match - match (
boolean) –trueif a positive match,falsefor negative match
Raise: NullArgument–idisnullcompliance: mandatory – This method must be implemented.
- id (
-
match_any_node_id(match)¶ Matches hierarchies with any node.
Parameters: match ( boolean) –trueto match hierarchies with any nodes,falseto match hierarchies with no nodescompliance: mandatory – This method must be implemented.
-
node_id_terms¶
-
get_hierarchy_query_record(hierarchy_record_type)¶ Gets the hierarchy record query corresponding to the given
HierarchyrecordType.Multiple record retrievals of the same type may return the same underlying object and do not result in adding terms to the query. Multiple record retrievals of different types add
ANDterms to the other elements set in this form.Parameters: hierarchy_record_type ( osid.type.Type) – a hierarchy record typeReturns: the hierarchy query record Return type: osid.hierarchy.records.HierarchyQueryRecordRaise: NullArgument–hierarchy_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(hierarchy_record_type)isfalsecompliance: mandatory – This method must be implemented.
-