Queries¶
Osid Query¶
-
class
dlkit.osid.queries.OsidQuery¶ Bases:
dlkit.osid.markers.SuppliableThe
OsidQueryis used to assemble search queries.An
OsidQueryis available from anOsidQuerySessionand defines methods to match objects. Once the desired parameters are set, theOsidQueryis given to the designated search method. The sameOsidQueryreturned 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
OsidQuerymay be invoked multiple times. In the case of a match method, each invocation adds an element to anORexpression. Any of these terms may also be negated through thematchflag.OsidQuery { OsidQuery.matchDisplayName AND (OsidQuery.matchDescription OR OsidQuery.matchDescription)}OsidObjectsallow for the definition of an additonal records and theOsidQueryparallels this mechanism. An interface type of anOsidObjectrecord must also define the correspondingOsidQueryrecord 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
OsidQuerymay 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
-
supports_string_match_type(string_match_type)¶ Tests if the given string matching type is supported.
Parameters: string_match_type ( osid.type.Type) – aTypeindicating a string match typeReturns: trueif the given Type is supported,falseotherwiseReturn type: booleanRaise: NullArgument–string_match_typeisnull
-
match_keyword(keyword, string_match_type, match)¶ Adds a keyword to match.
Multiple keywords can be added to perform a boolean
ORamong 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) –truefor a positive match,falsefor a negative match
Raise: InvalidArgument–keywordis not ofstring_match_typeRaise: NullArgument–keywordorstring_match_typeisnullRaise: Unsupported–supports_string_match_type(string_match_type)isfalse- keyword (
-
keyword_terms¶
-
match_any(match)¶ Matches any object.
Parameters: match ( boolean) –trueto match any object,falseto match no objects
-
any_terms¶
-
Osid Identifiable Query¶
-
class
dlkit.osid.queries.OsidIdentifiableQuery¶ Bases:
dlkit.osid.queries.OsidQueryThe
OsidIdentiableQueryis used to assemble search queries forIdentifiableobjects.An
OsidIdentifiableQueryis available from anOsidQuerySessionand defines methods to match objects. Once the desired parameters are set, theOsidIdentifiableQueryis given to the designated search method. The sameOsidIdentifiableQueryreturned 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
Idto match.Multiple
Idscan be added to perform a booleanORamong them.Parameters: - id (
osid.id.Id) –Idto match - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–idisnull- id (
-
id_terms¶
-
Osid Extensible Query¶
-
class
dlkit.osid.queries.OsidExtensibleQuery¶ Bases:
dlkit.osid.queries.OsidQuery,dlkit.osid.markers.ExtensibleThe
OsidExtensibleQueryis used to assemble search queries forExtensibleobjects.An
OsidExtensibleQueryis available from anOsidQuerySessionand defines methods to match objects. Once the desired parameters are set, theOsidExtensibleQueryis given to the designated search method. The sameOsidExtensibleQueryreturned 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
Typefor querying objects having records implementing a given record type.Parameters: - record_type (
osid.type.Type) – a record type - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–record_typeisnull- record_type (
-
match_any_record(match)¶ Matches an object that has any record.
Parameters: match ( boolean) –trueto match any record,falseto match objects with no records
-
record_terms¶
-
Osid Browsable Query¶
-
class
dlkit.osid.queries.OsidBrowsableQuery¶ Bases:
dlkit.osid.queries.OsidQueryThe
OsidBrowsableQueryis used to assemble search queries forBrowsableobjects.An
OsidBrowsableQueryis available from anOsidQuerySessionand defines methods to match objects. Once the desired parameters are set, theOsidBrowsableQueryis given to the designated search method. The sameOsidBrowsableQueryreturned 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.OsidQueryThis is the query interface for searching temporal objects.
Each method specifies an
ANDterm 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) –trueto match any effective,falseto match ineffective
-
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) –trueif a positive match,falsefor a negative match
Raise: InvalidArgument–startis less thanendRaise: NullArgument–startorendisnull- start (
-
match_any_start_date(match)¶ Matches temporals with any start date set.
Parameters: match ( boolean) –trueto match any start date,falseto match no start date
-
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) –trueif a positive match,falsefor negative match
Raise: InvalidArgument–startis less thanendRaise: NullArgument–startorendisnull- start (
-
match_any_end_date(match)¶ Matches temporals with any end date set.
Parameters: match ( boolean) –trueto match any end date,falseto match no start date
-
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) –trueif a positive match,falsefor a negative match
Raise: InvalidArgument–fromis less thantoRaise: NullArgument–fromortoisnull- from (
-
date_terms¶
-
Osid Subjugateable Query¶
-
class
dlkit.osid.queries.OsidSubjugateableQuery¶ Bases:
dlkit.osid.queries.OsidQueryThe
OsidSubjugateableQueryis used to assemble search queries for dependent objects.
Osid Aggregateable Query¶
-
class
dlkit.osid.queries.OsidAggregateableQuery¶ Bases:
dlkit.osid.queries.OsidQueryThe
OsidAggregateableQueryis used to assemble search queries for assemblages.
Osid Containable Query¶
-
class
dlkit.osid.queries.OsidContainableQuery¶ Bases:
dlkit.osid.queries.OsidQueryThis is the query interface for searching containers.
Each method specifies an
ANDterm while multiple invocations of the same method produce a nestedOR.-
match_sequestered(match)¶ Match containables that are sequestered.
Parameters: match ( boolean) –trueto match any sequestered containables,falseto match non-sequestered containables
-
sequestered_terms¶
-
Osid Sourceable Query¶
-
class
dlkit.osid.queries.OsidSourceableQuery¶ Bases:
dlkit.osid.queries.OsidQueryThe
OsidSourceableQueryis used to assemble search queries for sourceables.-
match_provider_id(resource_id, match)¶ Match the
Idof the provider resource.Parameters: - resource_id (
osid.id.Id) –Idto match - match (
boolean) –trueif for a positive match,falsefor a negative match
Raise: NullArgument–resource_idisnull- resource_id (
-
provider_id_terms¶
-
supports_provider_query()¶ Tests if a
ResourceQueryfor the provider is available.Returns: trueif a resource query is available,falseotherwiseReturn type: boolean
-
get_provider_query(match)¶ Gets the query for the provider.
Each retrieval performs a boolean
OR.Parameters: match ( boolean) –trueif for a positive match,falsefor a negative matchReturns: the provider query Return type: osid.resource.ResourceQueryRaise: Unimplemented–supports_provider_query()isfalse
-
match_any_provider(match)¶ Match sourceables with a provider value.
Parameters: match ( boolean) –trueto match sourceables with any provider,falseto match sourceables with no providers
-
provider_terms¶
-
match_branding_id(asset_id, match)¶ Match the
Idof an asset used for branding.Parameters: - asset_id (
osid.id.Id) –Idto match - match (
boolean) –trueif for a positive match,falsefor a negative match
Raise: NullArgument–asset_idisnull- asset_id (
-
branding_id_terms¶
-
supports_branding_query()¶ Tests if an
AssetQueryfor the branding is available.Returns: trueif a asset query is available,falseotherwiseReturn type: boolean
-
get_branding_query(match)¶ Gets the query for an asset.
Each retrieval performs a boolean
OR.Parameters: match ( boolean) –trueif for a positive match,falsefor a negative matchReturns: the asset query Return type: osid.repository.AssetQueryRaise: Unimplemented–supports_branding_query()isfalse
-
match_any_branding(match)¶ Match sourceables with any branding.
Parameters: match ( boolean) –trueto match any asset,falseto match no assets
-
branding_terms¶
-
match_license(license_, string_match_type, match)¶ Adds a license to match.
Multiple license matches can be added to perform a boolean
ORamong them.Parameters: - license (
string) – a string to match - string_match_type (
osid.type.Type) – the string match type - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: InvalidArgument–licenseis not ofstring_match_typeRaise: NullArgument–licenseorstring_match_typeisnullRaise: Unsupported–supports_string_match_type(string_match_type)isfalse- license (
-
match_any_license(match)¶ Matches any object with a license.
Parameters: match ( boolean) –trueto match any license,falseto match objects with no license
-
license_terms¶
-
Osid Federateable Query¶
-
class
dlkit.osid.queries.OsidFederateableQuery¶ Bases:
dlkit.osid.queries.OsidQueryThe
OsidFederateableQueryis used to assemble search queries for federated objects.
Osid Operable Query¶
-
class
dlkit.osid.queries.OsidOperableQuery¶ Bases:
dlkit.osid.queries.OsidQueryThis is the query interface for searching operables.
Each method specifies an
ANDterm while multiple invocations of the same method produce a nestedOR.-
match_active(match)¶ Matches active.
Parameters: match ( boolean) –trueto match active,falseto match inactive
-
active_terms¶
-
match_enabled(match)¶ Matches administratively enabled.
Parameters: match ( boolean) –trueto match administratively enabled,falseotherwise
-
enabled_terms¶
-
match_disabled(match)¶ Matches administratively disabled.
Parameters: match ( boolean) –trueto match administratively disabled,falseotherwise
-
disabled_terms¶
-
match_operational(match)¶ Matches operational operables.
Parameters: match ( boolean) –trueto match operational,falseto match not operational
-
operational_terms¶
-
Osid Object Query¶
-
class
dlkit.osid.queries.OsidObjectQuery¶ Bases:
dlkit.osid.queries.OsidIdentifiableQuery,dlkit.osid.queries.OsidExtensibleQuery,dlkit.osid.queries.OsidBrowsableQueryThe
OsidObjectQueryis used to assemble search queries.An
OsidObjectQueryis available from anOsidSessionand defines methods to query for anOsidObjectthat includes setting a display name and a description. Once the desired parameters are set, theOsidQueryis given to the designated search method. The sameOsidQueryreturned 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
OsidObjectQuerymay be invoked multiple times. In the case of a match method, each invocation adds an element to anORexpression. Any of these terms may also be negated through thematchflag.OsidObjectQuery { OsidQuery.matchDisplayName AND (OsidQuery.matchDescription OR OsidObjectQuery.matchDescription)}OsidObjectsallow for the definition of an additonal records and theOsidQueryparallels this mechanism. An interface type of anOsidObjectrecord must also define the correspondingOsidQueryrecord 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
Typethat indicates the type of regular expression or wildcarding encoding. Compatibility with a strings searchTypecan 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.
ColorQueryis 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
ORamong them.Parameters: - display_name (
string) – display name to match - string_match_type (
osid.type.Type) – the string match type - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: InvalidArgument–display_nameis not ofstring_match_typeRaise: NullArgument–display_nameorstring_match_typeisnullRaise: Unsupported–supports_string_match_type(string_match_type)isfalse- display_name (
-
match_any_display_name(match)¶ Matches any object with a display name.
Parameters: match ( boolean) –trueto match any display name,falseto match objects with no display name
-
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
ORamong them.Parameters: - description (
string) – description to match - string_match_type (
osid.type.Type) – the string match type - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: InvalidArgument–descriptionis not ofstring_match_typeRaise: NullArgument–descriptionorstring_match_typeisnullRaise: Unsupported–supports_string_match_type(string_match_type)isfalse- description (
-
match_any_description(match)¶ Matches a description that has any value.
Parameters: match ( boolean) –trueto match any description,falseto match descriptions with no values
-
description_terms¶
-
match_genus_type(genus_type, match)¶ Sets a
Typefor 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) –truefor a positive match,falsefor a negative match
Raise: NullArgument–genus_typeisnull- genus_type (
-
match_any_genus_type(match)¶ Matches an object that has any genus type.
Parameters: match ( boolean) –trueto match any genus type,falseto match objects with no genus type
-
genus_type_terms¶
-
match_parent_genus_type(genus_type, match)¶ Sets a
Typefor 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) –truefor a positive match,falsefor a negative match
Raise: NullArgument–genus_typeisnull- 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) –truefor a positive match,falsefor a negative match
Raise: NullArgument–subject_idisnull- subject_id (
-
subject_id_terms¶
-
supports_subject_query()¶ Tests if a
SubjectQueryis available.Returns: trueif a subject query is available,falseotherwiseReturn type: boolean
-
subject_query¶ Gets the query for a subject.
Multiple retrievals produce a nested
ORterm.Returns: the subject query Return type: osid.ontology.SubjectQueryRaise: Unimplemented–supports_subject_query()isfalse
-
match_any_subject(match)¶ Matches an object that has any relationship to a
Subject.Parameters: match ( boolean) –trueto match any subject,falseto match objects with no subjects
-
subject_terms¶
-
supports_subject_relevancy_query()¶ Tests if a
RelevancyQueryis available to provide queries about the relationships toSubjects.Returns: trueif a relevancy entry query is available,falseotherwiseReturn type: boolean
-
subject_relevancy_query¶ Gets the query for a subject relevancy.
Multiple retrievals produce a nested
ORterm.Returns: the relevancy query Return type: osid.ontology.RelevancyQueryRaise: Unimplemented–supports_subject_relevancy_query()isfalse
-
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) –truefor a positive match,falsefor a negative match
Raise: NullArgument–state_idisnull- state_id (
-
state_id_terms¶
-
supports_state_query()¶ Tests if a
StateQueryis available to provide queries of processed objects.Returns: trueif a state query is available,falseotherwiseReturn type: boolean
-
state_query¶ Gets the query for a state.
Multiple retrievals produce a nested
ORterm.Returns: the journal entry query Return type: osid.process.StateQueryRaise: Unimplemented–supports_state_query()isfalse
-
match_any_state(match)¶ Matches an object that has any mapping to a
Statein the givenProcess.Parameters: match ( boolean) –trueto match any state,falseto match objects with no states
-
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) –truefor a positive match,falsefor a negative match
Raise: NullArgument–comment_idisnull- comment_id (
-
comment_id_terms¶
-
supports_comment_query()¶ Tests if a
CommentQueryis available.Returns: trueif a comment query is available,falseotherwiseReturn type: boolean
-
comment_query¶ Gets the query for a comment.
Multiple retrievals produce a nested
ORterm.Returns: the comment query Return type: osid.commenting.CommentQueryRaise: Unimplemented–supports_comment_query()isfalse
-
match_any_comment(match)¶ Matches an object that has any
Commentin the givenBook.Parameters: match ( boolean) –trueto match any comment,falseto match objects with no comments
-
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) –truefor a positive match,falsefor a negative match
Raise: NullArgument–journal_entry_idisnull- journal_entry_id (
-
journal_entry_id_terms¶
-
supports_journal_entry_query()¶ Tests if a
JournalEntryis available to provide queries of journaledOsidObjects.Returns: trueif a journal entry query is available,falseotherwiseReturn type: boolean
-
journal_entry_query¶ Gets the query for a journal entry.
Multiple retrievals produce a nested
ORterm.Returns: the journal entry query Return type: osid.journaling.JournalEntryQueryRaise: Unimplemented–supports_journal_entry_query()isfalse
-
match_any_journal_entry(match)¶ Matches an object that has any
JournalEntryin the givenJournal.Parameters: match ( boolean) –trueto match any journal entry,falseto match objects with no journal entries
-
journal_entry_terms¶
-
supports_statistic_query()¶ Tests if a
StatisticQueryis available to provide statistical queries.Returns: trueif a statistic query is available,falseotherwiseReturn type: boolean
-
statistic_query¶ Gets the query for a statistic.
Multiple retrievals produce a nested
ORterm.Returns: the statistic query Return type: osid.metering.StatisticQueryRaise: Unimplemented–supports_statistic_query()isfalse
-
match_any_statistic(match)¶ Matches an object that has any
Statistic.Parameters: match ( boolean) –trueto match any statistic,falseto match objects with no statistics
-
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) –truefor a positive match,falsefor a negative match
Raise: NullArgument–credit_idisnull- credit_id (
-
credit_id_terms¶
-
supports_credit_query()¶ Tests if a
CreditQueryis available to provide queries of related acknowledgements.Returns: trueif a credit query is available,falseotherwiseReturn type: boolean
-
credit_query¶ Gets the query for an ackowledgement credit.
Multiple retrievals produce a nested
ORterm.Returns: the credit query Return type: osid.acknowledgement.CreditQueryRaise: Unimplemented–supports_credit_query()isfalse
-
match_any_credit(match)¶ Matches an object that has any
Credit.Parameters: match ( boolean) –trueto match any credit,falseto match objects with no credits
-
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) –truefor a positive match,falsefor a negative match
Raise: NullArgument–relationship_idisnull- relationship_id (
-
relationship_id_terms¶
-
supports_relationship_query()¶ Tests if a
RelationshipQueryis available.Returns: trueif a relationship query is available,falseotherwiseReturn type: boolean
-
relationship_query¶ Gets the query for relationship.
Multiple retrievals produce a nested
ORterm.Returns: the relationship query Return type: osid.relationship.RelationshipQueryRaise: Unimplemented–supports_relationship_query()isfalse
-
match_any_relationship(match)¶ Matches an object that has any
Relationship.Parameters: match ( boolean) –trueto match any relationship,falseto match objects with no relationships
-
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) –truefor a positive match,falsefor a negative match
Raise: NullArgument–peer_idisnull- peer_id (
-
relationship_peer_id_terms¶
-
Osid Relationship Query¶
-
class
dlkit.osid.queries.OsidRelationshipQuery¶ Bases:
dlkit.osid.queries.OsidObjectQuery,dlkit.osid.queries.OsidTemporalQueryThis is the query interface for searching relationships.
Each method specifies an
ANDterm while multiple invocations of the same method produce a nestedOR.-
match_end_reason_id(state_id, match)¶ Match the
Idof the end reason state.Parameters: - state_id (
osid.id.Id) –Idto match - match (
boolean) –trueif for a positive match,falsefor a negative match
Raise: NullArgument–rule_idisnull- state_id (
-
end_reason_id_terms¶
-
supports_end_reason_query()¶ Tests if a
StateQueryfor the end reason is available.Returns: trueif a end reason query is available,falseotherwiseReturn type: boolean
-
get_end_reason_query(match)¶ Gets the query for the end reason state.
Each retrieval performs a boolean
OR.Parameters: match ( boolean) –trueif for a positive match,falsefor a negative matchReturns: the state query Return type: osid.process.StateQueryRaise: Unimplemented–supports_end_reason_query()isfalse
-
match_any_end_reason(match)¶ Match any end reason state.
Parameters: match ( boolean) –trueto match any state,falseto match no state
-
end_reason_terms¶
-
Osid Catalog Query¶
-
class
dlkit.osid.queries.OsidCatalogQuery¶ Bases:
dlkit.osid.queries.OsidObjectQuery,dlkit.osid.queries.OsidSourceableQuery,dlkit.osid.queries.OsidFederateableQueryThe
OsidCatalogQueryis used to assemble search queries for catalogs.
Osid Rule Query¶
-
class
dlkit.osid.queries.OsidRuleQuery¶ Bases:
dlkit.osid.queries.OsidObjectQuery,dlkit.osid.queries.OsidOperableQueryThis is the query interface for searching rules.
Each method specifies an
ANDterm while multiple invocations of the same method produce a nestedOR.-
match_rule_id(rule_id, match)¶ Match the
Idof the rule.Parameters: - rule_id (
osid.id.Id) –Idto match - match (
boolean) –trueif for a positive match,falsefor a negative match
Raise: NullArgument–rule_idisnull- rule_id (
-
rule_id_terms¶
-
supports_rule_query()¶ Tests if a
RuleQueryfor the rule is available.Returns: trueif a rule query is available,falseotherwiseReturn type: boolean
-
get_rule_query(match)¶ Gets the query for the rule.
Each retrieval performs a boolean
OR.Parameters: match ( boolean) –trueif for a positive match,falsefor a negative matchReturns: the rule query Return type: osid.rules.RuleQueryRaise: Unimplemented–supports_rule_query()isfalse
-
match_any_rule(match)¶ Match any associated rule.
Parameters: match ( boolean) –trueto match any rule,falseto match no rules
-
rule_terms¶
-
Osid Enabler Query¶
-
class
dlkit.osid.queries.OsidEnablerQuery¶ Bases:
dlkit.osid.queries.OsidRuleQuery,dlkit.osid.queries.OsidTemporalQueryThis is the query interface for searching enablers.
Each method specifies an
ANDterm while multiple invocations of the same method produce a nestedOR.-
match_schedule_id(schedule_id, match)¶ Match the
Idof an associated schedule.Parameters: - schedule_id (
osid.id.Id) –Idto match - match (
boolean) –trueif for a positive match,falsefor a negative match
Raise: NullArgument–schedule_idisnull- schedule_id (
-
schedule_id_terms¶
-
supports_schedule_query()¶ Tests if a
ScheduleQueryfor the rule is available.Returns: trueif a schedule query is available,falseotherwiseReturn type: boolean
-
get_schedule_query(match)¶ Gets the query for the schedule.
Each retrieval performs a boolean
OR.Parameters: match ( boolean) –trueif for a positive match,falsefor a negative matchReturns: the schedule query Return type: osid.calendaring.ScheduleQueryRaise: Unimplemented–supports_schedule_query()isfalse
-
match_any_schedule(match)¶ Match any associated schedule.
Parameters: match ( boolean) –trueto match any schedule,falseto match no schedules
-
schedule_terms¶
-
match_event_id(event_id, match)¶ Match the
Idof an associated event.Parameters: - event_id (
osid.id.Id) –Idto match - match (
boolean) –trueif for a positive match,falsefor a negative match
Raise: NullArgument–event_idisnull- event_id (
-
event_id_terms¶
-
supports_event_query()¶ Tests if a
EventQueryfor the rule is available.Returns: trueif an event query is available,falseotherwiseReturn type: boolean
-
get_event_query(match)¶ Gets the query for the event.
Each retrieval performs a boolean
OR.Parameters: match ( boolean) –trueif for a positive match,falsefor a negative matchReturns: the event query Return type: osid.calendaring.EventQueryRaise: Unimplemented–supports_event_query()isfalse
-
match_any_event(match)¶ Match any associated event.
Parameters: match ( boolean) –trueto match any event,falseto match no events
-
event_terms¶
-
match_cyclic_event_id(cyclic_event_id, match)¶ Sets the cyclic event
Idfor this query.Parameters: - cyclic_event_id (
osid.id.Id) – the cyclic eventId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–cyclic_event_idisnull- cyclic_event_id (
-
cyclic_event_id_terms¶
-
supports_cyclic_event_query()¶ Tests if a
CyclicEventQueryis available.Returns: trueif a cyclic event query is available,falseotherwiseReturn type: boolean
-
cyclic_event_query¶ Gets the query for a cyclic event.
Multiple retrievals produce a nested
ORterm.Returns: the cyclic event query Return type: osid.calendaring.cycle.CyclicEventQueryRaise: Unimplemented–supports_cyclic_event_query()isfalse
-
match_any_cyclic_event(match)¶ Matches any enabler with a cyclic event.
Parameters: match ( boolean) –trueto match any enablers with a cyclic event,falseto match enablers with no cyclic events
-
cyclic_event_terms¶
-
match_demographic_id(resource_id, match)¶ Match the
Idof the demographic resource.Parameters: - resource_id (
osid.id.Id) –Idto match - match (
boolean) –trueif for a positive match,falsefor a negative match
Raise: NullArgument–resource_idisnull- resource_id (
-
demographic_id_terms¶
-
supports_demographic_query()¶ Tests if a
ResourceQueryfor the demographic is available.Returns: trueif a resource query is available,falseotherwiseReturn type: boolean
-
get_demographic_query(match)¶ Gets the query for the resource.
Each retrieval performs a boolean
OR.Parameters: match ( boolean) –trueif for a positive match,falsefor a negative matchReturns: the resource query Return type: osid.resource.ResourceQueryRaise: Unimplemented–supports_resource_query()isfalse
-
match_any_demographic(match)¶ Match any associated resource.
Parameters: match ( boolean) –trueto match any demographic,falseto match no rules
-
demographic_terms¶
-
Osid Constrainer Query¶
-
class
dlkit.osid.queries.OsidConstrainerQuery¶ Bases:
dlkit.osid.queries.OsidRuleQueryThis is the query interface for searching constrainers.
Each method specifies an
ANDterm while multiple invocations of the same method produce a nestedOR.
Osid Processor Query¶
-
class
dlkit.osid.queries.OsidProcessorQuery¶ Bases:
dlkit.osid.queries.OsidRuleQueryThis is the query interface for searching processors.
Each method specifies an
ANDterm 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.OsidSourceableQueryThis is the query interface for searching governers.
Each method specifies an
ANDterm 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.OsidSubjugateableQueryThis is the query interface for searching reports.
Each method specifies an
ANDterm 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) –trueif a positive match,falsefor a negative match
Raise: InvalidArgument–startis less thanendRaise: NullArgument–startorendisnull- start (
-
match_any_start_date(match)¶ Matches reports with any start date set.
Parameters: match ( boolean) –trueto match any start date,falseto match no start date
-
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) –trueif a positive match,falsefor negative match
Raise: InvalidArgument–startis less thanendRaise: NullArgument–startorendisnull- start (
-
match_any_end_date(match)¶ Matches reports with any end date set.
Parameters: match ( boolean) –trueto match any end date,falseto match no start date
-
end_date_terms¶
-
match_interpolated(match)¶ Match reports that are interpolated.
Parameters: match ( boolean) –trueto match any interpolated reports,falseto match non-interpolated reports
-
interpolated_terms¶
-
match_extrapolated(match)¶ Match reports that are extrapolated.
Parameters: match ( boolean) –trueto match any extrapolated reports,falseto match non-extrapolated reports
-
extrapolated_terms¶
-
Osid Capsule Query¶
-
class
dlkit.osid.queries.OsidCapsuleQuery¶ Bases:
dlkit.osid.queries.OsidQueryThis is the query interface for searching capsulating interfaces.
Each method specifies an
ANDterm while multiple invocations of the same method produce a nestedOR.