Queries¶
Log Entry Query¶
-
class
dlkit.logging_.queries.LogEntryQuery¶ Bases:
dlkit.osid.queries.OsidObjectQueryThis is the query for searching log entries.
Each method specifies an
ANDterm while multiple invocations of the same method produce a nestedOR.-
match_priority(priority_type, match)¶ Matches a priority
Typefor the log entry.Parameters: - priority_type (
osid.type.Type) –Typeto match - match (
boolean) –trueif for a positive match,falsefor a negative match
Raise: NullArgument–priority_typeisnullcompliance: mandatory – This method must be implemented.
- priority_type (
-
match_any_priority(match)¶ Matches log entries with any priority.
Parameters: match ( boolean) –trueto match log entries with any priority,falseto match log entries with no prioritycompliance: mandatory – This method must be implemented.
-
priority_terms¶
-
match_minimum_priority(priority_type, match)¶ Matches a log entries including and above the given priority type.
Parameters: - priority_type (
osid.type.Type) –Typeto match - match (
boolean) –trueif for a positive match,falsefor a negative match
Raise: NullArgument–priority_typeisnullcompliance: mandatory – This method must be implemented.
- priority_type (
-
minimum_priority_terms¶
-
match_timestamp(start_time, end_time, match)¶ Matches the time of this log entry.
Parameters: - start_time (
osid.calendaring.DateTime) – start time - end_time (
osid.calendaring.DateTime) – end time - match (
boolean) –trueif for a positive match,falsefor a negative match
Raise: InvalidArgument–start_timeis greater thanend_timeRaise: NullArgument–start_timeorend_timeisnullcompliance: mandatory – This method must be implemented.
- start_time (
-
timestamp_terms¶
-
match_resource_id(resource_id, match)¶ Matches a resource in this log entry.
Parameters: - resource_id (
osid.id.Id) –Idto match - match (
boolean) –trueif for 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 for querying agents.Returns: trueif a resource query is available,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
resource_query¶ Gets the query for a resource.
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``.
-
resource_terms¶
-
match_agent_id(agent_id, match)¶ Matches an agent in this log entry.
Parameters: - agent_id (
osid.id.Id) –Idto match - match (
boolean) –trueif for 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 for querying agents.Returns: trueif an agent query is available,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
agent_query¶ Gets the query for an agent.
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``.
-
agent_terms¶
-
match_log_id(log_id, match)¶ Matches a log.
Parameters: - log_id (
osid.id.Id) –Idto match - match (
boolean) –trueif for a positive match,falsefor a negative match
Raise: NullArgument–log_idisnullcompliance: mandatory – This method must be implemented.
- log_id (
-
log_id_terms¶
-
supports_log_query()¶ Tests if a
LogQueryis available for querying logs.Returns: trueif a log query is available,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
log_query¶ Gets the query for a log.
Returns: the log query Return type: osid.logging.LogQueryRaise: Unimplemented–supports_log_query()isfalsecompliance: optional – This method must be implemented if ``supports_log_query()`` is ``true``.
-
log_terms¶
-
get_log_entry_query_record(log_entry_record_type)¶ Gets the log entry query corresponding to the given
LogEntryrecordType.Multiple record retrievals produce a nested
ORterm.Parameters: log_entry_record_type ( osid.type.Type) – a log entry record typeReturns: the log entry query record Return type: osid.logging.records.LogEntryQueryRecordRaise: NullArgument–log_entry_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(log_eutry_record_type)isfalsecompliance: mandatory – This method must be implemented.
-
Log Query¶
-
class
dlkit.logging_.queries.LogQuery¶ Bases:
dlkit.osid.queries.OsidCatalogQueryThis is the query for searching for logs.
Each method specifies an
ANDterm while multiple invocations of the same method produce a nestedOR.-
match_log_entry_id(log_entry_id, match)¶ Sets a log entry
Id.Parameters: - log_entry_id (
osid.id.Id) – a log entryId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–log_entry_idisnullcompliance: mandatory – This method must be implemented.
- log_entry_id (
-
log_entry_id_terms¶
-
supports_log_entry_query()¶ Tests if a log entry query is available.
Returns: trueif a log entry query is available,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
log_entry_query¶ Gets the query for a log entry.
Returns: the log entry query Return type: osid.logging.LogEntryQueryRaise: Unimplemented–supports_log_entry_query()isfalsecompliance: optional – This method must be implemented if ``supports_log_entry_query()`` is ``true``.
-
match_any_log_entry(match)¶ Matches logs with any log entry.
Parameters: match ( boolean) –trueto match logs with any entry,falseto match logs with no log entriescompliance: mandatory – This method must be implemented.
-
log_entry_terms¶
-
match_ancestor_log_id(log_id, match)¶ Sets the log
Idfor this query to match logs that have the specified log as an ancestor.Parameters: - log_id (
osid.id.Id) – a logId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–log_idisnullcompliance: mandatory – This method must be implemented.
- log_id (
-
ancestor_log_id_terms¶
-
supports_ancestor_log_query()¶ Tests if a
LogQueryis available.Returns: trueif a log query is available,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
ancestor_log_query¶ Gets the query for a log.
Multiple retrievals produce a nested
ORterm.Returns: the log query Return type: osid.logging.LogQueryRaise: Unimplemented–supports_ancestor_log_query()isfalsecompliance: optional – This method must be implemented if ``supports_ancestor_log_query()`` is ``true``.
-
match_any_ancestor_log(match)¶ Matches logs with any ancestor.
Parameters: match ( boolean) –trueto match logs with any ancestor,falseto match root logscompliance: mandatory – This method must be implemented.
-
ancestor_log_terms¶
-
match_descendant_log_id(log_id, match)¶ Sets the log
Idfor this query to match logs that have the specified log as a descendant.Parameters: - log_id (
osid.id.Id) – a logId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–log_idisnullcompliance: mandatory – This method must be implemented.
- log_id (
-
descendant_log_id_terms¶
-
supports_descendant_log_query()¶ Tests if a
LogQueryis available.Returns: trueif a log query is available,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
descendant_log_query¶ Gets the query for a log.
Multiple retrievals produce a nested
ORterm.Returns: the log query Return type: osid.logging.LogQueryRaise: Unimplemented–supports_descendant_log_query()isfalsecompliance: optional – This method must be implemented if ``supports_descendant_log_query()`` is ``true``.
-
match_any_descendant_log(match)¶ Matches logs with any descendant.
Parameters: match ( boolean) –trueto match logs with any descendant,falseto match leaf logscompliance: mandatory – This method must be implemented.
-
descendant_log_terms¶
-
get_log_query_record(log_record_type)¶ Gets the log query record corresponding to the given
LogrecordType.Multiple record retrievals produce a nested boolean
ORterm.Parameters: log_record_type ( osid.type.Type) – a log record typeReturns: the log query record Return type: osid.logging.records.LogQueryRecordRaise: NullArgument–log_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(log_record_type)isfalsecompliance: mandatory – This method must be implemented.
-