Repository Open Service Interface Definitions repository version 3.0.0
The Repository OSID provides the service of finding and managing digital assets.
Assets
An Asset represents a unit of content, whether it be an image, a
video, an application document or some text. The Asset defines a core
set of definitions applicable to digital content, such as copyright and
publisher, and allows for a type specification to be appended as with
other OsidObjects.
Asset content, such as a document, is defined such that there may be multiple formats contained with the same asset. A document may be accessible in both PDF and MS Word, but is the same document, for example. An image may have both a large size and a thumbnail version. Generally, an asset contains more than one version of content when it is left to the application to decide which is most appropriate.
The Asset Type may define methods in common throughout the
content variations. An example asset is one whose content Types are
“Quicktime” and “MPEG”, but the Asset Type is “movie” and
defines methods that describe the move aside from the formats. This
“double” Type hierarchy stemming from the asset requires more care in
defining interfaces.
Assets also have “credits” which define the authors, editors,
creators, performers, producers or any other “role”, identified with a
role Type, with the production of the asset. These are managed
externally to the asset through another OsidSession.
Through additional optional OsidSessions, the Asset can be
“extended” to offer temporal information. An asset may pertain to a
date, a period of time, or a series of dates and periods. This mechanism
is to offer the ability to search for assets pertaining to a desired
date range without requiring understanding of a Type.
Similarly, the Asset can also map to spatial information. A
photograph may be “geotagged” with the GPS coordinates where it was
taken, a conical shape in stellar coordinates could be described for an
astronimocal image, or there may be a desire to may a historical book to
the spatial coordinates of Boston and Philadelphia. Unlike temporal
mappings, the definition of the spatial coordinate is left to a spatial
Type to define. The Repository OSID simply manages spatial mappings to
the Asset.
Asset Tagging
Assets may also relate to Ontology OSID Subjects. The
Subject provides the ability to normalize information related to
subject matter across the Assets to simplify management and provide
a more robust searching mechanism. For example, with a photograph of the
Empire State Building, one may wish to describe that it was designed by
Shreve, Lamb and Harmon and completed in 1931. The information about the
building itself can be described using a Subject and related to the
photograph, and any other photograph that captures the building. The
Asset Type for the photograph may simply be “photograph” and
doesn’t attempt to describe a building, while the AssetContent
Type is “image/jpeg”.
An application performing a search for Empire State Building can be
execute the search over the Subjects, and once the user has narrowed
the subject area, then the related Assets can be retrieved, and from
there negotiate the content.
A provider wishing to construct a simple inventory database of buildings
in New York may decide to do so using the Resource OSID. The
Resource Type may describe the construction dates, height,
location, style and architects of buildings. The Type may also
include a means of getting a reference image using the Asset
interface. Since there is no explicit relationship between Subject
and Resource, the Resource can be adapted to the Subject
interface (mapping a building_resource_type to a
building_subject_type ) to use the same data for Subject to
Asset mappings and searching.
Asset Compositions
Asset compositions can be created using the Composition interface. A
Composition is a group of Assets and compositions may be
structured into a hierarchy for the purpose of “building” larger
content. A content management system may make use of this interface to
construct a web page. The Composition hierarchy may map into an
XHTML structure and each Asset represent an image or a link in the
document. However, the produced web page at a given URL may be
represented by another single Asset that whose content has both the
URL and the XHTML stream.
Another example is an IMS Common Cartridge. The Composition may be
used to produce the zip file cartridge, but consumers may access the zip
file via an Asset .
Repository Cataloging
Finally, Assets and Compositions may be categorized into
Repository objects. A Repository is a catalog-like interface to
help organize assets and subject matter. Repositories may be organized
into hierarchies for organization or federation purposes.
This number of service aspects to this Repository OSID produce a large
number of definitions. It is recommended to use the
RepositoryManager definition to select a single OsidSession of
interest, and work that definition through its dependencies before
tackling another aspect.
Sub Packages
The Repository OSID includes a rules subpackage for managing dynamic compositions.
Service Managers¶
Repository Profile¶
-
class
dlkit.services.repository.RepositoryProfile¶ Bases:
dlkit.osid.managers.OsidProfileThe repository profile describes interoperability among repository services.
-
supports_asset_lookup()¶ Tests if asset lookup is supported.
Returns: trueif asset lookup is supported,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
supports_asset_query()¶ Tests if asset query is supported.
Returns: trueif asset query is supported,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
supports_asset_search()¶ Tests if asset search is supported.
Returns: trueif asset search is supported,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
supports_asset_admin()¶ Tests if asset administration is supported.
Returns: trueif asset administration is supported,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
supports_asset_notification()¶ Tests if asset notification is supported.
A repository may send messages when assets are created, modified, or deleted.
Returns: trueif asset notification is supported,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
supports_asset_repository()¶ Tests if retrieving mappings of assets and repositories is supported.
Returns: trueif asset repository mapping retrieval is supported,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
supports_asset_repository_assignment()¶ Tests if managing mappings of assets and repositories is supported.
Returns: trueif asset repository assignment is supported,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
supports_asset_composition()¶ Tests if assets are included in compositions.
Returns: trueif asset composition supported,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
supports_asset_composition_design()¶ Tests if mapping assets to compositions is supported.
Returns: trueif designing asset compositions is supported,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
supports_composition_lookup()¶ Tests if composition lookup is supported.
Returns: trueif composition lookup is supported,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
supports_composition_query()¶ Tests if composition query is supported.
Returns: trueif composition query is supported,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
supports_composition_search()¶ Tests if composition search is supported.
Returns: trueif composition search is supported,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
supports_composition_admin()¶ Tests if composition administration is supported.
Returns: trueif composition administration is supported,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
supports_composition_repository()¶ Tests if retrieval of composition to repository mappings is supported.
Returns: trueif composition to repository mapping is supported,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
supports_composition_repository_assignment()¶ Tests if assigning composition to repository mappings is supported.
Returns: trueif composition to repository assignment is supported,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
supports_repository_lookup()¶ Tests if repository lookup is supported.
Returns: trueif repository lookup is supported,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
supports_repository_query()¶ Tests if repository query is supported.
Returns: trueif repository query is supported,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
supports_repository_admin()¶ Tests if repository administration is supported.
Returns: trueif repository administration is supported,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
supports_repository_hierarchy()¶ Tests if a repository hierarchy traversal is supported.
Returns: trueif a repository hierarchy traversal is supported,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
supports_repository_hierarchy_design()¶ Tests if a repository hierarchy design is supported.
Returns: trueif a repository hierarchy design is supported,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
asset_record_types¶ Gets all the asset record types supported.
Returns: the list of supported asset record types Return type: osid.type.TypeListcompliance: mandatory – This method must be implemented.
-
asset_search_record_types¶ Gets all the asset search record types supported.
Returns: the list of supported asset search record types Return type: osid.type.TypeListcompliance: mandatory – This method must be implemented.
-
asset_content_record_types¶ Gets all the asset content record types supported.
Returns: the list of supported asset content record types Return type: osid.type.TypeListcompliance: mandatory – This method must be implemented.
-
composition_record_types¶ Gets all the composition record types supported.
Returns: the list of supported composition record types Return type: osid.type.TypeListcompliance: mandatory – This method must be implemented.
-
composition_search_record_types¶ Gets all the composition search record types supported.
Returns: the list of supported composition search record types Return type: osid.type.TypeListcompliance: mandatory – This method must be implemented.
-
repository_record_types¶ Gets all the repository record types supported.
Returns: the list of supported repository record types Return type: osid.type.TypeListcompliance: mandatory – This method must be implemented.
-
repository_search_record_types¶ Gets all the repository search record types supported.
Returns: the list of supported repository search record types Return type: osid.type.TypeListcompliance: mandatory – This method must be implemented.
-
spatial_unit_record_types¶ Gets all the spatial unit record types supported.
Returns: the list of supported spatial unit record types Return type: osid.type.TypeListcompliance: mandatory – This method must be implemented.
-
coordinate_types¶ Gets all the coordinate types supported.
Returns: the list of supported coordinate types Return type: osid.type.TypeListcompliance: mandatory – This method must be implemented.
-
Repository Manager¶
-
class
dlkit.services.repository.RepositoryManager(proxy=None)¶ Bases:
dlkit.osid.managers.OsidManager,dlkit.osid.sessions.OsidSession,dlkit.services.repository.RepositoryProfileThe repository manager provides access to asset lookup and creation session and provides interoperability tests for various aspects of this service.
The sessions included in this manager are:
AssetLookupSession:a session to retrieve assetsAssetQuerySession:a session to query assetsAssetSearchSession:a session to search for assetsAssetAdminSession:a session to create and delete assetsAssetNotificationSession:a session to receive notifications pertaining to asset changesAssetRepositorySession:a session to look up asset to repository mappingsAssetRepositoryAssignmentSession:a session to manage asset to repository mappingsAssetSmartRepositorySession:a session to manage dynamic repositories of assetsAssetTemporalSession:a session to access the temporal coverage of an assetAssetTemporalAssignmentSession:a session to manage the temporal coverage of an assetAssetSpatialSession:a session to access the spatial coverage of an assetAssetSpatialAssignmentSession:a session to manage the spatial coverage of an assetAssetCompositionSession:a session to look up asset composition mappingsAssetCompositionDesignSession:a session to map assets to compositionsCompositionLookupSession: asession to retrieve compositionsCompositionQuerySession:a session to query compositionsCompositionSearchSession:a session to search for compositionsCompositionAdminSession:a session to create, update and delete compositionsCompositionNotificationSession:a session to receive notifications pertaining to changes in compositionsCompositionRepositorySession:a session to retrieve composition repository mappingsCompositionRepositoryAssignmentSession:a session to manage composition repository mappingsCompositionSmartRepositorySession:a session to manage dynamic repositories of compositionsRepositoryLookupSession: asession to retrieve repositoriesRepositoryQuerySession:a session to query repositoriesRepositorySearchSession:a session to search for repositoriesRepositoryAdminSession:a session to create, update and delete repositoriesRepositoryNotificationSession:a session to receive notifications pertaining to changes in repositoriesRepositoryHierarchySession:a session to traverse repository hierarchiesRepositoryHierarchyDesignSession:a session to manage repository hierarchies
-
repository_batch_manager¶ Gets a
RepositoryBatchManager.Returns: a RepostoryBatchManagerReturn type: osid.repository.batch.RepositoryBatchManagerRaise: OperationFailed– unable to complete requestRaise: Unimplemented–supports_repository_batch()isfalsecompliance: optional – This method must be implemented if ``supports_repository_batch()`` is ``true``.
-
repository_rules_manager¶ Gets a
RepositoryRulesManager.Returns: a RepostoryRulesManagerReturn type: osid.repository.rules.RepositoryRulesManagerRaise: OperationFailed– unable to complete requestRaise: Unimplemented–supports_repository_rules()isfalsecompliance: optional – This method must be implemented if ``supports_repository_rules()`` is ``true``.
Repository Lookup Methods¶
RepositoryManager.can_lookup_repositories()¶Tests if this user can perform
Repositorylookups.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: falseif lookup methods are not authorized,trueotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
RepositoryManager.use_comparative_repository_view()¶The returns from the repository 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.
RepositoryManager.use_plenary_repository_view()¶A complete view of the
Repositoryreturns 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.
RepositoryManager.get_repository(repository_id)¶Gets the
Repositoryspecified by itsId.In plenary mode, the exact
Idis found or aNotFoundresults. Otherwise, the returnedRepositorymay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to aRepositoryand retained for compatibility.
Parameters: repository_id ( osid.id.Id) –Idof theRepositoryReturns: the repository Return type: osid.repository.RepositoryRaise: NotFound–repository_idnot foundRaise: NullArgument–repository_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method is must be implemented.
RepositoryManager.get_repositories_by_ids(repository_ids)¶Gets a
RepositoryListcorresponding to the givenIdList.In plenary mode, the returned list contains all of the repositories specified in the
Idlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleRepositoriesmay be omitted from the list and may present the elements in any order including returning a unique set.
Parameters: repository_ids ( osid.id.IdList) – the list ofIdsto retrieveReturns: the returned Repository listReturn type: osid.repository.RepositoryListRaise: NotFound– anIdwas not foundRaise: NullArgument–repository_idsisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
RepositoryManager.get_repositories_by_genus_type(repository_genus_type)¶Gets a
RepositoryListcorresponding to the given repository genusTypewhich does not include repositories of types derived from the specifiedType.In plenary mode, the returned list contains all known repositories or an error results. Otherwise, the returned list may contain only those repositories that are accessible through this session.
Parameters: repository_genus_type ( osid.type.Type) – a repository genus typeReturns: the returned Repository listReturn type: osid.repository.RepositoryListRaise: NullArgument–repository_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
RepositoryManager.get_repositories_by_parent_genus_type(repository_genus_type)¶Gets a
RepositoryListcorresponding to the given repository genusTypeand include any additional repositories with genus types derived from the specifiedType.In plenary mode, the returned list contains all known repositories or an error results. Otherwise, the returned list may contain only those repositories that are accessible through this session.
Parameters: repository_genus_type ( osid.type.Type) – a repository genus typeReturns: the returned Repository listReturn type: osid.repository.RepositoryListRaise: NullArgument–repository_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
RepositoryManager.get_repositories_by_record_type(repository_record_type)¶Gets a
RepositoryListcontaining the given repository recordType.In plenary mode, the returned list contains all known repositories or an error results. Otherwise, the returned list may contain only those repositories that are accessible through this session.
Parameters: repository_record_type ( osid.type.Type) – a repository record typeReturns: the returned Repository listReturn type: osid.repository.RepositoryListRaise: NullArgument–repository_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
RepositoryManager.get_repositories_by_provider(resource_id)¶Gets a
RepositoryListfrom the given provider ````.In plenary mode, the returned list contains all known repositories or an error results. Otherwise, the returned list may contain only those repositories that are accessible through this session.
Parameters: resource_id ( osid.id.Id) – a resourceIdReturns: the returned Repository listReturn type: osid.repository.RepositoryListRaise: NullArgument–resource_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
RepositoryManager.repositories¶Gets all
Repositories.In plenary mode, the returned list contains all known repositories or an error results. Otherwise, the returned list may contain only those repositories that are accessible through this session.
Returns: a list of RepositoriesReturn type: osid.repository.RepositoryListRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository Query Methods¶
RepositoryManager.can_search_repositories()¶Tests if this user can perform
Repositorysearches.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: falseif search methods are not authorized,trueotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
RepositoryManager.repository_query¶Gets a repository query.
Returns: the repository query Return type: osid.repository.RepositoryQuerycompliance: mandatory – This method must be implemented.
RepositoryManager.get_repositories_by_query(repository_query)¶Gets a list of
Repositoriesmatching the given repository query.
Parameters: repository_query ( osid.repository.RepositoryQuery) – the repository queryReturns: the returned RepositoryListReturn type: osid.repository.RepositoryListRaise: NullArgument–repository_queryisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failureRaise: Unsupported–repository_queryis not of this servicecompliance: mandatory – This method must be implemented.
Repository Admin Methods¶
RepositoryManager.can_create_repositories()¶Tests if this user can create
Repositories.A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a
Repositorywill result in aPermissionDenied. This is intended as a hint to an application that may not wish to offer create operations to unauthorized users.
Returns: falseifRepositorycreation is not authorized,trueotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
RepositoryManager.can_create_repository_with_record_types(repository_record_types)¶Tests if this user can create a single
Repositoryusing the desired record types.While
RepositoryManager.getRepositoryRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificRepository. Providing an empty array tests if aRepositorycan be created with no records.
Parameters: repository_record_types ( osid.type.Type[]) – array of repository record typesReturns: trueifRepositorycreation using the specifiedTypesis supported,falseotherwiseReturn type: booleanRaise: NullArgument–repository_record_typesisnullcompliance: mandatory – This method must be implemented.
RepositoryManager.get_repository_form_for_create(repository_record_types)¶Gets the repository form for creating new repositories.
A new form should be requested for each create transaction.
Parameters: repository_record_types ( osid.type.Type[]) – array of repository record typesReturns: the repository form Return type: osid.repository.RepositoryFormRaise: NullArgument–repository_record_typesisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failureRaise: Unsupported– unable to get form for requested record typescompliance: mandatory – This method must be implemented.
RepositoryManager.create_repository(repository_form)¶Creates a new
Repository.
Parameters: repository_form ( osid.repository.RepositoryForm) – the form for thisRepositoryReturns: the new RepositoryReturn type: osid.repository.RepositoryRaise: IllegalState–repository_formalready used in a create transactionRaise: InvalidArgument– one or more of the form elements is invalidRaise: NullArgument–repository_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failureRaise: Unsupported–repository_formdid not originate fromget_repository_form_for_create()compliance: mandatory – This method must be implemented.
RepositoryManager.can_update_repositories()¶Tests if this user can update
Repositories.A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a
Repositorywill result in aPermissionDenied. This is intended as a hint to an application that may not wish to offer update operations to unauthorized users.
Returns: falseifRepositorymodification is not authorized,trueotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
RepositoryManager.get_repository_form_for_update(repository_id)¶Gets the repository form for updating an existing repository.
A new repository form should be requested for each update transaction.
Parameters: repository_id ( osid.id.Id) – theIdof theRepositoryReturns: the repository form Return type: osid.repository.RepositoryFormRaise: NotFound–repository_idis not foundRaise: NullArgument–repository_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
RepositoryManager.update_repository(repository_form)¶Updates an existing repository.
Parameters: repository_form ( osid.repository.RepositoryForm) – the form containing the elements to be updatedRaise: IllegalState–repository_formalready used in an update transactionRaise: InvalidArgument– the form contains an invalid valueRaise: NullArgument–repository_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failureRaise: Unsupported–repository_formdid not originate fromget_repository_form_for_update()compliance: mandatory – This method must be implemented.
RepositoryManager.can_delete_repositories()¶Tests if this user can delete
Repositories.A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a
Repositorywill result in aPermissionDenied. This is intended as a hint to an application that may not wish to offer delete operations to unauthorized users.
Returns: falseifRepositorydeletion is not authorized,trueotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
RepositoryManager.delete_repository(repository_id)¶Deletes a
Repository.
Parameters: repository_id ( osid.id.Id) – theIdof theRepositoryto removeRaise: NotFound–repository_idnot foundRaise: NullArgument–repository_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
RepositoryManager.can_manage_repository_aliases()¶Tests if this user can manage
Idaliases for repositories.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: falseifRepositoryaliasing is not authorized,trueotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
RepositoryManager.alias_repository(repository_id, alias_id)¶Adds an
Idto aRepositoryfor the purpose of creating compatibility.The primary
Idof theRepositoryis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another repository, it is reassigned to the given repositoryId.
Parameters:
- repository_id (
osid.id.Id) – theIdof aRepository- alias_id (
osid.id.Id) – the aliasIdRaise:
AlreadyExists–alias_idis in use as a primaryIdRaise:
NotFound–repository_idnot foundRaise:
NullArgument–repository_idoralias_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository Hierarchy Methods¶
RepositoryManager.repository_hierarchy_id¶Gets the hierarchy
Idassociated with this session.
Returns: the hierarchy Idassociated with this sessionReturn type: osid.id.Idcompliance: mandatory – This method must be implemented.
RepositoryManager.repository_hierarchy¶Gets the hierarchy associated with this session.
Returns: the hierarchy associated with this session Return type: osid.hierarchy.HierarchyRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
RepositoryManager.can_access_repository_hierarchy()¶Tests if this user can perform hierarchy queries.
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: falseif hierarchy traversal methods are not authorized,trueotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
RepositoryManager.use_comparative_repository_view()The returns from the repository 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.
RepositoryManager.use_plenary_repository_view()A complete view of the
Repositoryreturns 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.
RepositoryManager.root_repository_ids¶Gets the root repository
Idsin this hierarchy.
Returns: the root repository IdsReturn type: osid.id.IdListRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
RepositoryManager.root_repositories¶Gets the root repositories in the repository hierarchy.
A node with no parents is an orphan. While all repository
Idsare known to the hierarchy, an orphan does not appear in the hierarchy unless explicitly added as a root node or child of another node.
Returns: the root repositories Return type: osid.repository.RepositoryListRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method is must be implemented.
RepositoryManager.has_parent_repositories(repository_id)¶Tests if the
Repositoryhas any parents.
Parameters: repository_id ( osid.id.Id) – a repositoryIdReturns: trueif the repository has parents,falseotherwiseReturn type: booleanRaise: NotFound–repository_idis not foundRaise: NullArgument–repository_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
RepositoryManager.is_parent_of_repository(id_, repository_id)¶Tests if an
Idis a direct parent of a repository.
Parameters:
- id (
osid.id.Id) – anId- repository_id (
osid.id.Id) – theIdof a repositoryReturns:
trueif thisidis a parent ofrepository_id,falseotherwiseReturn type:
booleanRaise:
NotFound–repository_idis not foundRaise:
NullArgument–idorrepository_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented. implementation notes: If
idnot found returnfalse.
RepositoryManager.get_parent_repository_ids(repository_id)¶Gets the parent
Idsof the given repository.
Parameters: repository_id ( osid.id.Id) – a repositoryIdReturns: the parent Idsof the repositoryReturn type: osid.id.IdListRaise: NotFound–repository_idis not foundRaise: NullArgument–repository_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
RepositoryManager.get_parent_repositories(repository_id)¶Gets the parents of the given repository.
Parameters: repository_id ( osid.id.Id) – theIdto queryReturns: the parents of the repository Return type: osid.repository.RepositoryListRaise: NotFound–repository_idnot foundRaise: NullArgument–repository_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
RepositoryManager.is_ancestor_of_repository(id_, repository_id)¶Tests if an
Idis an ancestor of a repository.
Parameters:
- id (
osid.id.Id) – anId- repository_id (
osid.id.Id) – the Id of a repositoryReturns:
trueif thisidis an ancestor ofrepository_id,falseotherwiseReturn type:
booleanRaise:
NotFound–repository_idnot foundRaise:
NullArgument–repository_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented. implementation notes: If
idnot found returnfalse.
RepositoryManager.has_child_repositories(repository_id)¶Tests if a repository has any children.
Parameters: repository_id ( osid.id.Id) – a repositoryIdReturns: trueif therepository_idhas children,falseotherwiseReturn type: booleanRaise: NotFound–repository_idnot foundRaise: NullArgument–repository_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
RepositoryManager.is_child_of_repository(id_, repository_id)¶Tests if a node is a direct child of another.
Parameters:
- id (
osid.id.Id) – anId- repository_id (
osid.id.Id) – theIdof a repositoryReturns:
trueif theidis a child ofrepository_id,falseotherwiseReturn type:
booleanRaise:
NotFound–repository_idnot foundRaise:
NullArgument–repository_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented. implementation notes: If
idnot found returnfalse.
RepositoryManager.get_child_repository_ids(repository_id)¶Gets the
Idsof the children of the given repository.
Parameters: repository_id ( osid.id.Id) – theIdto queryReturns: the children of the repository Return type: osid.id.IdListRaise: NotFound–repository_idnot foundRaise: NullArgument–repository_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
RepositoryManager.get_child_repositories(repository_id)¶Gets the children of the given repository.
Parameters: repository_id ( osid.id.Id) – theIdto queryReturns: the children of the repository Return type: osid.repository.RepositoryListRaise: NotFound–repository_idnot foundRaise: NullArgument–repository_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
RepositoryManager.is_descendant_of_repository(id_, repository_id)¶Tests if an
Idis a descendant of a repository.
Parameters:
- id (
osid.id.Id) – anId- repository_id (
osid.id.Id) – theIdof a repositoryReturns:
trueif theidis a descendant of therepository_id,falseotherwiseReturn type:
booleanRaise:
NotFound–repository_idnot foundRaise:
NullArgument–repository_idoridisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented. implementation notes: If
idis not found returnfalse.
RepositoryManager.get_repository_node_ids(repository_id, ancestor_levels, descendant_levels, include_siblings)¶Gets a portion of the hierarchy for the given repository.
Parameters:
- repository_id (
osid.id.Id) – theIdto query- ancestor_levels (
cardinal) – the maximum number of ancestor levels to include. A value of 0 returns no parents in the node.- descendant_levels (
cardinal) – the maximum number of descendant levels to include. A value of 0 returns no children in the node.- include_siblings (
boolean) –trueto include the siblings of the given node,falseto omit the siblingsReturns: the specified repository node
Return type:
osid.hierarchy.NodeRaise:
NotFound–repository_idnot foundRaise:
NullArgument–repository_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
RepositoryManager.get_repository_nodes(repository_id, ancestor_levels, descendant_levels, include_siblings)¶Gets a portion of the hierarchy for the given repository.
Parameters:
- repository_id (
osid.id.Id) – theIdto query- ancestor_levels (
cardinal) – the maximum number of ancestor levels to include. A value of 0 returns no parents in the node.- descendant_levels (
cardinal) – the maximum number of descendant levels to include. A value of 0 returns no children in the node.- include_siblings (
boolean) –trueto include the siblings of the given node,falseto omit the siblingsReturns: the specified repository node
Return type:
osid.repository.RepositoryNodeRaise:
NotFound–repository_idnot foundRaise:
NullArgument–repository_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository Hierarchy Design Methods¶
RepositoryManager.repository_hierarchy_idGets the hierarchy
Idassociated with this session.
Returns: the hierarchy Idassociated with this sessionReturn type: osid.id.Idcompliance: mandatory – This method must be implemented.
RepositoryManager.repository_hierarchyGets the hierarchy associated with this session.
Returns: the hierarchy associated with this session Return type: osid.hierarchy.HierarchyRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
RepositoryManager.can_modify_repository_hierarchy()¶Tests if this user can change the hierarchy.
A return of true does not guarantee successful authorization. A return of false indicates that it is known performing any update will result in a
PermissionDenied. This is intended as a hint to an application that may opt not to offer these operations to an unauthorized user.
Returns: falseif changing this hierarchy is not authorized,trueotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
RepositoryManager.add_root_repository(repository_id)¶Adds a root repository.
Parameters: repository_id ( osid.id.Id) – theIdof a repositoryRaise: AlreadyExists–repository_idis already in hierarchyRaise: NotFound–repository_idnot foundRaise: NullArgument–repository_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
RepositoryManager.remove_root_repository(repository_id)¶Removes a root repository.
Parameters: repository_id ( osid.id.Id) – theIdof a repositoryRaise: NotFound–repository_idnot a rootRaise: NullArgument–repository_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
RepositoryManager.add_child_repository(repository_id, child_id)¶Adds a child to a repository.
Parameters:
- repository_id (
osid.id.Id) – theIdof a repository- child_id (
osid.id.Id) – theIdof the new childRaise:
AlreadyExists–repository_idis already a parent ofchild_idRaise:
NotFound–repository_idorchild_idnot foundRaise:
NullArgument–repository_idorchild_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
RepositoryManager.remove_child_repository(repository_id, child_id)¶Removes a child from a repository.
Parameters:
- repository_id (
osid.id.Id) – theIdof a repository- child_id (
osid.id.Id) – theIdof the new childRaise:
NotFound–repository_idnot a parent ofchild_idRaise:
NullArgument–repository_idorchild_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
RepositoryManager.remove_child_repositories(repository_id)¶Removes all children from a repository.
Parameters: repository_id ( osid.id.Id) – theIdof a repositoryRaise: NotFound–repository_idnot in hierarchyRaise: NullArgument–repository_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.