Queries¶
Osid Query¶
-
class
dlkit.osid.queries.
OsidQuery
¶ Bases:
dlkit.osid.markers.Suppliable
The
OsidQuery
is used to assemble search queries.An
OsidQuery
is available from anOsidQuerySession
and defines methods to match objects. Once the desired parameters are set, theOsidQuery
is given to the designated search method. The sameOsidQuery
returned from the session must be used in the search as the provider may utilize implementation-specific data wiithin the object.If multiple data elements are set in this interface, the results matching all the given data (eg: AND) are returned.
Any match method inside an
OsidQuery
may be invoked multiple times. In the case of a match method, each invocation adds an element to anOR
expression. Any of these terms may also be negated through thematch
flag.OsidQuery { OsidQuery.matchDisplayName AND (OsidQuery.matchDescription OR OsidQuery.matchDescription)}OsidObjects
allow for the definition of an additonal records and theOsidQuery
parallels this mechanism. An interface type of anOsidObject
record must also define the correspondingOsidQuery
record which is available through query interfaces. Multiple requests of these typed interfaces may return the same underlying object and thus it is only useful to request once.An
OsidQuery
may be used to query for set or unset values using the “match any” methods. A field that has not bee explicitly assigned may default to a value. If multiple language translations exist and the query session is placed in a non-default locale, fields that have not been explicitly assigned in the non-default locale are considered unset even if the values from the default locale appear in the objects.-
string_match_types
¶ Gets the string matching types supported.
A string match type specifies the syntax of the string query, such as matching a word or including a wildcard or regular expression.
Returns: a list containing the supported string match types Return type: osid.type.TypeList
compliance: mandatory – This method must be implemented.
-
supports_string_match_type
(string_match_type)¶ Tests if the given string matching type is supported.
Parameters: string_match_type ( osid.type.Type
) – aType
indicating a string match typeReturns: true
if the given Type is supported,false
otherwiseReturn type: boolean
Raise: NullArgument
–string_match_type
isnull
compliance: mandatory – This method must be implemented.
-
match_keyword
(keyword, string_match_type, match)¶ Adds a keyword to match.
Multiple keywords can be added to perform a boolean
OR
among them. A keyword may be applied to any of the elements defined in this object such as the display name, description or any method defined in an interface implemented by this object.Parameters: - keyword (
string
) – keyword to match - string_match_type (
osid.type.Type
) – the string match type - match (
boolean
) –true
for a positive match,false
for a negative match
Raise: InvalidArgument
–keyword
is not ofstring_match_type
Raise: NullArgument
–keyword
orstring_match_type
isnull
Raise: Unsupported
–supports_string_match_type(string_match_type)
isfalse
compliance: mandatory – This method must be implemented.
- keyword (
-
keyword_terms
¶
-
match_any
(match)¶ Matches any object.
Parameters: match ( boolean
) –true
to match any object,
false
to match no objectscompliance: mandatory – This method must be implemented.
-
any_terms
¶
-
Osid Identifiable Query¶
-
class
dlkit.osid.queries.
OsidIdentifiableQuery
¶ Bases:
dlkit.osid.queries.OsidQuery
The
OsidIdentiableQuery
is used to assemble search queries forIdentifiable
objects.An
OsidIdentifiableQuery
is available from anOsidQuerySession
and defines methods to match objects. Once the desired parameters are set, theOsidIdentifiableQuery
is given to the designated search method. The sameOsidIdentifiableQuery
returned from the session must be used in the search as the provider may utilize implementation-specific data wiithin the object.If multiple data elements are set in this interface, the results matching all the given data (eg: AND) are returned.
-
match_id
(id_, match)¶ Adds an
Id
to match.Multiple
Ids
can be added to perform a booleanOR
among them.Parameters: - id (
osid.id.Id
) –Id
to match - match (
boolean
) –true
for a positive match,false
for a negative match
Raise: NullArgument
–id
isnull
compliance: mandatory – This method must be implemented.
- id (
-
id_terms
¶
-
Osid Extensible Query¶
-
class
dlkit.osid.queries.
OsidExtensibleQuery
¶ Bases:
dlkit.osid.queries.OsidQuery
,dlkit.osid.markers.Extensible
The
OsidExtensibleQuery
is used to assemble search queries forExtensible
objects.An
OsidExtensibleQuery
is available from anOsidQuerySession
and defines methods to match objects. Once the desired parameters are set, theOsidExtensibleQuery
is given to the designated search method. The sameOsidExtensibleQuery
returned from the session must be used in the search as the provider may utilize implementation-specific data wiithin the object.If multiple data elements are set in this interface, the results matching all the given data (eg: AND) are returned.
-
match_record_type
(record_type, match)¶ Sets a
Type
for querying objects having records implementing a given record type.Parameters: - record_type (
osid.type.Type
) – a record type - match (
boolean
) –true
for a positive match,false
for a negative match
Raise: NullArgument
–record_type
isnull
compliance: mandatory – This method must be implemented.
- record_type (
-
match_any_record
(match)¶ Matches an object that has any record.
Parameters: match ( boolean
) –true
to match any record,false
to match objects with no recordscompliance: mandatory – This method must be implemented.
-
record_terms
¶
-
Osid Browsable Query¶
-
class
dlkit.osid.queries.
OsidBrowsableQuery
¶ Bases:
dlkit.osid.queries.OsidQuery
The
OsidBrowsableQuery
is used to assemble search queries forBrowsable
objects.An
OsidBrowsableQuery
is available from anOsidQuerySession
and defines methods to match objects. Once the desired parameters are set, theOsidBrowsableQuery
is given to the designated search method. The sameOsidBrowsableQuery
returned from the session must be used in the search as the provider may utilize implementation-specific data wiithin the object.If multiple data elements are set in this interface, the results matching all the given data (eg: AND) are returned.
Osid Temporal Query¶
-
class
dlkit.osid.queries.
OsidTemporalQuery
¶ Bases:
dlkit.osid.queries.OsidQuery
This is the query interface for searching temporal objects.
Each method specifies an
AND
term while multiple invocations of the same method produce a nestedOR
.-
match_effective
(match)¶ Match effective objects where the current date falls within the start and end dates inclusive.
Parameters: match ( boolean
) –true
to match any effective,false
to match ineffectivecompliance: mandatory – This method must be implemented.
-
effective_terms
¶
-
match_start_date
(start, end, match)¶ Matches temporals whose start date falls in between the given dates inclusive.
Parameters: - start (
osid.calendaring.DateTime
) – start of date range - end (
osid.calendaring.DateTime
) – end of date range - match (
boolean
) –true
if a positive match,false
for a negative match
Raise: InvalidArgument
–start
is less thanend
Raise: NullArgument
–start
orend
isnull
compliance: mandatory – This method must be implemented.
- start (
-
match_any_start_date
(match)¶ Matches temporals with any start date set.
Parameters: match ( boolean
) –true
to match any start date,false
to match no start datecompliance: mandatory – This method must be implemented.
-
start_date_terms
¶
-
match_end_date
(start, end, match)¶ Matches temporals whose effective end date falls in between the given dates inclusive.
Parameters: - start (
osid.calendaring.DateTime
) – start of date range - end (
osid.calendaring.DateTime
) – end of date range - match (
boolean
) –true
if a positive match,false
for negative match
Raise: InvalidArgument
–start
is less thanend
Raise: NullArgument
–start
orend
isnull
compliance: mandatory – This method must be implemented.
- start (
-
match_any_end_date
(match)¶ Matches temporals with any end date set.
Parameters: match ( boolean
) –true
to match any end date,false
to match no start datecompliance: mandatory – This method must be implemented.
-
end_date_terms
¶
-
match_date
(from_, to, match)¶ Matches temporals where the given date range falls entirely between the start and end dates inclusive.
Parameters: - from (
osid.calendaring.DateTime
) – start date - to (
osid.calendaring.DateTime
) – end date - match (
boolean
) –true
if a positive match,false
for a negative match
Raise: InvalidArgument
–from
is less thanto
Raise: NullArgument
–from
orto
isnull
compliance: mandatory – This method must be implemented.
- from (
-
date_terms
¶
-
Osid Subjugateable Query¶
-
class
dlkit.osid.queries.
OsidSubjugateableQuery
¶ Bases:
dlkit.osid.queries.OsidQuery
The
OsidSubjugateableQuery
is used to assemble search queries for dependent objects.
Osid Aggregateable Query¶
-
class
dlkit.osid.queries.
OsidAggregateableQuery
¶ Bases:
dlkit.osid.queries.OsidQuery
The
OsidAggregateableQuery
is used to assemble search queries for assemblages.
Osid Containable Query¶
-
class
dlkit.osid.queries.
OsidContainableQuery
¶ Bases:
dlkit.osid.queries.OsidQuery
This is the query interface for searching containers.
Each method specifies an
AND
term while multiple invocations of the same method produce a nestedOR
.-
match_sequestered
(match)¶ Match containables that are sequestered.
Parameters: match ( boolean
) –true
to match any sequestered containables,false
to match non-sequestered containablescompliance: mandatory – This method must be implemented.
-
sequestered_terms
¶
-
Osid Sourceable Query¶
-
class
dlkit.osid.queries.
OsidSourceableQuery
¶ Bases:
dlkit.osid.queries.OsidQuery
The
OsidSourceableQuery
is used to assemble search queries for sourceables.-
match_provider_id
(resource_id, match)¶ Match the
Id
of the provider resource.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 (
-
provider_id_terms
¶
-
supports_provider_query
()¶ Tests if a
ResourceQuery
for the provider is available.Returns: true
if a resource query is available,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
get_provider_query
(match)¶ Gets the query for the provider.
Each retrieval performs a boolean
OR
.Parameters: match ( boolean
) –true
if for a positive match,false
for a negative matchReturns: the provider query Return type: osid.resource.ResourceQuery
Raise: Unimplemented
–supports_provider_query()
isfalse
compliance: optional – This method must be implemented if ``supports_provider_query()`` is ``true``.
-
match_any_provider
(match)¶ Match sourceables with a provider value.
Parameters: match ( boolean
) –true
to match sourceables with any provider,false
to match sourceables with no providerscompliance: mandatory – This method must be implemented.
-
provider_terms
¶
-
match_branding_id
(asset_id, match)¶ Match the
Id
of an asset used for branding.Parameters: - asset_id (
osid.id.Id
) –Id
to match - match (
boolean
) –true
if for a positive match,false
for a negative match
Raise: NullArgument
–asset_id
isnull
compliance: mandatory – This method must be implemented.
- asset_id (
-
branding_id_terms
¶
-
supports_branding_query
()¶ Tests if an
AssetQuery
for the branding is available.Returns: true
if a asset query is available,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
get_branding_query
(match)¶ Gets the query for an asset.
Each retrieval performs a boolean
OR
.Parameters: match ( boolean
) –true
if for a positive match,false
for a negative matchReturns: the asset query Return type: osid.repository.AssetQuery
Raise: Unimplemented
–supports_branding_query()
isfalse
compliance: optional – This method must be implemented if ``supports_branding_query()`` is ``true``.
-
match_any_branding
(match)¶ Match sourceables with any branding.
Parameters: match ( boolean
) –true
to match any asset,false
to match no assetscompliance: mandatory – This method must be implemented.
-
branding_terms
¶
-
match_license
(license_, string_match_type, match)¶ Adds a license to match.
Multiple license matches can be added to perform a boolean
OR
among them.Parameters: - license (
string
) – a string to match - string_match_type (
osid.type.Type
) – the string match type - match (
boolean
) –true
for a positive match,false
for a negative match
Raise: InvalidArgument
–license
is not ofstring_match_type
Raise: NullArgument
–license
orstring_match_type
isnull
Raise: Unsupported
–supports_string_match_type(string_match_type)
isfalse
compliance: mandatory – This method must be implemented.
- license (
-
match_any_license
(match)¶ Matches any object with a license.
Parameters: match ( boolean
) –true
to match any license,false
to match objects with no licensecompliance: mandatory – This method must be implemented.
-
license_terms
¶
-
Osid Federateable Query¶
-
class
dlkit.osid.queries.
OsidFederateableQuery
¶ Bases:
dlkit.osid.queries.OsidQuery
The
OsidFederateableQuery
is used to assemble search queries for federated objects.
Osid Operable Query¶
-
class
dlkit.osid.queries.
OsidOperableQuery
¶ Bases:
dlkit.osid.queries.OsidQuery
This is the query interface for searching operables.
Each method specifies an
AND
term while multiple invocations of the same method produce a nestedOR
.-
match_active
(match)¶ Matches active.
Parameters: match ( boolean
) –true
to match active,false
to match inactivecompliance: mandatory – This method must be implemented.
-
active_terms
¶
-
match_enabled
(match)¶ Matches administratively enabled.
Parameters: match ( boolean
) –true
to match administratively enabled,false
otherwisecompliance: mandatory – This method must be implemented.
-
enabled_terms
¶
-
match_disabled
(match)¶ Matches administratively disabled.
Parameters: match ( boolean
) –true
to match administratively disabled,false
otherwisecompliance: mandatory – This method must be implemented.
-
disabled_terms
¶
-
match_operational
(match)¶ Matches operational operables.
Parameters: match ( boolean
) –true
to match operational,false
to match not operationalcompliance: mandatory – This method must be implemented.
-
operational_terms
¶
-
Osid Object Query¶
-
class
dlkit.osid.queries.
OsidObjectQuery
¶ Bases:
dlkit.osid.queries.OsidIdentifiableQuery
,dlkit.osid.queries.OsidExtensibleQuery
,dlkit.osid.queries.OsidBrowsableQuery
The
OsidObjectQuery
is used to assemble search queries.An
OsidObjectQuery
is available from anOsidSession
and defines methods to query for anOsidObject
that includes setting a display name and a description. Once the desired parameters are set, theOsidQuery
is given to the designated search method. The sameOsidQuery
returned from the session must be used in the search as the provider may utilize implementation-specific data wiithin the object.If multiple data elements are set in this interface, the results matching all the given data (eg: AND) are returned.
Any match method inside an
OsidObjectQuery
may be invoked multiple times. In the case of a match method, each invocation adds an element to anOR
expression. Any of these terms may also be negated through thematch
flag.OsidObjectQuery { OsidQuery.matchDisplayName AND (OsidQuery.matchDescription OR OsidObjectQuery.matchDescription)}OsidObjects
allow for the definition of an additonal records and theOsidQuery
parallels this mechanism. An interface type of anOsidObject
record must also define the correspondingOsidQuery
record which is available through query interfaces. Multiple requests of these typed interfaces may return the same underlying object and thus it is only useful to request once.String searches are described using a string search
Type
that indicates the type of regular expression or wildcarding encoding. Compatibility with a strings searchType
can be tested within this interface.As with all aspects of OSIDs, nulls cannot be used. Separate tests are available for querying for unset values except for required fields.
An example to find all objects whose name starts with “Fred” or whose name starts with “Barney”, but the word “dinosaur” does not appear in the description and not the color is not purple.
ColorQuery
is a record of the object that defines a color.ObjectObjectQuery query; query = session.getObjectQuery(); query.matchDisplayName(“Fred*”, wildcardStringMatchType, true); query.matchDisplayName(“Barney*”, wildcardStringMatchType, true); query.matchDescriptionMatch(“dinosaur”, wordStringMatchType, false);
ColorQuery recordQuery; recordQuery = query.getObjectRecord(colorRecordType); recordQuery.matchColor(“purple”, false); ObjectList list = session.getObjectsByQuery(query);
-
match_display_name
(display_name, string_match_type, match)¶ Adds a display name to match.
Multiple display name matches can be added to perform a boolean
OR
among them.Parameters: - display_name (
string
) – display name to match - string_match_type (
osid.type.Type
) – the string match type - match (
boolean
) –true
for a positive match,false
for a negative match
Raise: InvalidArgument
–display_name
is not ofstring_match_type
Raise: NullArgument
–display_name
orstring_match_type
isnull
Raise: Unsupported
–supports_string_match_type(string_match_type)
isfalse
compliance: mandatory – This method must be implemented.
- display_name (
-
match_any_display_name
(match)¶ Matches any object with a display name.
Parameters: match ( boolean
) –true
to match any display name,false
to match objects with no display namecompliance: mandatory – This method must be implemented.
-
display_name_terms
¶
-
match_description
(description, string_match_type, match)¶ Adds a description name to match.
Multiple description matches can be added to perform a boolean
OR
among them.Parameters: - description (
string
) – description to match - string_match_type (
osid.type.Type
) – the string match type - match (
boolean
) –true
for a positive match,false
for a negative match
Raise: InvalidArgument
–description
is not ofstring_match_type
Raise: NullArgument
–description
orstring_match_type
isnull
Raise: Unsupported
–supports_string_match_type(string_match_type)
isfalse
compliance: mandatory – This method must be implemented.
- description (
-
match_any_description
(match)¶ Matches a description that has any value.
Parameters: match ( boolean
) –true
to match any description,false
to match descriptions with no valuescompliance: mandatory – This method must be implemented.
-
description_terms
¶
-
match_genus_type
(genus_type, match)¶ Sets a
Type
for querying objects of a given genus.A genus type matches if the specified type is the same genus as the object genus type.
Parameters: - genus_type (
osid.type.Type
) – the object genus type - match (
boolean
) –true
for a positive match,false
for a negative match
Raise: NullArgument
–genus_type
isnull
compliance: mandatory – This method must be implemented.
- genus_type (
-
match_any_genus_type
(match)¶ Matches an object that has any genus type.
Parameters: match ( boolean
) –true
to match any genus type,false
to match objects with no genus typecompliance: mandatory – This method must be implemented.
-
genus_type_terms
¶
-
match_parent_genus_type
(genus_type, match)¶ Sets a
Type
for querying objects of a given genus.A genus type matches if the specified type is the same genus as the object or if the specified type is an ancestor of the object genus in a type hierarchy.
Parameters: - genus_type (
osid.type.Type
) – the object genus type - match (
boolean
) –true
for a positive match,false
for a negative match
Raise: NullArgument
–genus_type
isnull
compliance: mandatory – This method must be implemented.
- genus_type (
-
parent_genus_type_terms
¶
-
match_subject_id
(subject_id, match)¶ Matches an object with a relationship to the given subject.
Parameters: - subject_id (
osid.id.Id
) – a subjectId
- match (
boolean
) –true
for a positive match,false
for a negative match
Raise: NullArgument
–subject_id
isnull
compliance: mandatory – This method must be implemented.
- subject_id (
-
subject_id_terms
¶
-
supports_subject_query
()¶ Tests if a
SubjectQuery
is available.Returns: true
if a subject query is available,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
subject_query
¶ Gets the query for a subject.
Multiple retrievals produce a nested
OR
term.Returns: the subject query Return type: osid.ontology.SubjectQuery
Raise: Unimplemented
–supports_subject_query()
isfalse
compliance: optional – This method must be implemented if ``supports_subject_query()`` is ``true``.
-
match_any_subject
(match)¶ Matches an object that has any relationship to a
Subject
.Parameters: match ( boolean
) –true
to match any subject,false
to match objects with no subjectscompliance: mandatory – This method must be implemented.
-
subject_terms
¶
-
supports_subject_relevancy_query
()¶ Tests if a
RelevancyQuery
is available to provide queries about the relationships toSubjects
.Returns: true
if a relevancy entry query is available,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
subject_relevancy_query
¶ Gets the query for a subject relevancy.
Multiple retrievals produce a nested
OR
term.Returns: the relevancy query Return type: osid.ontology.RelevancyQuery
Raise: Unimplemented
–supports_subject_relevancy_query()
isfalse
compliance: optional – This method must be implemented if ``supports_subject_relevancy_query()`` is ``true``.
-
subject_relevancy_terms
¶
-
match_state_id
(state_id, match)¶ Matches an object mapped to the given state.
Parameters: - state_id (
osid.id.Id
) – a stateId
- match (
boolean
) –true
for a positive match,false
for a negative match
Raise: NullArgument
–state_id
isnull
compliance: mandatory – This method must be implemented.
- state_id (
-
state_id_terms
¶
-
supports_state_query
()¶ Tests if a
StateQuery
is available to provide queries of processed objects.Returns: true
if a state query is available,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
state_query
¶ Gets the query for a state.
Multiple retrievals produce a nested
OR
term.Returns: the journal entry query Return type: osid.process.StateQuery
Raise: Unimplemented
–supports_state_query()
isfalse
compliance: optional – This method must be implemented if ``supports_state_query()`` is ``true``.
-
match_any_state
(match)¶ Matches an object that has any mapping to a
State
in the givenProcess
.Parameters: match ( boolean
) –true
to match any state,false
to match objects with no statescompliance: mandatory – This method must be implemented.
-
state_terms
¶
-
match_comment_id
(comment_id, match)¶ Matches an object that has the given comment.
Parameters: - comment_id (
osid.id.Id
) – a commentId
- match (
boolean
) –true
for a positive match,false
for a negative match
Raise: NullArgument
–comment_id
isnull
compliance: mandatory – This method must be implemented.
- comment_id (
-
comment_id_terms
¶
-
supports_comment_query
()¶ Tests if a
CommentQuery
is available.Returns: true
if a comment query is available,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
comment_query
¶ Gets the query for a comment.
Multiple retrievals produce a nested
OR
term.Returns: the comment query Return type: osid.commenting.CommentQuery
Raise: Unimplemented
–supports_comment_query()
isfalse
compliance: optional – This method must be implemented if ``supports_comment_query()`` is ``true``.
-
match_any_comment
(match)¶ Matches an object that has any
Comment
in the givenBook
.Parameters: match ( boolean
) –true
to match any comment,false
to match objects with no commentscompliance: mandatory – This method must be implemented.
-
comment_terms
¶
-
match_journal_entry_id
(journal_entry_id, match)¶ Matches an object that has the given journal entry.
Parameters: - journal_entry_id (
osid.id.Id
) – a journal entryId
- match (
boolean
) –true
for a positive match,false
for a negative match
Raise: NullArgument
–journal_entry_id
isnull
compliance: mandatory – This method must be implemented.
- journal_entry_id (
-
journal_entry_id_terms
¶
-
supports_journal_entry_query
()¶ Tests if a
JournalEntry
is available to provide queries of journaledOsidObjects
.Returns: true
if a journal entry query is available,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
journal_entry_query
¶ Gets the query for a journal entry.
Multiple retrievals produce a nested
OR
term.Returns: the journal entry query Return type: osid.journaling.JournalEntryQuery
Raise: Unimplemented
–supports_journal_entry_query()
isfalse
compliance: optional – This method must be implemented if ``supports_journal_entry_query()`` is ``true``.
-
match_any_journal_entry
(match)¶ Matches an object that has any
JournalEntry
in the givenJournal
.Parameters: match ( boolean
) –true
to match any journal entry,false
to match objects with no journal entriescompliance: mandatory – This method must be implemented.
-
journal_entry_terms
¶
-
supports_statistic_query
()¶ Tests if a
StatisticQuery
is available to provide statistical queries.Returns: true
if a statistic query is available,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
statistic_query
¶ Gets the query for a statistic.
Multiple retrievals produce a nested
OR
term.Returns: the statistic query Return type: osid.metering.StatisticQuery
Raise: Unimplemented
–supports_statistic_query()
isfalse
compliance: optional – This method must be implemented if ``supports_statistic_query()`` is ``true``.
-
match_any_statistic
(match)¶ Matches an object that has any
Statistic
.Parameters: match ( boolean
) –true
to match any statistic,false
to match objects with no statisticscompliance: mandatory – This method must be implemented.
-
statistic_terms
¶
-
match_credit_id
(credit_id, match)¶ Matches an object that has the given credit.
Parameters: - credit_id (
osid.id.Id
) – a creditId
- match (
boolean
) –true
for a positive match,false
for a negative match
Raise: NullArgument
–credit_id
isnull
compliance: mandatory – This method must be implemented.
- credit_id (
-
credit_id_terms
¶
-
supports_credit_query
()¶ Tests if a
CreditQuery
is available to provide queries of related acknowledgements.Returns: true
if a credit query is available,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
credit_query
¶ Gets the query for an ackowledgement credit.
Multiple retrievals produce a nested
OR
term.Returns: the credit query Return type: osid.acknowledgement.CreditQuery
Raise: Unimplemented
–supports_credit_query()
isfalse
compliance: optional – This method must be implemented if ``supports_credit_query()`` is ``true``.
-
match_any_credit
(match)¶ Matches an object that has any
Credit
.Parameters: match ( boolean
) –true
to match any credit,false
to match objects with no creditscompliance: mandatory – This method must be implemented.
-
credit_terms
¶
-
match_relationship_id
(relationship_id, match)¶ Matches an object that has the given relationship.
Parameters: - relationship_id (
osid.id.Id
) – a relationshipId
- match (
boolean
) –true
for a positive match,false
for a negative match
Raise: NullArgument
–relationship_id
isnull
compliance: mandatory – This method must be implemented.
- relationship_id (
-
relationship_id_terms
¶
-
supports_relationship_query
()¶ Tests if a
RelationshipQuery
is available.Returns: true
if a relationship query is available,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
relationship_query
¶ Gets the query for relationship.
Multiple retrievals produce a nested
OR
term.Returns: the relationship query Return type: osid.relationship.RelationshipQuery
Raise: Unimplemented
–supports_relationship_query()
isfalse
compliance: optional – This method must be implemented if ``supports_relationship_query()`` is ``true``.
-
match_any_relationship
(match)¶ Matches an object that has any
Relationship
.Parameters: match ( boolean
) –true
to match any relationship,false
to match objects with no relationshipscompliance: mandatory – This method must be implemented.
-
relationship_terms
¶
-
match_relationship_peer_id
(peer_id, match)¶ Matches an object that has a relationship to the given peer
Id
.Parameters: - peer_id (
osid.id.Id
) – a relationship peerId
- match (
boolean
) –true
for a positive match,false
for a negative match
Raise: NullArgument
–peer_id
isnull
compliance: mandatory – This method must be implemented.
- peer_id (
-
relationship_peer_id_terms
¶
-
Osid Relationship Query¶
-
class
dlkit.osid.queries.
OsidRelationshipQuery
¶ Bases:
dlkit.osid.queries.OsidObjectQuery
,dlkit.osid.queries.OsidTemporalQuery
This is the query interface for searching relationships.
Each method specifies an
AND
term while multiple invocations of the same method produce a nestedOR
.-
match_end_reason_id
(state_id, match)¶ Match the
Id
of the end reason state.Parameters: - state_id (
osid.id.Id
) –Id
to match - match (
boolean
) –true
if for a positive match,false
for a negative match
Raise: NullArgument
–rule_id
isnull
compliance: mandatory – This method must be implemented.
- state_id (
-
end_reason_id_terms
¶
-
supports_end_reason_query
()¶ Tests if a
StateQuery
for the end reason is available.Returns: true
if a end reason query is available,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
get_end_reason_query
(match)¶ Gets the query for the end reason state.
Each retrieval performs a boolean
OR
.Parameters: match ( boolean
) –true
if for a positive match,false
for a negative matchReturns: the state query Return type: osid.process.StateQuery
Raise: Unimplemented
–supports_end_reason_query()
isfalse
compliance: optional – This method must be implemented if ``supports_end_reason_query()`` is ``true``.
-
match_any_end_reason
(match)¶ Match any end reason state.
Parameters: match ( boolean
) –true
to match any state,false
to match no statecompliance: mandatory – This method must be implemented.
-
end_reason_terms
¶
-
Osid Catalog Query¶
-
class
dlkit.osid.queries.
OsidCatalogQuery
¶ Bases:
dlkit.osid.queries.OsidObjectQuery
,dlkit.osid.queries.OsidSourceableQuery
,dlkit.osid.queries.OsidFederateableQuery
The
OsidCatalogQuery
is used to assemble search queries for catalogs.
Osid Rule Query¶
-
class
dlkit.osid.queries.
OsidRuleQuery
¶ Bases:
dlkit.osid.queries.OsidObjectQuery
,dlkit.osid.queries.OsidOperableQuery
This is the query interface for searching rules.
Each method specifies an
AND
term while multiple invocations of the same method produce a nestedOR
.-
match_rule_id
(rule_id, match)¶ Match the
Id
of the rule.Parameters: - rule_id (
osid.id.Id
) –Id
to match - match (
boolean
) –true
if for a positive match,false
for a negative match
Raise: NullArgument
–rule_id
isnull
compliance: mandatory – This method must be implemented.
- rule_id (
-
rule_id_terms
¶
-
supports_rule_query
()¶ Tests if a
RuleQuery
for the rule is available.Returns: true
if a rule query is available,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
get_rule_query
(match)¶ Gets the query for the rule.
Each retrieval performs a boolean
OR
.Parameters: match ( boolean
) –true
if for a positive match,false
for a negative matchReturns: the rule query Return type: osid.rules.RuleQuery
Raise: Unimplemented
–supports_rule_query()
isfalse
compliance: optional – This method must be implemented if ``supports_rule_query()`` is ``true``.
-
match_any_rule
(match)¶ Match any associated rule.
Parameters: match ( boolean
) –true
to match any rule,false
to match no rulescompliance: mandatory – This method must be implemented.
-
rule_terms
¶
-
Osid Enabler Query¶
-
class
dlkit.osid.queries.
OsidEnablerQuery
¶ Bases:
dlkit.osid.queries.OsidRuleQuery
,dlkit.osid.queries.OsidTemporalQuery
This is the query interface for searching enablers.
Each method specifies an
AND
term while multiple invocations of the same method produce a nestedOR
.-
match_schedule_id
(schedule_id, match)¶ Match the
Id
of an associated schedule.Parameters: - schedule_id (
osid.id.Id
) –Id
to match - match (
boolean
) –true
if for a positive match,false
for a negative match
Raise: NullArgument
–schedule_id
isnull
compliance: mandatory – This method must be implemented.
- schedule_id (
-
schedule_id_terms
¶
-
supports_schedule_query
()¶ Tests if a
ScheduleQuery
for the rule is available.Returns: true
if a schedule query is available,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
get_schedule_query
(match)¶ Gets the query for the schedule.
Each retrieval performs a boolean
OR
.Parameters: match ( boolean
) –true
if for a positive match,false
for a negative matchReturns: the schedule query Return type: osid.calendaring.ScheduleQuery
Raise: Unimplemented
–supports_schedule_query()
isfalse
compliance: optional – This method must be implemented if ``supports_schedule_query()`` is ``true``.
-
match_any_schedule
(match)¶ Match any associated schedule.
Parameters: match ( boolean
) –true
to match any schedule,false
to match no schedulescompliance: mandatory – This method must be implemented.
-
schedule_terms
¶
-
match_event_id
(event_id, match)¶ Match the
Id
of an associated event.Parameters: - event_id (
osid.id.Id
) –Id
to match - match (
boolean
) –true
if for a positive match,false
for a negative match
Raise: NullArgument
–event_id
isnull
compliance: mandatory – This method must be implemented.
- event_id (
-
event_id_terms
¶
-
supports_event_query
()¶ Tests if a
EventQuery
for the rule is available.Returns: true
if an event query is available,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
get_event_query
(match)¶ Gets the query for the event.
Each retrieval performs a boolean
OR
.Parameters: match ( boolean
) –true
if for a positive match,false
for a negative matchReturns: the event query Return type: osid.calendaring.EventQuery
Raise: Unimplemented
–supports_event_query()
isfalse
compliance: optional – This method must be implemented if ``supports_event_query()`` is ``true``.
-
match_any_event
(match)¶ Match any associated event.
Parameters: match ( boolean
) –true
to match any event,false
to match no eventscompliance: mandatory – This method must be implemented.
-
event_terms
¶
-
match_cyclic_event_id
(cyclic_event_id, match)¶ Sets the cyclic event
Id
for this query.Parameters: - cyclic_event_id (
osid.id.Id
) – the cyclic eventId
- match (
boolean
) –true
for a positive match,false
for a negative match
Raise: NullArgument
–cyclic_event_id
isnull
compliance: mandatory – This method must be implemented.
- cyclic_event_id (
-
cyclic_event_id_terms
¶
-
supports_cyclic_event_query
()¶ Tests if a
CyclicEventQuery
is available.Returns: true
if a cyclic event query is available,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
cyclic_event_query
¶ Gets the query for a cyclic event.
Multiple retrievals produce a nested
OR
term.Returns: the cyclic event query Return type: osid.calendaring.cycle.CyclicEventQuery
Raise: Unimplemented
–supports_cyclic_event_query()
isfalse
compliance: optional – This method must be implemented if ``supports_cyclic_event_query()`` is ``true``.
-
match_any_cyclic_event
(match)¶ Matches any enabler with a cyclic event.
Parameters: match ( boolean
) –true
to match any enablers with a cyclic event,false
to match enablers with no cyclic eventscompliance: mandatory – This method must be implemented.
-
cyclic_event_terms
¶
-
match_demographic_id
(resource_id, match)¶ Match the
Id
of the demographic resource.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 (
-
demographic_id_terms
¶
-
supports_demographic_query
()¶ Tests if a
ResourceQuery
for the demographic is available.Returns: true
if a resource query is available,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
get_demographic_query
(match)¶ Gets the query for the resource.
Each retrieval performs a boolean
OR
.Parameters: match ( boolean
) –true
if for a positive match,false
for a negative matchReturns: 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``.
-
match_any_demographic
(match)¶ Match any associated resource.
Parameters: match ( boolean
) –true
to match any demographic,false
to match no rulescompliance: mandatory – This method must be implemented.
-
demographic_terms
¶
-
Osid Constrainer Query¶
-
class
dlkit.osid.queries.
OsidConstrainerQuery
¶ Bases:
dlkit.osid.queries.OsidRuleQuery
This is the query interface for searching constrainers.
Each method specifies an
AND
term while multiple invocations of the same method produce a nestedOR
.
Osid Processor Query¶
-
class
dlkit.osid.queries.
OsidProcessorQuery
¶ Bases:
dlkit.osid.queries.OsidRuleQuery
This is the query interface for searching processors.
Each method specifies an
AND
term while multiple invocations of the same method produce a nestedOR
.
Osid Governator Query¶
-
class
dlkit.osid.queries.
OsidGovernatorQuery
¶ Bases:
dlkit.osid.queries.OsidObjectQuery
,dlkit.osid.queries.OsidOperableQuery
,dlkit.osid.queries.OsidSourceableQuery
This is the query interface for searching governers.
Each method specifies an
AND
term while multiple invocations of the same method produce a nestedOR
.
Osid Compendium Query¶
-
class
dlkit.osid.queries.
OsidCompendiumQuery
¶ Bases:
dlkit.osid.queries.OsidObjectQuery
,dlkit.osid.queries.OsidSubjugateableQuery
This is the query interface for searching reports.
Each method specifies an
AND
term while multiple invocations of the same method produce a nestedOR
.-
match_start_date
(start, end, match)¶ Matches reports whose start date falls in between the given dates inclusive.
Parameters: - start (
osid.calendaring.DateTime
) – start of date range - end (
osid.calendaring.DateTime
) – end of date range - match (
boolean
) –true
if a positive match,false
for a negative match
Raise: InvalidArgument
–start
is less thanend
Raise: NullArgument
–start
orend
isnull
compliance: mandatory – This method must be implemented.
- start (
-
match_any_start_date
(match)¶ Matches reports with any start date set.
Parameters: match ( boolean
) –true
to match any start date,false
to match no start datecompliance: mandatory – This method must be implemented.
-
start_date_terms
¶
-
match_end_date
(start, end, match)¶ Matches reports whose effective end date falls in between the given dates inclusive.
Parameters: - start (
osid.calendaring.DateTime
) – start of date range - end (
osid.calendaring.DateTime
) – end of date range - match (
boolean
) –true
if a positive match,false
for negative match
Raise: InvalidArgument
–start
is less thanend
Raise: NullArgument
–start
orend
isnull
compliance: mandatory – This method must be implemented.
- start (
-
match_any_end_date
(match)¶ Matches reports with any end date set.
Parameters: match ( boolean
) –true
to match any end date,false
to match no start datecompliance: mandatory – This method must be implemented.
-
end_date_terms
¶
-
match_interpolated
(match)¶ Match reports that are interpolated.
Parameters: match ( boolean
) –true
to match any interpolated reports,false
to match non-interpolated reportscompliance: mandatory – This method must be implemented.
-
interpolated_terms
¶
-
match_extrapolated
(match)¶ Match reports that are extrapolated.
Parameters: match ( boolean
) –true
to match any extrapolated reports,false
to match non-extrapolated reportscompliance: mandatory – This method must be implemented.
-
extrapolated_terms
¶
-
Osid Capsule Query¶
-
class
dlkit.osid.queries.
OsidCapsuleQuery
¶ Bases:
dlkit.osid.queries.OsidQuery
This is the query interface for searching capsulating interfaces.
Each method specifies an
AND
term while multiple invocations of the same method produce a nestedOR
.