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 an OsidQuerySession and defines methods to match objects. Once the desired parameters are set, the OsidQuery is given to the designated search method. The same OsidQuery 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 an OR expression. Any of these terms may also be negated through the match flag.

OsidQuery { OsidQuery.matchDisplayName AND (OsidQuery.matchDescription OR OsidQuery.matchDescription)}

OsidObjects allow for the definition of an additonal records and the OsidQuery parallels this mechanism. An interface type of an OsidObject record must also define the corresponding OsidQuery 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) – a Type indicating a string match type
Returns:true if the given Type is supported, false otherwise
Return type:boolean
Raise:NullArgumentstring_match_type is null

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:

InvalidArgumentkeyword is not of string_match_type

Raise:

NullArgumentkeyword or string_match_type is null

Raise:

Unsupportedsupports_string_match_type(string_match_type) is false

compliance: mandatory – This method must be implemented.

keyword_terms
match_any(match)

Matches any object.

Parameters:match (boolean) – true to match any object , false to match no objects

compliance: 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 for Identifiable objects.

An OsidIdentifiableQuery is available from an OsidQuerySession and defines methods to match objects. Once the desired parameters are set, the OsidIdentifiableQuery is given to the designated search method. The same OsidIdentifiableQuery 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 boolean OR among them.

Parameters:
  • id (osid.id.Id) – Id to match
  • match (boolean) – true for a positive match, false for a negative match
Raise:

NullArgumentid is null

compliance: mandatory – This method must be implemented.

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 for Extensible objects.

An OsidExtensibleQuery is available from an OsidQuerySession and defines methods to match objects. Once the desired parameters are set, the OsidExtensibleQuery is given to the designated search method. The same OsidExtensibleQuery 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:

NullArgumentrecord_type is null

compliance: mandatory – This method must be implemented.

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 records

compliance: 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 for Browsable objects.

An OsidBrowsableQuery is available from an OsidQuerySession and defines methods to match objects. Once the desired parameters are set, the OsidBrowsableQuery is given to the designated search method. The same OsidBrowsableQuery 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 nested OR.

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 ineffective

compliance: 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:

InvalidArgumentstart is less than end

Raise:

NullArgumentstart or end is null

compliance: mandatory – This method must be implemented.

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 date

compliance: 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:

InvalidArgumentstart is less than end

Raise:

NullArgumentstart or end is null

compliance: mandatory – This method must be implemented.

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 date

compliance: 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:

InvalidArgumentfrom is less than to

Raise:

NullArgumentfrom or to is null

compliance: mandatory – This method must be implemented.

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 nested OR.

match_sequestered(match)

Match containables that are sequestered.

Parameters:match (boolean) – true to match any sequestered containables, false to match non-sequestered containables

compliance: 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:

NullArgumentresource_id is null

compliance: mandatory – This method must be implemented.

provider_id_terms
supports_provider_query()

Tests if a ResourceQuery for the provider is available.

Returns:true if a resource query is available, false otherwise
Return 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 match
Returns:the provider query
Return type:osid.resource.ResourceQuery
Raise:Unimplementedsupports_provider_query() is false

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 providers

compliance: 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:

NullArgumentasset_id is null

compliance: mandatory – This method must be implemented.

branding_id_terms
supports_branding_query()

Tests if an AssetQuery for the branding is available.

Returns:true if a asset query is available, false otherwise
Return 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 match
Returns:the asset query
Return type:osid.repository.AssetQuery
Raise:Unimplementedsupports_branding_query() is false

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 assets

compliance: 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:

InvalidArgumentlicense is not of string_match_type

Raise:

NullArgumentlicense or string_match_type is null

Raise:

Unsupportedsupports_string_match_type(string_match_type) is false

compliance: mandatory – This method must be implemented.

match_any_license(match)

Matches any object with a license.

Parameters:match (boolean) – true to match any license, false to match objects with no license

compliance: 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 nested OR.

match_active(match)

Matches active.

Parameters:match (boolean) – true to match active, false to match inactive

compliance: mandatory – This method must be implemented.

active_terms
match_enabled(match)

Matches administratively enabled.

Parameters:match (boolean) – true to match administratively enabled, false otherwise

compliance: mandatory – This method must be implemented.

enabled_terms
match_disabled(match)

Matches administratively disabled.

Parameters:match (boolean) – true to match administratively disabled, false otherwise

compliance: 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 operational

compliance: 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 an OsidSession and defines methods to query for an OsidObject that includes setting a display name and a description. Once the desired parameters are set, the OsidQuery is given to the designated search method. The same OsidQuery 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 an OR expression. Any of these terms may also be negated through the match flag.

OsidObjectQuery { OsidQuery.matchDisplayName AND (OsidQuery.matchDescription OR OsidObjectQuery.matchDescription)}

OsidObjects allow for the definition of an additonal records and the OsidQuery parallels this mechanism. An interface type of an OsidObject record must also define the corresponding OsidQuery 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 search Type 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:

InvalidArgumentdisplay_name is not of string_match_type

Raise:

NullArgumentdisplay_name or string_match_type is null

Raise:

Unsupportedsupports_string_match_type(string_match_type) is false

compliance: mandatory – This method must be implemented.

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 name

compliance: 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:

InvalidArgumentdescription is not of string_match_type

Raise:

NullArgumentdescription or string_match_type is null

Raise:

Unsupportedsupports_string_match_type(string_match_type) is false

compliance: mandatory – This method must be implemented.

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 values

compliance: 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:

NullArgumentgenus_type is null

compliance: mandatory – This method must be implemented.

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 type

compliance: 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:

NullArgumentgenus_type is null

compliance: mandatory – This method must be implemented.

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 subject Id
  • match (boolean) – true for a positive match, false for a negative match
Raise:

NullArgumentsubject_id is null

compliance: mandatory – This method must be implemented.

subject_id_terms
supports_subject_query()

Tests if a SubjectQuery is available.

Returns:true if a subject query is available, false otherwise
Return 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:Unimplementedsupports_subject_query() is false

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 subjects

compliance: mandatory – This method must be implemented.

subject_terms
supports_subject_relevancy_query()

Tests if a RelevancyQuery is available to provide queries about the relationships to Subjects.

Returns:true if a relevancy entry query is available, false otherwise
Return 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:Unimplementedsupports_subject_relevancy_query() is false

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 state Id
  • match (boolean) – true for a positive match, false for a negative match
Raise:

NullArgumentstate_id is null

compliance: mandatory – This method must be implemented.

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 otherwise
Return 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:Unimplementedsupports_state_query() is false

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 given Process.

Parameters:match (boolean) – true to match any state, false to match objects with no states

compliance: 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 comment Id
  • match (boolean) – true for a positive match, false for a negative match
Raise:

NullArgumentcomment_id is null

compliance: mandatory – This method must be implemented.

comment_id_terms
supports_comment_query()

Tests if a CommentQuery is available.

Returns:true if a comment query is available, false otherwise
Return 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:Unimplementedsupports_comment_query() is false

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 given Book.

Parameters:match (boolean) – true to match any comment, false to match objects with no comments

compliance: 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 entry Id
  • match (boolean) – true for a positive match, false for a negative match
Raise:

NullArgumentjournal_entry_id is null

compliance: mandatory – This method must be implemented.

journal_entry_id_terms
supports_journal_entry_query()

Tests if a JournalEntry is available to provide queries of journaled OsidObjects.

Returns:true if a journal entry query is available, false otherwise
Return 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:Unimplementedsupports_journal_entry_query() is false

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 given Journal.

Parameters:match (boolean) – true to match any journal entry, false to match objects with no journal entries

compliance: 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 otherwise
Return 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:Unimplementedsupports_statistic_query() is false

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 statistics

compliance: 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 credit Id
  • match (boolean) – true for a positive match, false for a negative match
Raise:

NullArgumentcredit_id is null

compliance: mandatory – This method must be implemented.

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 otherwise
Return 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:Unimplementedsupports_credit_query() is false

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 credits

compliance: 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 relationship Id
  • match (boolean) – true for a positive match, false for a negative match
Raise:

NullArgumentrelationship_id is null

compliance: mandatory – This method must be implemented.

relationship_id_terms
supports_relationship_query()

Tests if a RelationshipQuery is available.

Returns:true if a relationship query is available, false otherwise
Return 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:Unimplementedsupports_relationship_query() is false

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 relationships

compliance: 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 peer Id
  • match (boolean) – true for a positive match, false for a negative match
Raise:

NullArgumentpeer_id is null

compliance: mandatory – This method must be implemented.

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 nested OR.

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:

NullArgumentrule_id is null

compliance: mandatory – This method must be implemented.

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 otherwise
Return 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 match
Returns:the state query
Return type:osid.process.StateQuery
Raise:Unimplementedsupports_end_reason_query() is false

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 state

compliance: 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 nested OR.

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:

NullArgumentrule_id is null

compliance: mandatory – This method must be implemented.

rule_id_terms
supports_rule_query()

Tests if a RuleQuery for the rule is available.

Returns:true if a rule query is available, false otherwise
Return 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 match
Returns:the rule query
Return type:osid.rules.RuleQuery
Raise:Unimplementedsupports_rule_query() is false

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 rules

compliance: 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 nested OR.

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:

NullArgumentschedule_id is null

compliance: mandatory – This method must be implemented.

schedule_id_terms
supports_schedule_query()

Tests if a ScheduleQuery for the rule is available.

Returns:true if a schedule query is available, false otherwise
Return 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 match
Returns:the schedule query
Return type:osid.calendaring.ScheduleQuery
Raise:Unimplementedsupports_schedule_query() is false

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 schedules

compliance: 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:

NullArgumentevent_id is null

compliance: mandatory – This method must be implemented.

event_id_terms
supports_event_query()

Tests if a EventQuery for the rule is available.

Returns:true if an event query is available, false otherwise
Return 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 match
Returns:the event query
Return type:osid.calendaring.EventQuery
Raise:Unimplementedsupports_event_query() is false

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 events

compliance: 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 event Id
  • match (boolean) – true for a positive match, false for a negative match
Raise:

NullArgumentcyclic_event_id is null

compliance: mandatory – This method must be implemented.

cyclic_event_id_terms
supports_cyclic_event_query()

Tests if a CyclicEventQuery is available.

Returns:true if a cyclic event query is available, false otherwise
Return 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:Unimplementedsupports_cyclic_event_query() is false

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 events

compliance: 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:

NullArgumentresource_id is null

compliance: mandatory – This method must be implemented.

demographic_id_terms
supports_demographic_query()

Tests if a ResourceQuery for the demographic is available.

Returns:true if a resource query is available, false otherwise
Return 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 match
Returns:the resource query
Return type:osid.resource.ResourceQuery
Raise:Unimplementedsupports_resource_query() is false

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 rules

compliance: 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 nested OR.

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 nested OR.

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 nested OR.

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 nested OR.

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:

InvalidArgumentstart is less than end

Raise:

NullArgumentstart or end is null

compliance: mandatory – This method must be implemented.

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 date

compliance: 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:

InvalidArgumentstart is less than end

Raise:

NullArgumentstart or end is null

compliance: mandatory – This method must be implemented.

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 date

compliance: 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 reports

compliance: 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 reports

compliance: 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 nested OR.