Repository

Repository

class dlkit.services.repository.Repository(provider_manager, catalog, runtime, proxy, **kwargs)

Bases: dlkit.osid.objects.OsidCatalog, dlkit.osid.sessions.OsidSession

A repository defines a collection of assets.

get_repository_record(repository_record_type)

Gets the record corresponding to the given Repository record Type.

This method is used to retrieve an object implementing the requested record. The repository_record_type may be the Type returned in get_record_types() or any of its parents in a Type hierarchy where has_record_type(repository_record_type) is true .

Parameters:repository_record_type (osid.type.Type) – a repository record type
Returns:the repository record
Return type:osid.repository.records.RepositoryRecord
Raise:NullArgumentrepository_record_type is null
Raise:OperationFailed – unable to complete request
Raise:Unsupportedhas_record_type(repository_record_type) is false

compliance: mandatory – This method must be implemented.

Asset Lookup Methods

Repository.repository_id

Gets the Repository Id associated with this session.

Returns:the Repository Id associated with this session
Return type:osid.id.Id

compliance: mandatory – This method must be implemented.

Repository.repository

Gets the Repository associated with this session.

Returns:the Repository associated with this session
Return type:osid.repository.Repository
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.can_lookup_assets()

Tests if this user can perform Asset lookups.

A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PermissionDenied. This is intended as a hint to an application that may opt not to offer lookup operations.

Returns:false if lookup methods are not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

Repository.use_comparative_asset_view()

The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.

This view is used when greater interoperability is desired at the expense of precision.

compliance: mandatory – This method is must be implemented.

Repository.use_plenary_asset_view()

A complete view of the Asset returns is desired.

Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.

compliance: mandatory – This method is must be implemented.

Repository.use_federated_repository_view()

Federates the view for methods in this session.

A federated view will include compositions in repositories which are children of this repository in the repository hierarchy.

compliance: mandatory – This method is must be implemented.

Repository.use_isolated_repository_view()

Isolates the view for methods in this session.

An isolated view restricts lookups to this repository only.

compliance: mandatory – This method is must be implemented.

Repository.get_asset(asset_id)

Gets the Asset specified by its Id.

In plenary mode, the exact Id is found or a NotFound results. Otherwise, the returned Asset may have a different Id than requested, such as the case where a duplicate Id was assigned to an Asset and retained for compatibility.

Parameters:asset_id (osid.id.Id) – the Id of the Asset to retrieve
Returns:the returned Asset
Return type:osid.repository.Asset
Raise:NotFound – no Asset found with the given Id
Raise:NullArgumentasset_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.get_assets_by_ids(asset_ids)

Gets an AssetList corresponding to the given IdList.

In plenary mode, the returned list contains all of the assets specified in the Id list, in the order of the list, including duplicates, or an error results if an Id in the supplied list is not found or inaccessible. Otherwise, inaccessible Assets may be omitted from the list and may present the elements in any order including returning a unique set.

Parameters:asset_ids (osid.id.IdList) – the list of Ids to retrieve
Returns:the returned Asset list
Return type:osid.repository.AssetList
Raise:NotFound – an Id was not found
Raise:NullArgumentasset_ids is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.get_assets_by_genus_type(asset_genus_type)

Gets an AssetList corresponding to the given asset genus Type which does not include assets of types derived from the specified Type.

In plenary mode, the returned list contains all known assets or an error results. Otherwise, the returned list may contain only those assets that are accessible through this session.

Parameters:asset_genus_type (osid.type.Type) – an asset genus type
Returns:the returned Asset list
Return type:osid.repository.AssetList
Raise:NullArgumentasset_genus_type is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.get_assets_by_parent_genus_type(asset_genus_type)

Gets an AssetList corresponding to the given asset genus Type and include any additional assets with genus types derived from the specified Type.

In plenary mode, the returned list contains all known assets or an error results. Otherwise, the returned list may contain only those assets that are accessible through this session.

Parameters:asset_genus_type (osid.type.Type) – an asset genus type
Returns:the returned Asset list
Return type:osid.repository.AssetList
Raise:NullArgumentasset_genus_type is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.get_assets_by_record_type(asset_record_type)

Gets an AssetList containing the given asset record Type.

In plenary mode, the returned list contains all known assets or an error results. Otherwise, the returned list may contain only those assets that are accessible through this session.

Parameters:asset_record_type (osid.type.Type) – an asset record type
Returns:the returned Asset list
Return type:osid.repository.AssetList
Raise:NullArgumentasset_record_type is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.get_assets_by_provider(resource_id)

Gets an AssetList from the given provider.

In plenary mode, the returned list contains all known assets or an error results. Otherwise, the returned list may contain only those assets that are accessible through this session.

Parameters:resource_id (osid.id.Id) – a resource Id
Returns:the returned Asset list
Return type:osid.repository.AssetList
Raise:NullArgumentresource_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.assets

Gets all Assets.

In plenary mode, the returned list contains all known assets or an error results. Otherwise, the returned list may contain only those assets that are accessible through this session.

Returns:a list of Assets
Return type:osid.repository.AssetList
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Asset Query Methods

Repository.repository_id

Gets the Repository Id associated with this session.

Returns:the Repository Id associated with this session
Return type:osid.id.Id

compliance: mandatory – This method must be implemented.

Repository.repository

Gets the Repository associated with this session.

Returns:the Repository associated with this session
Return type:osid.repository.Repository
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.can_search_assets()

Tests if this user can perform Asset searches.

A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PermissionDenied. This is intended as a hint to an application that may opt not to offer search operations to unauthorized users.

Returns:false if search methods are not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

Repository.use_federated_repository_view()

Federates the view for methods in this session.

A federated view will include compositions in repositories which are children of this repository in the repository hierarchy.

compliance: mandatory – This method is must be implemented.

Repository.use_isolated_repository_view()

Isolates the view for methods in this session.

An isolated view restricts lookups to this repository only.

compliance: mandatory – This method is must be implemented.

Repository.asset_query

Gets an asset query.

Returns:the asset query
Return type:osid.repository.AssetQuery

compliance: mandatory – This method must be implemented.

Repository.get_assets_by_query(asset_query)

Gets a list of Assets matching the given asset query.

Parameters:asset_query (osid.repository.AssetQuery) – the asset query
Returns:the returned AssetList
Return type:osid.repository.AssetList
Raise:NullArgumentasset_query is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure
Raise:Unsupported – the asset_query is not of this service

compliance: mandatory – This method must be implemented.

Asset Search Methods

Gets an asset search.

Returns:the asset search
Return type:osid.repository.AssetSearch

compliance: mandatory – This method must be implemented.

Repository.asset_search_order

Gets an asset search order.

The AssetSearchOrder is supplied to an AssetSearch to specify the ordering of results.

Returns:the asset search order
Return type:osid.repository.AssetSearchOrder

compliance: mandatory – This method must be implemented.

Gets the search results matching the given search query using the given search.

Parameters:
  • asset_query (osid.repository.AssetQuery) – the asset query
  • asset_search (osid.repository.AssetSearch) – the asset search
Returns:

the asset search results

Return type:

osid.repository.AssetSearchResults

Raise:

NullArgumentasset_query or asset_search is null

Raise:

OperationFailed – unable to complete request

Raise:

PermissionDenied – authorization failure

Raise:

Unsupportedasset_query or asset_search is not of this service

compliance: mandatory – This method must be implemented.

Repository.get_asset_query_from_inspector(asset_query_inspector)

Gets an asset query from an inspector.

The inspector is available from a AssetSearchResults.

Parameters:asset_query_inspector (osid.repository.AssetQueryInspector) – an asset query inspector
Returns:the asset query
Return type:osid.repository.AssetQuery
Raise:NullArgumentasset_query_inspector is null
Raise:Unsupportedasset_query_inspector is not of this service

compliance: mandatory – This method must be implemented.

Asset Admin Methods

Repository.repository_id

Gets the Repository Id associated with this session.

Returns:the Repository Id associated with this session
Return type:osid.id.Id

compliance: mandatory – This method must be implemented.

Repository.repository

Gets the Repository associated with this session.

Returns:the Repository associated with this session
Return type:osid.repository.Repository
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.can_create_assets()

Tests if this user can create Assets.

A return of true does not guarantee successful authorization. A return of false indicates that it is known creating an Asset will result in a PermissionDenied. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.

Returns:false if Asset creation is not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

Repository.can_create_asset_with_record_types(asset_record_types)

Tests if this user can create a single Asset using the desired record types.

While RepositoryManager.getAssetRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific Asset. Providing an empty array tests if an Asset can be created with no records.

Parameters:asset_record_types (osid.type.Type[]) – array of asset record types
Returns:true if Asset creation using the specified record Types is supported, false otherwise
Return type:boolean
Raise:NullArgumentasset_record_types is null

compliance: mandatory – This method must be implemented.

Repository.get_asset_form_for_create(asset_record_types)

Gets the asset form for creating new assets.

A new form should be requested for each create transaction.

Parameters:asset_record_types (osid.type.Type[]) – array of asset record types
Returns:the asset form
Return type:osid.repository.AssetForm
Raise:NullArgumentasset_record_types is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure
Raise:Unsupported – unable to get form for requested record types

compliance: mandatory – This method must be implemented.

Repository.create_asset(asset_form)

Creates a new Asset.

Parameters:asset_form (osid.repository.AssetForm) – the form for this Asset
Returns:the new Asset
Return type:osid.repository.Asset
Raise:IllegalStateasset_form already used in a create transaction
Raise:InvalidArgument – one or more of the form elements is invalid
Raise:NullArgumentasset_form is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure
Raise:Unsupportedasset_form did not originate from get_asset_form_for_create()

compliance: mandatory – This method must be implemented.

Repository.can_update_assets()

Tests if this user can update Assets.

A return of true does not guarantee successful authorization. A return of false indicates that it is known updating an Asset will result in a PermissionDenied. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.

Returns:false if Asset modification is not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

Repository.get_asset_form_for_update(asset_id)

Gets the asset form for updating an existing asset.

A new asset form should be requested for each update transaction.

Parameters:asset_id (osid.id.Id) – the Id of the Asset
Returns:the asset form
Return type:osid.repository.AssetForm
Raise:NotFoundasset_id is not found
Raise:NullArgumentasset_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.update_asset(asset_form)

Updates an existing asset.

Parameters:asset_form (osid.repository.AssetForm) – the form containing the elements to be updated
Raise:IllegalStateasset_form already used in anupdate transaction
Raise:InvalidArgument – the form contains an invalid value
Raise:NullArgumentasset_form is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure
Raise:Unsupportedasset_form did not originate from get_asset_form_for_update()

compliance: mandatory – This method must be implemented.

Repository.can_delete_assets()

Tests if this user can delete Assets.

A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting an Asset will result in a PermissionDenied. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.

Returns:false if Asset deletion is not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

Repository.delete_asset(asset_id)

Deletes an Asset.

Parameters:asset_id (osid.id.Id) – the Id of the Asset to remove
Raise:NotFoundasset_id not found
Raise:NullArgumentasset_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.can_manage_asset_aliases()

Tests if this user can manage Id aliases for Assets.

A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a PermissionDenied. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.

Returns:false if Asset aliasing is not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

Repository.alias_asset(asset_id, alias_id)

Adds an Id to an Asset for the purpose of creating compatibility.

The primary Id of the Asset is determined by the provider. The new Id performs as an alias to the primary Id. If the alias is a pointer to another asset, it is reassigned to the given asset Id.

Parameters:
  • asset_id (osid.id.Id) – the Id of an Asset
  • alias_id (osid.id.Id) – the alias Id
Raise:

AlreadyExistsalias_id is already assigned

Raise:

NotFoundasset_id not found

Raise:

NullArgumentasset_id or alias_id is null

Raise:

OperationFailed – unable to complete request

Raise:

PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.can_create_asset_content()

Tests if this user can create content for Assets.

A return of true does not guarantee successful authorization. A return of false indicates that it is known creating an AssetContent will result in a PermissionDenied. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.

Returns:false if Asset content creation is not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

Repository.can_create_asset_content_with_record_types(asset_content_record_types)

Tests if this user can create an AssetContent using the desired record types.

While RepositoryManager.getAssetContentRecordTypes() can be used to test which records are supported, this method tests which records are required for creating a specific AssetContent. Providing an empty array tests if an AssetContent can be created with no records.

Parameters:asset_content_record_types (osid.type.Type[]) – array of asset content record types
Returns:true if AssetContent creation using the specified Types is supported, false otherwise
Return type:boolean
Raise:NullArgumentasset_content_record_types is null

compliance: mandatory – This method must be implemented.

Repository.get_asset_content_form_for_create(asset_id, asset_content_record_types)

Gets an asset content form for creating new assets.

Parameters:
  • asset_id (osid.id.Id) – the Id of an Asset
  • asset_content_record_types (osid.type.Type[]) – array of asset content record types
Returns:

the asset content form

Return type:

osid.repository.AssetContentForm

Raise:

NotFoundasset_id is not found

Raise:

NullArgumentasset_id or asset_content_record_types is null

Raise:

OperationFailed – unable to complete request

Raise:

PermissionDenied – authorization failure

Raise:

Unsupported – unable to get form for requested record types

compliance: mandatory – This method must be implemented.

Repository.create_asset_content(asset_content_form)

Creates new AssetContent for a given asset.

Parameters:asset_content_form (osid.repository.AssetContentForm) – the form for this AssetContent
Returns:the new AssetContent
Return type:osid.repository.AssetContent
Raise:IllegalStateasset_content_form already used in a create transaction
Raise:InvalidArgument – one or more of the form elements is invalid
Raise:NullArgumentasset_content_form is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure
Raise:Unsupportedasset_content_form did not originate from get_asset_content_form_for_create()

compliance: mandatory – This method must be implemented.

Repository.can_update_asset_contents()

Tests if this user can update AssetContent.

A return of true does not guarantee successful authorization. A return of false indicates that it is known updating an AssetContent will result in a PermissionDenied. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.

Returns:false if AssetContent modification is not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

Repository.get_asset_content_form_for_update(asset_content_id)

Gets the asset content form for updating an existing asset content.

A new asset content form should be requested for each update transaction.

Parameters:asset_content_id (osid.id.Id) – the Id of the AssetContent
Returns:the asset content form
Return type:osid.repository.AssetContentForm
Raise:NotFoundasset_content_id is not found
Raise:NullArgumentasset_content_id is null
Raise:OperationFailed – unable to complete request

compliance: mandatory – This method must be implemented.

Repository.update_asset_content(asset_content_form)

Updates an existing asset content.

Parameters:asset_content_form (osid.repository.AssetContentForm) – the form containing the elements to be updated
Raise:IllegalStateasset_content_form already used in an update transaction
Raise:InvalidArgument – the form contains an invalid value
Raise:NullArgumentasset_form is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure
Raise:Unsupportedasset_content_form did not originate from get_asset_content_form_for_update()

compliance: mandatory – This method must be implemented.

Repository.can_delete_asset_contents()

Tests if this user can delete AssetsContents.

A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting an AssetContent will result in a PermissionDenied. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.

Returns:false if AssetContent deletion is not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

Repository.delete_asset_content(asset_content_id)

Deletes content from an Asset.

Parameters:asset_content_id (osid.id.Id) – the Id of the AssetContent
Raise:NotFoundasset_content_id is not found
Raise:NullArgumentasset_content_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Asset Notification Methods

Repository.repository_id

Gets the Repository Id associated with this session.

Returns:the Repository Id associated with this session
Return type:osid.id.Id

compliance: mandatory – This method must be implemented.

Repository.repository

Gets the Repository associated with this session.

Returns:the Repository associated with this session
Return type:osid.repository.Repository
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.can_register_for_asset_notifications()

Tests if this user can register for Asset notifications.

A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PermissionDenied. This is intended as a hint to an application that may opt not to offer notification operations.

Returns:false if notification methods are not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

Repository.use_federated_repository_view()

Federates the view for methods in this session.

A federated view will include compositions in repositories which are children of this repository in the repository hierarchy.

compliance: mandatory – This method is must be implemented.

Repository.use_isolated_repository_view()

Isolates the view for methods in this session.

An isolated view restricts lookups to this repository only.

compliance: mandatory – This method is must be implemented.

Repository.register_for_new_assets()

Register for notifications of new assets.

AssetReceiver.newAssets() is invoked when a new Asset appears in this repository.

Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.register_for_new_assets_by_genus_type(asset_genus_type)

Registers for notification of new assets of the given asset genus type.

AssetReceiver.newAssets() is invoked when an asset is appears in this repository.

Parameters:asset_genus_type (osid.type.Type) – the genus type of the Asset to monitor
Raise:NullArgumentasset_genus_type is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.register_for_changed_assets()

Registers for notification of updated assets.

AssetReceiver.changedAssets() is invoked when an asset in this repository is changed.

Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.register_for_changed_assets_by_genus_type(asset_genus_type)

Registers for notification of updated assets of the given asset genus type.

AssetReceiver.changedAssets() is invoked when an asset in this repository is changed.

Parameters:asset_genus_type (osid.type.Type) – the genus type of the Asset to monitor
Raise:NullArgumentasset_genus_type is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.register_for_changed_asset(asset_id)

Registers for notification of an updated asset.

AssetReceiver.changedAssets() is invoked when the specified asset in this repository is changed.

Parameters:asset_id (osid.id.Id) – the Id of the Asset to monitor
Raise:NullArgumentasset_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.register_for_deleted_assets()

Registers for notification of deleted assets.

AssetReceiver.deletedAssets() is invoked when an asset is deleted or removed from this repository.

Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.register_for_deleted_assets_by_genus_type(asset_genus_type)

Registers for notification of deleted assets of the given asset genus type.

AssetReceiver.deletedAssets() is invoked when an asset is deleted or removed from this repository.

Parameters:asset_genus_type (osid.type.Type) – the genus type of the Asset to monitor
Raise:NullArgumentasset_genus_type is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.register_for_deleted_asset(asset_id)

Registers for notification of a deleted asset.

AssetReceiver.deletedAssets() is invoked when the specified asset is deleted or removed from this repository.

Parameters:asset_id (osid.id.Id) – the Id of the Asset to monitor
Raise:NullArgumentasset_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.reliable_asset_notifications()

Reliable notifications are desired.

In reliable mode, notifications are to be acknowledged using acknowledge_item_notification() .

compliance: mandatory – This method is must be implemented.

Repository.unreliable_asset_notifications()

Unreliable notifications are desired.

In unreliable mode, notifications do not need to be acknowledged.

compliance: mandatory – This method is must be implemented.

Repository.acknowledge_asset_notification(notification_id)

Acknowledge an asset notification.

Parameters:notification_id (osid.id.Id) – the Id of the notification
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Asset Repository Methods

Repository.can_lookup_asset_repository_mappings()

Tests if this user can perform lookups of asset/repository mappings.

A return of true does not guarantee successful authorization. A return of false indicates that it is known lookup methods in this session will result in a PermissionDenied. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.

Returns:false if looking up mappings is not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

Repository.use_comparative_repository_view()

The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.

This view is used when greater interoperability is desired at the expense of precision.

compliance: mandatory – This method is must be implemented.

Repository.use_plenary_repository_view()

A complete view of the Asset and Repository returns is desired.

Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.

compliance: mandatory – This method is must be implemented.

Repository.get_asset_ids_by_repository(repository_id)

Gets the list of Asset Ids associated with a Repository.

Parameters:repository_id (osid.id.Id) – Id of the Repository
Returns:list of related asset Ids
Return type:osid.id.IdList
Raise:NotFoundrepository_id is not found
Raise:NullArgumentrepository_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.get_assets_by_repository(repository_id)

Gets the list of Assets associated with a Repository.

Parameters:repository_id (osid.id.Id) – Id of the Repository
Returns:list of related assets
Return type:osid.repository.AssetList
Raise:NotFoundrepository_id is not found
Raise:NullArgumentrepository_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.get_asset_ids_by_repositories(repository_ids)

Gets the list of Asset Ids corresponding to a list of Repository objects.

Parameters:repository_ids (osid.id.IdList) – list of repository Ids
Returns:list of asset Ids
Return type:osid.id.IdList
Raise:NullArgumentrepository_ids is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.get_assets_by_repositories(repository_ids)

Gets the list of Assets corresponding to a list of Repository objects.

Parameters:repository_ids (osid.id.IdList) – list of repository Ids
Returns:list of assets
Return type:osid.repository.AssetList
Raise:NullArgumentrepository_ids is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.get_repository_ids_by_asset(asset_id)

Gets the list of Repository Ids mapped to an Asset.

Parameters:asset_id (osid.id.Id) – Id of an Asset
Returns:list of repository Ids
Return type:osid.id.IdList
Raise:NotFoundasset_id is not found
Raise:NullArgumentasset_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.get_repositories_by_asset(asset_id)

Gets the list of Repository objects mapped to an Asset.

Parameters:asset_id (osid.id.Id) – Id of an Asset
Returns:list of repositories
Return type:osid.repository.RepositoryList
Raise:NotFoundasset_id is not found
Raise:NullArgumentasset_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Asset Repository Assignment Methods

Repository.can_assign_assets()

Tests if this user can alter asset/repository mappings.

A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a PermissionDenied. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.

Returns:false if mapping is not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

Repository.can_assign_assets_to_repository(repository_id)

Tests if this user can alter asset/repository mappings.

A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a PermissionDenied. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.

Parameters:repository_id (osid.id.Id) – the Id of the Repository
Returns:false if mapping is not authorized, true otherwise
Return type:boolean
Raise:NullArgumentrepository_id is null

compliance: mandatory – This method must be implemented.

Repository.get_assignable_repository_ids(repository_id)

Gets a list of repositories including and under the given repository node in which any composition can be assigned.

Parameters:repository_id (osid.id.Id) – the Id of the Repository
Returns:list of assignable repository Ids
Return type:osid.id.IdList
Raise:NullArgumentrepository_id is null
Raise:OperationFailed – unable to complete request

compliance: mandatory – This method must be implemented.

Repository.get_assignable_repository_ids_for_asset(repository_id, asset_id)

Gets a list of repositories including and under the given repository node in which a specific asset can be assigned.

Parameters:
  • repository_id (osid.id.Id) – the Id of the Repository
  • asset_id (osid.id.Id) – the Id of the Asset
Returns:

list of assignable repository Ids

Return type:

osid.id.IdList

Raise:

NullArgumentrepository_id or asset_id is null

Raise:

OperationFailed – unable to complete request

compliance: mandatory – This method must be implemented.

Repository.assign_asset_to_repository(asset_id, repository_id)

Adds an existing Asset to a Repository.

Parameters:
  • asset_id (osid.id.Id) – the Id of the Asset
  • repository_id (osid.id.Id) – the Id of the Repository
Raise:

AlreadyExistsasset_id already assigned to repository_id

Raise:

NotFoundasset_id or repository_id not found

Raise:

NullArgumentasset_id or repository_id is null

Raise:

OperationFailed – unable to complete request

Raise:

PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.unassign_asset_from_repository(asset_id, repository_id)

Removes an Asset from a Repository.

Parameters:
  • asset_id (osid.id.Id) – the Id of the Asset
  • repository_id (osid.id.Id) – the Id of the Repository
Raise:

NotFoundasset_id or repository_id not found or asset_id not assigned to repository_id

Raise:

NullArgumentasset_id or repository_id is null

Raise:

OperationFailed – unable to complete request

Raise:

PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Asset Composition Methods

Repository.repository_id

Gets the Repository Id associated with this session.

Returns:the Repository Id associated with this session
Return type:osid.id.Id

compliance: mandatory – This method must be implemented.

Repository.repository

Gets the Repository associated with this session.

Returns:the Repository associated with this session
Return type:osid.repository.Repository
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.can_access_asset_compositions()

Tests if this user can perform composition lookups.

A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PermissionDenied. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.

Returns:false if lookup methods are not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

Repository.use_comparative_asset_composition_view()

The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.

This view is used when greater interoperability is desired at the expense of precision.

compliance: mandatory – This method is must be implemented.

Repository.use_plenary_asset_composition_view()

A complete view of the returns is desired.

Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.

compliance: mandatory – This method is must be implemented.

Repository.use_federated_repository_view()

Federates the view for methods in this session.

A federated view will include compositions in repositories which are children of this repository in the repository hierarchy.

compliance: mandatory – This method is must be implemented.

Repository.use_isolated_repository_view()

Isolates the view for methods in this session.

An isolated view restricts lookups to this repository only.

compliance: mandatory – This method is must be implemented.

Repository.get_composition_assets(composition_id)

Gets the list of assets mapped to the given Composition.

Parameters:composition_id (osid.id.Id) – Id of the Composition
Returns:list of assets
Return type:osid.repository.AssetList
Raise:NotFoundcomposition_id not found
Raise:NullArgumentcomposition_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method is must be implemented.

Repository.get_compositions_by_asset(asset_id)

Gets a list of compositions including the given asset.

Parameters:asset_id (osid.id.Id) – Id of the Asset
Returns:the returned Composition list
Return type:osid.repository.CompositionList
Raise:NotFoundasset_id is not found
Raise:NullArgumentasset_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Asset Composition Design Methods

Repository.repository_id

Gets the Repository Id associated with this session.

Returns:the Repository Id associated with this session
Return type:osid.id.Id

compliance: mandatory – This method must be implemented.

Repository.repository

Gets the Repository associated with this session.

Returns:the Repository associated with this session
Return type:osid.repository.Repository
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.can_compose_assets()

Tests if this user can manage mapping of Assets to Compositions.

A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PermissionDenied. This is intended as an application hint that may opt not to offer composition operations.

Returns:false if asset composiion is not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

Repository.add_asset(asset_id, composition_id)

Appends an asset to a composition.

Parameters:
  • asset_id (osid.id.Id) – Id of the Asset
  • composition_id (osid.id.Id) – Id of the Composition
Raise:

AlreadyExistsasset_id already part composition_id

Raise:

NotFoundasset_id or composition_id not found

Raise:

NullArgumentasset_id or composition_id is null

Raise:

OperationFailed – unable to complete request

Raise:

PermissionDenied – authorization fauilure

compliance: mandatory – This method must be implemented.

Repository.move_asset_ahead(asset_id, composition_id, reference_id)

Reorders assets in a composition by moving the specified asset in front of a reference asset.

Parameters:
  • asset_id (osid.id.Id) – Id of the Asset
  • composition_id (osid.id.Id) – Id of the Composition
  • reference_id (osid.id.Id) – Id of the reference Asset
Raise:

NotFoundasset_id or reference_id not found in composition_id

Raise:

NullArgumentasset_id, reference_id or composition_id is null

Raise:

OperationFailed – unable to complete request

Raise:

PermissionDenied – authorization fauilure

compliance: mandatory – This method must be implemented.

Repository.move_asset_behind(asset_id, composition_id, reference_id)

Reorders assets in a composition by moving the specified asset behind of a reference asset.

Parameters:
  • asset_id (osid.id.Id) – Id of the Asset
  • composition_id (osid.id.Id) – Id of the Composition
  • reference_id (osid.id.Id) – Id of the reference Asset
Raise:

NotFoundasset_id or reference_id not found in composition_id

Raise:

NullArgumentasset_id, reference_id or composition_id is null

Raise:

OperationFailed – unable to complete request

Raise:

PermissionDenied – authorization fauilure

compliance: mandatory – This method must be implemented.

Repository.order_assets(asset_ids, composition_id)

Reorders a set of assets in a composition.

Parameters:
  • asset_ids (osid.id.Id[]) – Ids for a set of Assets
  • composition_id (osid.id.Id) – Id of the Composition
Raise:

NotFoundcomposition_id not found or, an asset_id not related to composition_id

Raise:

NullArgumentinstruction_ids or agenda_id is null

Raise:

OperationFailed – unable to complete request

Raise:

PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.remove_asset(asset_id, composition_id)

Removes an Asset from a Composition.

Parameters:
  • asset_id (osid.id.Id) – Id of the Asset
  • composition_id (osid.id.Id) – Id of the Composition
Raise:

NotFoundasset_id not found in composition_id

Raise:

NullArgumentasset_id or composition_id is null

Raise:

OperationFailed – unable to complete request

Raise:

PermissionDenied – authorization fauilure

compliance: mandatory – This method must be implemented.

Composition Lookup Methods

Repository.repository_id

Gets the Repository Id associated with this session.

Returns:the Repository Id associated with this session
Return type:osid.id.Id

compliance: mandatory – This method must be implemented.

Repository.repository

Gets the Repository associated with this session.

Returns:the Repository associated with this session
Return type:osid.repository.Repository
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.can_lookup_compositions()

Tests if this user can perform Composition lookups.

A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PermissionDenied. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.

Returns:false if lookup methods are not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

Repository.use_comparative_composition_view()

The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.

This view is used when greater interoperability is desired at the expense of precision.

compliance: mandatory – This method is must be implemented.

Repository.use_plenary_composition_view()

A complete view of the Composition returns is desired.

Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.

compliance: mandatory – This method is must be implemented.

Repository.use_federated_repository_view()

Federates the view for methods in this session.

A federated view will include compositions in repositories which are children of this repository in the repository hierarchy.

compliance: mandatory – This method is must be implemented.

Repository.use_isolated_repository_view()

Isolates the view for methods in this session.

An isolated view restricts lookups to this repository only.

compliance: mandatory – This method is must be implemented.

Repository.use_active_composition_view()

Only active compositions are returned by methods in this session.

compliance: mandatory – This method is must be implemented.

Repository.use_any_status_composition_view()

All active and inactive compositions are returned by methods in this session.

compliance: mandatory – This method is must be implemented.

Repository.use_sequestered_composition_view()

The methods in this session omit sequestered compositions.

compliance: mandatory – This method is must be implemented.

Repository.use_unsequestered_composition_view()

The methods in this session return all compositions, including sequestered compositions.

compliance: mandatory – This method is must be implemented.

Repository.get_composition(composition_id)

Gets the Composition specified by its Id.

Parameters:composition_id (osid.id.Id) – Id of the Composiiton
Returns:the composition
Return type:osid.repository.Composition
Raise:NotFoundcomposition_id not found
Raise:NullArgumentcomposition_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method is must be implemented.

Repository.get_compositions_by_ids(composition_ids)

Gets a CompositionList corresponding to the given IdList.

Parameters:composition_ids (osid.id.IdList) – the list of Ids to retrieve
Returns:the returned Composition list
Return type:osid.repository.CompositionList
Raise:NotFound – an Id was not found
Raise:NullArgumentcomposition_ids is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.get_compositions_by_genus_type(composition_genus_type)

Gets a CompositionList corresponding to the given composition genus Type which does not include compositions of types derived from the specified Type.

Parameters:composition_genus_type (osid.type.Type) – a composition genus type
Returns:the returned Composition list
Return type:osid.repository.CompositionList
Raise:NullArgumentcomposition_genus_type is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.get_compositions_by_parent_genus_type(composition_genus_type)

Gets a CompositionList corresponding to the given composition genus Type and include any additional compositions with genus types derived from the specified Type.

Parameters:composition_genus_type (osid.type.Type) – a composition genus type
Returns:the returned Composition list
Return type:osid.repository.CompositionList
Raise:NullArgumentcomposition_genus_type is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.get_compositions_by_record_type(composition_record_type)

Gets a CompositionList containing the given composition record Type.

Parameters:composition_record_type (osid.type.Type) – a composition record type
Returns:the returned Composition list
Return type:osid.repository.CompositionList
Raise:NullArgumentcomposition_record_type is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.get_compositions_by_provider(resource_id)

Gets a CompositionList from the given provider ````.

In plenary mode, the returned list contains all known compositions or an error results. Otherwise, the returned list may contain only those compositions that are accessible through this session.

In sequestered mode, no sequestered compositions are returned. In unsequestered mode, all compositions are returned.

Parameters:resource_id (osid.id.Id) – a resource Id
Returns:the returned Composition list
Return type:osid.repository.CompositionList
Raise:NullArgumentresource_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.compositions

Gets all Compositions.

Returns:a list of Compositions
Return type:osid.repository.CompositionList
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Composition Query Methods

Repository.repository_id

Gets the Repository Id associated with this session.

Returns:the Repository Id associated with this session
Return type:osid.id.Id

compliance: mandatory – This method must be implemented.

Repository.repository

Gets the Repository associated with this session.

Returns:the Repository associated with this session
Return type:osid.repository.Repository
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.can_search_compositions()

Tests if this user can perform Composition searches.

A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PermissionDenied. This is intended as a hint to an application that may opt not to offer search operations to unauthorized users.

Returns:false if search methods are not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

Repository.use_federated_repository_view()

Federates the view for methods in this session.

A federated view will include compositions in repositories which are children of this repository in the repository hierarchy.

compliance: mandatory – This method is must be implemented.

Repository.use_isolated_repository_view()

Isolates the view for methods in this session.

An isolated view restricts lookups to this repository only.

compliance: mandatory – This method is must be implemented.

Repository.use_sequestered_composition_view()

The methods in this session omit sequestered compositions.

compliance: mandatory – This method is must be implemented.

Repository.use_unsequestered_composition_view()

The methods in this session return all compositions, including sequestered compositions.

compliance: mandatory – This method is must be implemented.

Repository.composition_query

Gets a composition query.

Returns:the composition query
Return type:osid.repository.CompositionQuery

compliance: mandatory – This method must be implemented.

Repository.get_compositions_by_query(composition_query)

Gets a list of Compositions matching the given composition query.

Parameters:composition_query (osid.repository.CompositionQuery) – the composition query
Returns:the returned CompositionList
Return type:osid.repository.CompositionList
Raise:NullArgumentcomposition_query is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure
Raise:Unsupportedcomposition_query is not of this service

compliance: mandatory – This method must be implemented.

Composition Search Methods

Gets a composition search.

Returns:the composition search
Return type:osid.repository.CompositionSearch

compliance: mandatory – This method must be implemented.

Repository.composition_search_order

Gets a composition search order.

The CompositionSearchOrder is supplied to an CompositionSearch to specify the ordering of results.

Returns:the composition search order
Return type:osid.repository.CompositionSearchOrder

compliance: mandatory – This method must be implemented.

Gets the search results matching the given search query using the given search.

Parameters:
  • composition_query (osid.repository.CompositionQuery) – the composition query
  • composition_search (osid.repository.CompositionSearch) – the composition search
Returns:

the composition search results

Return type:

osid.repository.CompositionSearchResults

Raise:

NullArgumentcomposition_query or composition_search is null

Raise:

OperationFailed – unable to complete request

Raise:

PermissionDenied – authorization failure

Raise:

Unsupportedcomposition_query or composition_search is not of this service

compliance: mandatory – This method must be implemented.

Repository.get_composition_query_from_inspector(composition_query_inspector)

Gets a composition query from an inspector.

The inspector is available from a CompositionSearchResults.

Parameters:composition_query_inspector (osid.repository.CompositionQueryInspector) – a composition query inspector
Returns:the composition query
Return type:osid.repository.CompositionQuery
Raise:NullArgumentcomposition_query_inspector is null
Raise:Unsupportedcomposition_query_inspector is not of this service

compliance: mandatory – This method must be implemented.

Composition Admin Methods

Repository.repository_id

Gets the Repository Id associated with this session.

Returns:the Repository Id associated with this session
Return type:osid.id.Id

compliance: mandatory – This method must be implemented.

Repository.repository

Gets the Repository associated with this session.

Returns:the Repository associated with this session
Return type:osid.repository.Repository
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.can_create_compositions()

Tests if this user can create Compositions.

A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a Composition will result in a PermissionDenied. This is intended as a hint to an application that may not wish to offer create operations to unauthorized users.

Returns:false if Composition creation is not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

Repository.can_create_composition_with_record_types(composition_record_types)

Tests if this user can create a single Composition using the desired record types.

While RepositoryManager.getCompositionRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific Composition. Providing an empty array tests if a Composition can be created with no records.

Parameters:composition_record_types (osid.type.Type[]) – array of composition record types
Returns:true if Composition creation using the specified Types is supported, false otherwise
Return type:boolean
Raise:NullArgumentcomposition_record_types is null

compliance: mandatory – This method must be implemented.

Repository.get_composition_form_for_create(composition_record_types)

Gets the composition form for creating new compositions.

A new form should be requested for each create transaction.

Parameters:composition_record_types (osid.type.Type[]) – array of composition record types
Returns:the composition form
Return type:osid.repository.CompositionForm
Raise:NullArgumentcomposition_record_types is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure
Raise:Unsupported – unable to get form for requested record types

compliance: mandatory – This method must be implemented.

Repository.create_composition(composiiton_form)

Creates a new Composition.

Parameters:composiiton_form (osid.repository.CompositionForm) – the form for this Composition
Returns:the new Composition
Return type:osid.repository.Composition
Raise:IllegalStatecomposition_form already used in a create transaction
Raise:InvalidArgument – one or more of the form elements is invalid
Raise:NullArgumentcomposition_form is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure
Raise:Unsupportedcomposition_form did not originate from get_composition_form_for_create()

compliance: mandatory – This method must be implemented.

Repository.can_update_compositions()

Tests if this user can update Compositions.

A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a Composition will result in a PermissionDenied. This is intended as a hint to an application that may not wish to offer update operations to unauthorized users.

Returns:false if Composition modification is not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

Repository.get_composition_form_for_update(composition_id)

Gets the composition form for updating an existing composition.

A new composition form should be requested for each update transaction.

Parameters:composition_id (osid.id.Id) – the Id of the Composition
Returns:the composition form
Return type:osid.repository.CompositionForm
Raise:NotFoundcomposition_id is not found
Raise:NullArgumentcomposition_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.update_composition(composiiton_form)

Updates an existing composition.

Parameters:composiiton_form (osid.repository.CompositionForm) – the form containing the elements to be updated
Raise:IllegalStatecomposition_form already used in an update transaction
Raise:InvalidArgument – the form contains an invalid value
Raise:NullArgumentcomposition_form is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure
Raise:Unsupportedcomposition_form did not originate from get_composition_form_for_update()

compliance: mandatory – This method must be implemented.

Repository.can_delete_compositions()

Tests if this user can delete Compositions.

A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a Composition will result in a PermissionDenied. This is intended as a hint to an application that may not wish to offer delete operations to unauthorized users.

Returns:false if Composition deletion is not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

Repository.delete_composition(composition_id)

Deletes a Composition.

Parameters:composition_id (osid.id.Id) – the Id of the Composition to remove
Raise:NotFoundcomposition_id not found
Raise:NullArgumentcomposition_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.delete_composition_node(composition_id)

Deletes a Composition and all contained children.

Parameters:composition_id (osid.id.Id) – the Id of the Composition to remove
Raise:NotFoundcomposition_id not found
Raise:NullArgumentcomposition_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.add_composition_child(composition_id, child_composition_id)

Adds a composition to a parent composition.

Parameters:
  • composition_id (osid.id.Id) – the Id of a parent Composition
  • child_composition_id (osid.id.Id) – the Id of a child Composition
Raise:

AlreadyExistschild_composition_id is already a child of composition_id

Raise:

NotFoundcomposition_id or child_composition_id is not found

Raise:

NullArgumentcomposition_id or child_composition_id is null

Raise:

OperationFailed – unable to complete request

Raise:

PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.remove_composition_child(composition_id, child_composition_id)

Removes a composition from a parent composition.

Parameters:
  • composition_id (osid.id.Id) – the Id of a parent Composition
  • child_composition_id (osid.id.Id) – the Id of a child Composition
Raise:

NotFoundcomposition_id or child_composition_id is not found or not related

Raise:

NullArgumentcomposition_id or child_composition_id is null

Raise:

OperationFailed – unable to complete request

Raise:

PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.can_manage_composition_aliases()

Tests if this user can manage Id aliases for Compositions.

A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a PermissionDenied. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.

Returns:false if Composition aliasing is not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

Repository.alias_composition(composition_id, alias_id)

Adds an Id to a Composition for the purpose of creating compatibility.

The primary Id of the Composition is determined by the provider. The new Id is an alias to the primary Id. If the alias is a pointer to another composition, it is reassigned to the given composition Id.

Parameters:
  • composition_id (osid.id.Id) – the Id of a Composition
  • alias_id (osid.id.Id) – the alias Id
Raise:

AlreadyExistsalias_id is in use as a primary Id

Raise:

NotFoundcomposition_id not found

Raise:

NullArgumentcomposition_id or alias_id is null

Raise:

OperationFailed – unable to complete request

Raise:

PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Composition Repository Methods

Repository.use_comparative_composition_repository_view()

The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.

This view is used when greater interoperability is desired at the expense of precision.

compliance: mandatory – This method is must be implemented.

Repository.use_plenary_composition_repository_view()

A complete view of the Composition and Repository returns is desired.

Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.

compliance: mandatory – This method is must be implemented.

Repository.can_lookup_composition_repository_mappings()

Tests if this user can perform lookups of composition/repository mappings.

A return of true does not guarantee successful authorization. A return of false indicates that it is known lookup methods in this session will result in a PermissionDenied. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.

Returns:false if looking up mappings is not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

Repository.get_composition_ids_by_repository(repository_id)

Gets the list of Composition Ids associated with a Repository.

Parameters:repository_id (osid.id.Id) – Id of the Repository
Returns:list of related composition Ids
Return type:osid.id.IdList
Raise:NotFoundrepository_id is not found
Raise:NullArgumentrepository_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.get_compositions_by_repository(repository_id)

Gets the list of Compositions associated with a Repository.

Parameters:repository_id (osid.id.Id) – Id of the Repository
Returns:list of related compositions
Return type:osid.repository.CompositionList
Raise:NotFoundrepository_id is not found
Raise:NullArgumentrepository_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.get_composition_ids_by_repositories(repository_ids)

Gets the list of Composition Ids corresponding to a list of Repository objects.

Parameters:repository_ids (osid.id.IdList) – list of repository Ids
Returns:list of composition Ids
Return type:osid.id.IdList
Raise:NullArgumentrepository_ids is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.get_compoitions_by_repositories(repository_ids)

Gets the list of Compositions corresponding to a list of Repository objects.

Parameters:repository_ids (osid.id.IdList) – list of repository Ids
Returns:list of Compositions
Return type:osid.repository.CompositionList
Raise:NullArgumentrepository_ids is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.get_repository_ids_by_composition(composition_id)

Gets the Repository Ids mapped to a Composition.

Parameters:composition_id (osid.id.Id) – Id of a Composition
Returns:list of repository Ids
Return type:osid.id.IdList
Raise:NotFoundcomposition_id is not found
Raise:NullArgumentcomposition_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.get_repositories_by_composition(composition_id)

Gets the Repository objects mapped to a Composition.

Parameters:composition_id (osid.id.Id) – Id of a Composition
Returns:list of repositories
Return type:osid.repository.RepositoryList
Raise:NotFoundcomposition_id is not found
Raise:NullArgumentcomposition_id is null
Raise:OperationFailed – unable to complete request
Raise:PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Composition Repository Assignment Methods

Repository.can_assign_compositions()

Tests if this user can alter composition/repository mappings.

A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a PermissionDenied. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.

Returns:false if mapping is not authorized, true otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

Repository.can_assign_compositions_to_repository(repository_id)

Tests if this user can alter composition/repository mappings.

A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a PermissionDenied. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.

Parameters:repository_id (osid.id.Id) – the Id of the Repository
Returns:false if mapping is not authorized, true otherwise
Return type:boolean
Raise:NullArgumentrepository_id is null

compliance: mandatory – This method must be implemented.

Repository.get_assignable_repository_ids(repository_id)

Gets a list of repositories including and under the given repository node in which any composition can be assigned.

Parameters:repository_id (osid.id.Id) – the Id of the Repository
Returns:list of assignable repository Ids
Return type:osid.id.IdList
Raise:NullArgumentrepository_id is null
Raise:OperationFailed – unable to complete request

compliance: mandatory – This method must be implemented.

Repository.get_assignable_repository_ids_for_composition(repository_id, composition_id)

Gets a list of repositories including and under the given repository node in which a specific composition can be assigned.

Parameters:
  • repository_id (osid.id.Id) – the Id of the Repository
  • composition_id (osid.id.Id) – the Id of the Composition
Returns:

list of assignable repository Ids

Return type:

osid.id.IdList

Raise:

NullArgumentrepository_id or composition_id is null

Raise:

OperationFailed – unable to complete request

compliance: mandatory – This method must be implemented.

Repository.assign_composition_to_repository(composition_id, repository_id)

Adds an existing Composition to a Repository.

Parameters:
  • composition_id (osid.id.Id) – the Id of the Composition
  • repository_id (osid.id.Id) – the Id of the Repository
Raise:

AlreadyExistscomposition_id already assigned to repository_id

Raise:

NotFoundcomposition_id or repository_id not found

Raise:

NullArgumentcomposition_id or repository_id is null

Raise:

OperationFailed – unable to complete request

Raise:

PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.

Repository.unassign_composition_from_repository(composition_id, repository_id)

Removes Composition from a Repository.

Parameters:
  • composition_id (osid.id.Id) – the Id of the Composition
  • repository_id (osid.id.Id) – the Id of the Repository
Raise:

NotFoundcomposition_id or repository_id not found or composition_id not assigned to repository_id

Raise:

NullArgumentcomposition_id or repository_id is null

Raise:

OperationFailed – unable to complete request

Raise:

PermissionDenied – authorization failure

compliance: mandatory – This method must be implemented.