Queries¶
Resource Query¶
-
class
dlkit.resource.queries.ResourceQuery¶ Bases:
dlkit.osid.queries.OsidObjectQueryThis is the query for searching resources.
Each method specifies an
ANDterm while multiple invocations of the same method produce a nestedOR.-
match_group(match)¶ Matches resources that are also groups.
Parameters: match ( boolean) –truefor a positive match,falsefor a negative matchcompliance: mandatory – This method must be implemented.
-
group_terms¶
-
match_demographic(match)¶ Matches resources that are also demographics.
Parameters: match ( boolean) –truefor a positive match,falsefor a negative matchcompliance: mandatory – This method must be implemented.
-
demographic_terms¶
-
match_containing_group_id(resource_id, match)¶ Sets the group
Idfor this query to match resources within the given group.Parameters: - resource_id (
osid.id.Id) – a resourceId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–resource_idisnullcompliance: mandatory – This method must be implemented.
- resource_id (
-
containing_group_id_terms¶
-
supports_containing_group_query()¶ Tests if a
ResourceQueryis available for querying containing groups.Returns: trueif a group resource query is available,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
containing_group_query¶ Gets the query for a a containing group.
Multiple retrievals produce a nested
ORterm.Returns: the resource query Return type: osid.resource.ResourceQueryRaise: Unimplemented–supports_containing_group_query()isfalsecompliance: optional – This method must be implemented if ``supports_agent_query()`` is ``true``.
-
match_any_containing_group(match)¶ Matches resources inside any group.
Parameters: match ( boolean) –trueto match any containing group,falseto match resources part of no groupscompliance: mandatory – This method must be implemented.
-
containing_group_terms¶
-
match_avatar_id(asset_id, match)¶ Sets the asset
Idfor this query.Parameters: - asset_id (
osid.id.Id) – the assetId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–asset_idisnullcompliance: mandatory – This method must be implemented.
- asset_id (
-
avatar_id_terms¶
-
supports_avatar_query()¶ Tests if an
AssetQueryis available.Returns: trueif an asset query is available,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
avatar_query¶ Gets the query for an asset.
Multiple retrievals produce a nested
ORterm.Returns: the asset query Return type: osid.repository.AssetQueryRaise: Unimplemented–supports_avatar_query()isfalsecompliance: optional – This method must be implemented if ``supports_avatar_query()`` is ``true``.
-
match_any_avatar(match)¶ Matches resources with any asset.
Parameters: match ( boolean) –trueto match any asset,falseto match resources with no assetcompliance: mandatory – This method must be implemented.
-
avatar_terms¶
-
match_agent_id(agent_id, match)¶ Sets the agent
Idfor this query.Parameters: - agent_id (
osid.id.Id) – the agentId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–agent_idisnullcompliance: mandatory – This method must be implemented.
- agent_id (
-
agent_id_terms¶
-
supports_agent_query()¶ Tests if an
AgentQueryis available.Returns: trueif an agent query is available,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
agent_query¶ Gets the query for an agent.
Multiple retrievals produce a nested
ORterm.Returns: the agent query Return type: osid.authentication.AgentQueryRaise: Unimplemented–supports_agent_query()isfalsecompliance: optional – This method must be implemented if ``supports_agent_query()`` is ``true``.
-
match_any_agent(match)¶ Matches resources with any agent.
Parameters: match ( boolean) –trueto match any agent,falseto match resources with no agentcompliance: mandatory – This method must be implemented.
-
agent_terms¶
-
match_resource_relationship_id(resource_relationship_id, match)¶ Sets the resource relationship
Idfor this query.Parameters: - resource_relationship_id (
osid.id.Id) – the resource relationshipId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–resource_relationship_idisnullcompliance: mandatory – This method must be implemented.
- resource_relationship_id (
-
resource_relationship_id_terms¶
-
supports_resource_relationship_query()¶ Tests if a
ResourceRelationshipQueryis available.Returns: trueif a resource relationship query is available,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
resource_relationship_query¶ Gets the query for aa resource relationship.
Multiple retrievals produce a nested
ORterm.Returns: the resource relationship query Return type: osid.resource.ResourceRelationshipQueryRaise: Unimplemented–supports_resource_relationship_query()isfalsecompliance: optional – This method must be implemented if ``supports_resource_relationship_query()`` is ``true``.
-
match_any_resource_relationship(match)¶ Matches resources with any resource relationship.
Parameters: match ( boolean) –trueto match any resource relationship,falseto match resources with no relationshipcompliance: mandatory – This method must be implemented.
-
resource_relationship_terms¶
-
match_bin_id(bin_id, match)¶ Sets the bin
Idfor this query.Parameters: - bin_id (
osid.id.Id) – the binId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–bin_idisnullcompliance: mandatory – This method must be implemented.
- bin_id (
-
bin_id_terms¶
-
supports_bin_query()¶ Tests if a
BinQueryis available.Returns: trueif a bin query is available,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
bin_query¶ Gets the query for a bin.
Multiple retrievals produce a nested
ORterm.Returns: the bin query Return type: osid.resource.BinQueryRaise: Unimplemented–supports_bin_query()isfalsecompliance: optional – This method must be implemented if ``supports_bin_query()`` is ``true``.
-
bin_terms¶
-
get_resource_query_record(resource_record_type)¶ Gets the resource query record corresponding to the given
ResourcerecordType.Multiple retrievals produce a nested
ORterm.Parameters: resource_record_type ( osid.type.Type) – a resource record typeReturns: the resource query record Return type: osid.resource.records.ResourceQueryRecordRaise: NullArgument–resource_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(resource_record_type)isfalsecompliance: mandatory – This method must be implemented.
-
Bin Query¶
-
class
dlkit.resource.queries.BinQuery¶ Bases:
dlkit.osid.queries.OsidCatalogQueryThis is the query for searching bins.
Each method specifies an
ANDterm while multiple invocations of the same method produce a nestedOR.-
match_resource_id(resource_id, match)¶ Sets the resource
Idfor this query.Parameters: - resource_id (
osid.id.Id) – a resourceId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–resource_idisnullcompliance: mandatory – This method must be implemented.
- resource_id (
-
resource_id_terms¶
-
supports_resource_query()¶ Tests if a
ResourceQueryis available.Returns: trueif a resource query is available,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
resource_query¶ Gets the query for a resource.
Multiple retrievals produce a nested
ORterm.Returns: the resource query Return type: osid.resource.ResourceQueryRaise: Unimplemented–supports_resource_query()isfalsecompliance: optional – This method must be implemented if ``supports_resource_query()`` is ``true``.
-
match_any_resource(match)¶ Matches bins with any resource.
Parameters: match ( boolean) –trueto match bins with any resource,falseto match bins with no resourcescompliance: mandatory – This method must be implemented.
-
resource_terms¶
-
match_ancestor_bin_id(binid, match)¶ Sets the bin
Idfor this query to match bins that have the specified bin as an ancestor.Parameters: - binid (
osid.id.Id) – a binId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–bin_idisnullcompliance: mandatory – This method must be implemented.
- binid (
-
ancestor_bin_id_terms¶
-
supports_ancestor_bin_query()¶ Tests if a
BinQueryis available.Returns: trueif a bin query is available,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
ancestor_bin_query¶ Gets the query for a bin.
Multiple retrievals produce a nested
ORterm.Returns: the bin query Return type: osid.resource.BinQueryRaise: Unimplemented–supports_ancestor_bin_query()isfalsecompliance: optional – This method must be implemented if ``supports_ancestor_bin_query()`` is ``true``.
-
match_any_ancestor_bin(match)¶ Matches bins with any ancestor.
Parameters: match ( boolean) –trueto match bins with any ancestor,falseto match root binscompliance: mandatory – This method must be implemented.
-
ancestor_bin_terms¶
-
match_descendant_bin_id(binid, match)¶ Sets the bin
Idfor this query to match bins that have the specified bin as a descendant.Parameters: - binid (
osid.id.Id) – a binId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–bin_idisnullcompliance: mandatory – This method must be implemented.
- binid (
-
descendant_bin_id_terms¶
-
supports_descendant_bin_query()¶ Tests if a
BinQueryis available.Returns: trueif a bin query is available,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
descendant_bin_query¶ Gets the query for a bin.
Multiple retrievals produce a nested
ORterm.Returns: the bin query Return type: osid.resource.BinQueryRaise: Unimplemented–supports_descendant_bin_query()isfalsecompliance: optional – This method must be implemented if ``supports_descendant_bin_query()`` is ``true``.
-
match_any_descendant_bin(match)¶ Matches bins with any descendant.
Parameters: match ( boolean) –trueto match bins with any descendant,falseto match leaf binscompliance: mandatory – This method must be implemented.
-
descendant_bin_terms¶
-
get_bin_query_record(bin_record_type)¶ Gets the bin query record corresponding to the given
BinrecordType.Multiple retrievals produce a nested
ORterm.Parameters: bin_record_type ( osid.type.Type) – a bin record typeReturns: the bin query record Return type: osid.resource.records.BinQueryRecordRaise: NullArgument–bin_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(bin_record_type)isfalsecompliance: mandatory – This method must be implemented.
-