Queries¶
Log Entry Query¶
-
class
dlkit.logging_.queries.
LogEntryQuery
¶ Bases:
dlkit.osid.queries.OsidObjectQuery
This is the query for searching log entries.
Each method specifies an
AND
term while multiple invocations of the same method produce a nestedOR
.-
match_priority
(priority_type, match)¶ Matches a priority
Type
for the log entry.Parameters: - priority_type (
osid.type.Type
) –Type
to match - match (
boolean
) –true
if for a positive match,false
for a negative match
Raise: NullArgument
–priority_type
isnull
compliance: mandatory – This method must be implemented.
- priority_type (
-
match_any_priority
(match)¶ Matches log entries with any priority.
Parameters: match ( boolean
) –true
to match log entries with any priority,false
to 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
) –Type
to match - match (
boolean
) –true
if for a positive match,false
for a negative match
Raise: NullArgument
–priority_type
isnull
compliance: 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
) –true
if for a positive match,false
for a negative match
Raise: InvalidArgument
–start_time
is greater thanend_time
Raise: NullArgument
–start_time
orend_time
isnull
compliance: 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
) –Id
to match - match (
boolean
) –true
if for a positive match,false
for a negative match
Raise: NullArgument
–resource_id
isnull
compliance: mandatory – This method must be implemented.
- resource_id (
-
resource_id_terms
¶
-
supports_resource_query
()¶ Tests if a
ResourceQuery
is available for querying agents.Returns: true
if a resource query is available,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
resource_query
¶ Gets the query for a resource.
Returns: the resource query Return type: osid.resource.ResourceQuery
Raise: Unimplemented
–supports_resource_query()
isfalse
compliance: 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
) –Id
to match - match (
boolean
) –true
if for a positive match,false
for a negative match
Raise: NullArgument
–agent_id
isnull
compliance: mandatory – This method must be implemented.
- agent_id (
-
agent_id_terms
¶
-
supports_agent_query
()¶ Tests if an
AgentQuery
is available for querying agents.Returns: true
if an agent query is available,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
agent_query
¶ Gets the query for an agent.
Returns: the agent query Return type: osid.authentication.AgentQuery
Raise: Unimplemented
–supports_agent_query()
isfalse
compliance: 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
) –Id
to match - match (
boolean
) –true
if for a positive match,false
for a negative match
Raise: NullArgument
–log_id
isnull
compliance: mandatory – This method must be implemented.
- log_id (
-
log_id_terms
¶
-
supports_log_query
()¶ Tests if a
LogQuery
is available for querying logs.Returns: true
if a log query is available,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
log_query
¶ Gets the query for a log.
Returns: the log query Return type: osid.logging.LogQuery
Raise: Unimplemented
–supports_log_query()
isfalse
compliance: 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
LogEntry
recordType
.Multiple record retrievals produce a nested
OR
term.Parameters: log_entry_record_type ( osid.type.Type
) – a log entry record typeReturns: the log entry query record Return type: osid.logging.records.LogEntryQueryRecord
Raise: NullArgument
–log_entry_record_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: Unsupported
–has_record_type(log_eutry_record_type)
isfalse
compliance: mandatory – This method must be implemented.
-
Log Query¶
-
class
dlkit.logging_.queries.
LogQuery
¶ Bases:
dlkit.osid.queries.OsidCatalogQuery
This is the query for searching for logs.
Each method specifies an
AND
term 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
) –true
for a positive match,false
for a negative match
Raise: NullArgument
–log_entry_id
isnull
compliance: 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: true
if a log entry query is available,false
otherwiseReturn type: boolean
compliance: 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.LogEntryQuery
Raise: Unimplemented
–supports_log_entry_query()
isfalse
compliance: 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
) –true
to match logs with any entry,false
to 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
Id
for this query to match logs that have the specified log as an ancestor.Parameters: - log_id (
osid.id.Id
) – a logId
- match (
boolean
) –true
for a positive match,false
for a negative match
Raise: NullArgument
–log_id
isnull
compliance: mandatory – This method must be implemented.
- log_id (
-
ancestor_log_id_terms
¶
-
supports_ancestor_log_query
()¶ Tests if a
LogQuery
is available.Returns: true
if a log query is available,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
ancestor_log_query
¶ Gets the query for a log.
Multiple retrievals produce a nested
OR
term.Returns: the log query Return type: osid.logging.LogQuery
Raise: Unimplemented
–supports_ancestor_log_query()
isfalse
compliance: 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
) –true
to match logs with any ancestor,false
to match root logscompliance: mandatory – This method must be implemented.
-
ancestor_log_terms
¶
-
match_descendant_log_id
(log_id, match)¶ Sets the log
Id
for this query to match logs that have the specified log as a descendant.Parameters: - log_id (
osid.id.Id
) – a logId
- match (
boolean
) –true
for a positive match,false
for a negative match
Raise: NullArgument
–log_id
isnull
compliance: mandatory – This method must be implemented.
- log_id (
-
descendant_log_id_terms
¶
-
supports_descendant_log_query
()¶ Tests if a
LogQuery
is available.Returns: true
if a log query is available,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
descendant_log_query
¶ Gets the query for a log.
Multiple retrievals produce a nested
OR
term.Returns: the log query Return type: osid.logging.LogQuery
Raise: Unimplemented
–supports_descendant_log_query()
isfalse
compliance: 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
) –true
to match logs with any descendant,false
to 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
Log
recordType
.Multiple record retrievals produce a nested boolean
OR
term.Parameters: log_record_type ( osid.type.Type
) – a log record typeReturns: the log query record Return type: osid.logging.records.LogQueryRecord
Raise: NullArgument
–log_record_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: Unsupported
–has_record_type(log_record_type)
isfalse
compliance: mandatory – This method must be implemented.
-