Queries¶
Asset Query¶
-
class
dlkit.repository.queries.AssetQuery¶ Bases:
dlkit.osid.queries.OsidObjectQuery,dlkit.osid.queries.OsidAggregateableQuery,dlkit.osid.queries.OsidSourceableQueryThis is the query for searching assets.
Each method specifies an
ANDterm while multiple invocations of the same method produce a nestedOR. The query record is identified by theAsset Type.-
match_title(title, string_match_type, match)¶ Adds a title for this query.
Parameters: - title (
string) – title 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–titlenot ofstring_match_typeRaise: NullArgument–titleorstring_match_typeisnullRaise: Unsupported–supports_string_match_type(string_match_type)isfalse- title (
-
match_any_title(match)¶ Matches a title that has any value.
Parameters: match ( boolean) –trueto match assets with any title,falseto match assets with no title
-
title_terms¶
-
match_public_domain(public_domain)¶ Matches assets marked as public domain.
Parameters: public_domain ( boolean) – public domain flag
-
match_any_public_domain(match)¶ Matches assets with any public domain value.
Parameters: match ( boolean) –trueto match assets with any public domain value,falseto match assets with no public domain value
-
public_domain_terms¶
-
match_copyright(copyright_, string_match_type, match)¶ Adds a copyright for this query.
Parameters: - copyright (
string) – copyright 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–copyrightnot ofstring_match_typeRaise: NullArgument–copyrightorstring_match_typeisnullRaise: Unsupported–supports_string_match_type(string_match_type)isfalse- copyright (
-
match_any_copyright(match)¶ Matches assets with any copyright statement.
Parameters: match ( boolean) –trueto match assets with any copyright value,falseto match assets with no copyright value
-
copyright_terms¶
-
match_copyright_registration(registration, string_match_type, match)¶ Adds a copyright registration for this query.
Parameters: - registration (
string) – copyright registration 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–registrationnot ofstring_match_typeRaise: NullArgument–registrationorstring_match_typeisnullRaise: Unsupported–supports_string_match_type(string_match_type)isfalse- registration (
-
match_any_copyright_registration(match)¶ Matches assets with any copyright registration.
Parameters: match ( boolean) –trueto match assets with any copyright registration value,falseto match assets with no copyright registration value
-
copyright_registration_terms¶
-
match_distribute_verbatim(distributable)¶ Matches assets marked as distributable.
Parameters: distributable ( boolean) – distribute verbatim rights flag
-
distribute_verbatim_terms¶
-
match_distribute_alterations(alterable)¶ Matches assets that whose alterations can be distributed.
Parameters: alterable ( boolean) – distribute alterations rights flag
-
distribute_alterations_terms¶
-
match_distribute_compositions(composable)¶ Matches assets that can be distributed as part of other compositions.
Parameters: composable ( boolean) – distribute compositions rights flag
-
distribute_compositions_terms¶
-
match_source_id(source_id, match)¶ Sets the source
Idfor this query.Parameters: - source_id (
osid.id.Id) – the sourceId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–source_idisnull- source_id (
-
source_id_terms¶
-
supports_source_query()¶ Tests if a
ResourceQueryis available for the source.Returns: trueif a resource query is available,falseotherwiseReturn type: boolean
-
source_query¶ Gets the query for the source.
Multiple queries can be retrieved for a nested
ORterm.Returns: the source query Return type: osid.resource.ResourceQueryRaise: Unimplemented–supports_source_query()isfalse
-
match_any_source(match)¶ Matches assets with any source.
Parameters: match ( boolean) –trueto match assets with any source,falseto match assets with no sources
-
source_terms¶
-
match_created_date(start, end, match)¶ Match assets that are created between the specified time period.
Parameters: - start (
osid.calendaring.DateTime) – start time of the query - end (
osid.calendaring.DateTime) – end time of the query - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: InvalidArgument–endis les thanstartRaise: NullArgument–startorendisnull- start (
-
match_any_created_date(match)¶ Matches assets with any creation time.
Parameters: match ( boolean) –trueto match assets with any created time,falseto match assets with no cerated time
-
created_date_terms¶
-
match_published(published)¶ Marks assets that are marked as published.
Parameters: published ( boolean) – published flag
-
published_terms¶
-
match_published_date(start, end, match)¶ Match assets that are published between the specified time period.
Parameters: - start (
osid.calendaring.DateTime) – start time of the query - end (
osid.calendaring.DateTime) – end time of the query - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: InvalidArgument–endis les thanstartRaise: NullArgument–startorendisnull- start (
-
match_any_published_date(match)¶ Matches assets with any published time.
Parameters: match ( boolean) –trueto match assets with any published time,falseto match assets with no published time
-
published_date_terms¶
-
match_principal_credit_string(credit, string_match_type, match)¶ Adds a principal credit string for this query.
Parameters: - credit (
string) – credit 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–creditnot ofstring_match_typeRaise: NullArgument–creditorstring_match_typeisnullRaise: Unsupported–supports_string_match_type(string_match_type)isfalse- credit (
-
match_any_principal_credit_string(match)¶ Matches a principal credit string that has any value.
Parameters: match ( boolean) –trueto match assets with any principal credit string,falseto match assets with no principal credit string
-
principal_credit_string_terms¶
-
match_temporal_coverage(start, end, match)¶ Match assets that whose coverage falls between the specified time period inclusive.
Parameters: - start (
osid.calendaring.DateTime) – start time of the query - end (
osid.calendaring.DateTime) – end time of the query - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: InvalidArgument–endis less thanstartRaise: NullArgument–startorendisnull- start (
-
match_any_temporal_coverage(match)¶ Matches assets with any temporal coverage.
Parameters: match ( boolean) –trueto match assets with any temporal coverage,falseto match assets with no temporal coverage
-
temporal_coverage_terms¶
-
match_location_id(location_id, match)¶ Sets the location
Idfor this query of spatial coverage.Parameters: - location_id (
osid.id.Id) – the locationId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–location_idisnull- location_id (
-
location_id_terms¶
-
supports_location_query()¶ Tests if a
LocationQueryis available for the provider.Returns: trueif a location query is available,falseotherwiseReturn type: boolean
-
location_query¶ Gets the query for a location.
Multiple queries can be retrieved for a nested
ORterm.Returns: the location query Return type: osid.mapping.LocationQueryRaise: Unimplemented–supports_location_query()isfalse
-
match_any_location(match)¶ Matches assets with any provider.
Parameters: match ( boolean) –trueto match assets with any location,falseto match assets with no locations
-
location_terms¶
-
match_spatial_coverage(spatial_unit, match)¶ Matches assets that are contained within the given spatial unit.
Parameters: - spatial_unit (
osid.mapping.SpatialUnit) – the spatial unit - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–spatial_unitisnullRaise: Unsupported–spatial_unitis not suppoted- spatial_unit (
-
spatial_coverage_terms¶
-
match_spatial_coverage_overlap(spatial_unit, match)¶ Matches assets that overlap or touch the given spatial unit.
Parameters: - spatial_unit (
osid.mapping.SpatialUnit) – the spatial unit - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–spatial_unitisnullRaise: Unsupported–spatial_unitis not suppoted- spatial_unit (
-
match_any_spatial_coverage(match)¶ Matches assets with no spatial coverage.
Parameters: match ( boolean) –trueto match assets with any spatial coverage,falseto match assets with no spatial coverage
-
spatial_coverage_overlap_terms¶
-
match_asset_content_id(asset_content_id, match)¶ Sets the asset content
Idfor this query.Parameters: - asset_content_id (
osid.id.Id) – the asset contentId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–asset_content_idisnull- asset_content_id (
-
asset_content_id_terms¶
-
supports_asset_content_query()¶ Tests if an
AssetContentQueryis available.Returns: trueif an asset content query is available,falseotherwiseReturn type: boolean
-
asset_content_query¶ Gets the query for the asset content.
Multiple queries can be retrieved for a nested
ORterm.Returns: the asset contents query Return type: osid.repository.AssetContentQueryRaise: Unimplemented–supports_asset_content_query()isfalse
-
match_any_asset_content(match)¶ Matches assets with any content.
Parameters: match ( boolean) –trueto match assets with any content,falseto match assets with no content
-
asset_content_terms¶
-
match_composition_id(composition_id, match)¶ Sets the composition
Idfor this query to match assets that are a part of the composition.Parameters: - composition_id (
osid.id.Id) – the compositionId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–composition_idisnull- composition_id (
-
composition_id_terms¶
-
supports_composition_query()¶ Tests if a
CompositionQueryis available.Returns: trueif a composition query is available,falseotherwiseReturn type: boolean
-
composition_query¶ Gets the query for a composition.
Multiple queries can be retrieved for a nested
ORterm.Returns: the composition query Return type: osid.repository.CompositionQueryRaise: Unimplemented–supports_composition_query()isfalse
-
match_any_composition(match)¶ Matches assets with any composition mappings.
Parameters: match ( boolean) –trueto match assets with any composition,falseto match assets with no composition mappings
-
composition_terms¶
-
match_repository_id(repository_id, match)¶ Sets the repository
Idfor this query.Parameters: - repository_id (
osid.id.Id) – the repositoryId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–repository_idisnull- repository_id (
-
repository_id_terms¶
-
supports_repository_query()¶ Tests if a
RepositoryQueryis available.Returns: trueif a repository query is available,falseotherwiseReturn type: boolean
-
repository_query¶ Gets the query for a repository.
Multiple queries can be retrieved for a nested
ORterm.Returns: the repository query Return type: osid.repository.RepositoryQueryRaise: Unimplemented–supports_repository_query()isfalse
-
repository_terms¶
-
get_asset_query_record(asset_record_type)¶ Gets the asset query record corresponding to the given
AssetrecordType.Multiuple retrievals produce a nested
ORterm.Parameters: asset_record_type ( osid.type.Type) – an asset record typeReturns: the asset query record Return type: osid.repository.records.AssetQueryRecordRaise: NullArgument–asset_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(asset_record_type)isfalse
-
Asset Content Query¶
-
class
dlkit.repository.queries.AssetContentQuery¶ Bases:
dlkit.osid.queries.OsidObjectQuery,dlkit.osid.queries.OsidSubjugateableQueryThis is the query for searching asset contents.
Each method forms an
ANDterm while multiple invocations of the same method produce a nestedOR.-
match_accessibility_type(accessibility_type, match)¶ Sets the accessibility types for this query.
Supplying multiple types behaves like a boolean OR among the elements.
Parameters: - accessibility_type (
osid.type.Type) – an accessibilityType - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–accessibility_typeisnull- accessibility_type (
-
match_any_accessibility_type(match)¶ Matches asset content that has any accessibility type.
Parameters: match ( boolean) –trueto match content with any accessibility type,falseto match content with no accessibility type
-
accessibility_type_terms¶
-
match_data_length(low, high, match)¶ Matches content whose length of the data in bytes are inclusive of the given range.
Parameters: - low (
cardinal) – low range - high (
cardinal) – high range - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: InvalidArgument–lowis greater thanhigh- low (
-
match_any_data_length(match)¶ Matches content that has any data length.
Parameters: match ( boolean) –trueto match content with any data length,falseto match content with no data length
-
data_length_terms¶
-
match_data(data, match, partial)¶ Matches data in this content.
Parameters: - data (
byte[]) – list of matching strings - match (
boolean) –truefor a positive match,falsefor a negative match - partial (
boolean) –truefor a partial match,falsefor a complete match
Raise: NullArgument–dataisnull- data (
-
match_any_data(match)¶ Matches content that has any data.
Parameters: match ( boolean) –trueto match content with any data,falseto match content with no data
-
data_terms¶
-
match_url(url, string_match_type, match)¶ Sets the url for this query.
Supplying multiple strings behaves like a boolean
ORamong the elements each which must correspond to thestringMatchType.Parameters: - url (
string) – url 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–urlnot ofstring_match_typeRaise: NullArgument–urlorstring_match_typeisnullRaise: Unsupported–supports_string_match_type(url)isfalse- url (
-
match_any_url(match)¶ Matches content that has any url.
Parameters: match ( boolean) –trueto match content with any url,falseto match content with no url
-
url_terms¶
-
get_asset_content_query_record(asset_content_record_type)¶ Gets the asset content query record corresponding to the given
AssetContentrecordType.Multiple record retrievals produce a nested
ORterm.Parameters: asset_content_record_type ( osid.type.Type) – an asset content record typeReturns: the asset content query record Return type: osid.repository.records.AssetContentQueryRecordRaise: NullArgument–asset_content_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(asset_content_record_type)isfalse
-
Repository Query¶
-
class
dlkit.repository.queries.RepositoryQuery¶ Bases:
dlkit.osid.queries.OsidCatalogQueryThis is the query for searching repositories.
Each method specifies an
ANDterm while multiple invocations of the same method produce a nestedOR.-
match_asset_id(asset_id, match)¶ Sets the asset
Idfor this query.Parameters: - asset_id (
osid.id.Id) – an assetId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–asset_idisnull- asset_id (
-
asset_id_terms¶
-
supports_asset_query()¶ Tests if an
AssetQueryis available.Returns: trueif an asset query is available,falseotherwiseReturn type: boolean
-
asset_query¶ Gets the query for an asset.
Multiple retrievals produce a nested
ORterm.Returns: the asset query Return type: osid.repository.AssetQueryRaise: Unimplemented–supports_asset_query()isfalse
-
match_any_asset(match)¶ Matches repositories that has any asset mapping.
Parameters: match ( boolean) –trueto match repositories with any asset,falseto match repositories with no asset
-
asset_terms¶
-
match_composition_id(composition_id, match)¶ Sets the composition
Idfor this query.Parameters: - composition_id (
osid.id.Id) – a compositionId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–composition_idisnull- composition_id (
-
composition_id_terms¶
-
supports_composition_query()¶ Tests if a
CompositionQueryis available.Returns: trueif a composition query is available,falseotherwiseReturn type: boolean
-
composition_query¶ Gets the query for a composition.
Multiple retrievals produce a nested
ORterm.Returns: the composition query Return type: osid.repository.CompositionQueryRaise: Unimplemented–supports_composition_query()isfalse
-
match_any_composition(match)¶ Matches repositories that has any composition mapping.
Parameters: match ( boolean) –trueto match repositories with any composition,falseto match repositories with no composition
-
composition_terms¶
-
match_ancestor_repository_id(repository_id, match)¶ Sets the repository
Idfor this query to match repositories that have the specified repository as an ancestor.Parameters: - repository_id (
osid.id.Id) – a repositoryId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–repository_idisnull- repository_id (
-
ancestor_repository_id_terms¶
-
supports_ancestor_repository_query()¶ Tests if a
RepositoryQueryis available.Returns: trueif a repository query is available,falseotherwiseReturn type: boolean
-
ancestor_repository_query¶ Gets the query for a repository.
Multiple retrievals produce a nested
ORterm.Returns: the repository query Return type: osid.repository.RepositoryQueryRaise: Unimplemented–supports_ancestor_repository_query()isfalse
-
match_any_ancestor_repository(match)¶ Matches repositories with any ancestor.
Parameters: match ( boolean) –trueto match repositories with any ancestor,falseto match root repositories
-
ancestor_repository_terms¶
-
match_descendant_repository_id(repository_id, match)¶ Sets the repository
Idfor this query to match repositories that have the specified repository as a descendant.Parameters: - repository_id (
osid.id.Id) – a repositoryId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–repository_idisnull- repository_id (
-
descendant_repository_id_terms¶
-
supports_descendant_repository_query()¶ Tests if a
RepositoryQueryis available.Returns: trueif a repository query is available,falseotherwiseReturn type: boolean
-
descendant_repository_query¶ Gets the query for a repository.
Multiple retrievals produce a nested
ORterm.Returns: the repository query Return type: osid.repository.RepositoryQueryRaise: Unimplemented–supports_descendant_repository_query()isfalse
-
match_any_descendant_repository(match)¶ Matches repositories with any descendant.
Parameters: match ( boolean) –trueto match repositories with any descendant,falseto match leaf repositories
-
descendant_repository_terms¶
-
get_repository_query_record(repository_record_type)¶ Gets the repository query record corresponding to the given
RepositoryrecordType.Multiple record retrievals produce a nested
ORterm.Parameters: repository_record_type ( osid.type.Type) – a repository record typeReturns: the repository query record Return type: osid.repository.records.RepositoryQueryRecordRaise: NullArgument–repository_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(repository_record_type)isfalse
-