Queries¶
Hierarchy Query¶
-
class
dlkit.hierarchy.queries.
HierarchyQuery
¶ Bases:
dlkit.osid.queries.OsidCatalogQuery
This is the query for searching hierarchies.
Results are returned if all the specified elements match. Each method match request produces an
AND
term while multiple invocations of a method produces a nestedOR,
except for accessing theHierarchyQuery
record.-
match_node_id
(id_, match)¶ Matches an
Id
of a node in this hierarchy.Multiple nodes can be added to this query which behave as a boolean
AND
.Parameters: - id (
osid.id.Id
) –Id
to match - match (
boolean
) –true
if a positive match,false
for negative match
Raise: NullArgument
–id
isnull
compliance: mandatory – This method must be implemented.
- id (
-
match_any_node_id
(match)¶ Matches hierarchies with any node.
Parameters: match ( boolean
) –true
to match hierarchies with any nodes,false
to 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
Hierarchy
recordType
.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
AND
terms 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.HierarchyQueryRecord
Raise: NullArgument
–hierarchy_record_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: Unsupported
–has_record_type(hierarchy_record_type)
isfalse
compliance: mandatory – This method must be implemented.
-