Objects¶
Asset¶
-
class
dlkit.repository.objects.
Asset
¶ Bases:
dlkit.osid.objects.OsidObject
,dlkit.osid.markers.Aggregateable
,dlkit.osid.markers.Sourceable
An
Asset
represents some digital content.Example assets might be a text document, an image, or a movie. The content data, and metadata related directly to the content format and quality, is accessed through
AssetContent. Assets
, like allOsidObjects,
include a type a record to qualify theAsset
and include additional data. The division between theAsset
Type
andAssetContent
is to separate data describing the asset from data describing the format of the contents, allowing a consumer to select among multiple formats, sizes or levels of fidelity.An example is a photograph of the Bay Bridge. The content may deliver a JPEG in multiple resolutions where the
AssetContent
may also desribe size or compression factor for each one. The content may also include an uncompressed TIFF version. TheAsset
Type
may be “photograph” indicating that the photo itself is the asset managed in this repository.Since an Asset may have multiple
AssetContent
structures, the decision of how many things to stuff inside a single asset comes down to if the content is actually a different format, or size, or quality, falling under the same creator, copyright, publisher and distribution rights as the original. This may, in some cases, provide a means to implement some accessibility, it doesn’t handle the case where, to meet an accessibility requirement, one asset needs to be substituted for another. The Repository OSID manages this aspect outside the scope of the coreAsset
definition.Assets
map toAssetSubjects
.AssetSubjects
areOsidObjects
that capture a subject matter. In the above example, anAssetSubject
may be defined for the Bay Bridge and include data describing the bridge. The single subject can map to multiple assets depicting the bridge providing a single entry for a search and a single place to describe a bridge. Bridges, as physical items, may also be described using the Resource OSID in which case the use of theAssetSubject
acts as a cover for the underlyingResource
to assist repository-only consumers.The
Asset
definition includes some basic copyright and related licensing information to assist in finding free-to-use content, or to convey the distribution restrictions that may be placed on the asset. Generally, if no data is available it is to be assumed that all rights are reserved.A publisher is applicable if the content of this
Asset
has been published. Not allAssets
in thisRepository
may have a published status and such a status may effect the applicability of copyright law. To trace the source of anAsset,
both a provider and source are defined. The provider indicates where this repository acquired the asset and the source indicates the original provider or copyright owner. In the case of a published asset, the source is the publisher.Assets
also define methods to facilitate searches over time and space as it relates to the subject matter. This may at times be redundant with theAssetSubject
. In the case of the Bay Bridge photograph, the temporal coverage may include 1936, when it opened, and/or indicate when the photo was taken to capture a current event of the bridge. The decision largeley depends on what desired effect is from a search. The spatial coverage may describe the gps coordinates of the bridge or describe the spatial area encompassed in the view. In either case, a “photograph” type may unambiguously defined methods to describe the exact time the photograph was taken and the location of the photographer.The core Asset defines methods to perform general searches and construct bibliographic entries without knowledge of a particular
Asset
orAssetContent
recordType
.-
title
¶ Gets the proper title of this asset.
This may be the same as the display name or the display name may be used for a less formal label.
Returns: the title of this asset Return type: osid.locale.DisplayText
compliance: mandatory – This method must be implemented.
-
is_copyright_status_known
()¶ Tests if the copyright status is known.
return: true
if the copyright status of this asset is known,false
otherwise. Iffalse, is_public_domain(),
``can_distribute_verbatim(), can_distribute_alterations() and- can_distribute_compositions()`` may also be
false
. rtype: boolean
compliance: mandatory – This method must be implemented.
- can_distribute_compositions()`` may also be
-
is_public_domain
()¶ Tests if this asset is in the public domain.
An asset is in the public domain if copyright is not applicable, the copyright has expired, or the copyright owner has expressly relinquished the copyright.
Returns: true
if this asset is in the public domain,false
otherwise. Iftrue,
can_distribute_verbatim(), can_distribute_alterations() and can_distribute_compositions()
must also betrue
.Return type: boolean
Raise: IllegalState
–is_copyright_status_known()
isfalse
compliance: mandatory – This method must be implemented.
-
copyright_
¶ Gets the copyright statement and of this asset which identifies the current copyright holder.
For an asset in the public domain, this method may return the original copyright statement although it may be no longer valid.
Returns: the copyright statement or an empty string if none available. An empty string does not imply the asset is not protected by copyright. Return type: osid.locale.DisplayText
Raise: IllegalState
–is_copyright_status_known()
isfalse
compliance: mandatory – This method must be implemented.
-
copyright_registration
¶ Gets the copyright registration information for this asset.
Returns: the copyright registration. An empty string means the registration status isn’t known. Return type: string
Raise: IllegalState
–is_copyright_status_known()
isfalse
compliance: mandatory – This method must be implemented.
-
can_distribute_verbatim
()¶ Tests if there are any license restrictions on this asset that restrict the distribution, re-publication or public display of this asset, commercial or otherwise, without modification, alteration, or inclusion in other works.
This method is intended to offer consumers a means of filtering out search results that restrict distribution for any purpose. The scope of this method does not include licensing that describes warranty disclaimers or attribution requirements. This method is intended for informational purposes only and does not replace or override the terms specified in a license agreement which may specify exceptions or additional restrictions.
Returns: true
if the asset can be distributed verbatim,false
otherwise.Return type: boolean
Raise: IllegalState
–is_copyright_status_known()
isfalse
compliance: mandatory – This method must be implemented.
-
can_distribute_alterations
()¶ Tests if there are any license restrictions on this asset that restrict the distribution, re-publication or public display of any alterations or modifications to this asset, commercial or otherwise, for any purpose.
This method is intended to offer consumers a means of filtering out search results that restrict the distribution or public display of any modification or alteration of the content or its metadata of any kind, including editing, translation, resampling, resizing and cropping. The scope of this method does not include licensing that describes warranty disclaimers or attribution requirements. This method is intended for informational purposes only and does not replace or override the terms specified in a license agreement which may specify exceptions or additional restrictions.
Returns: true
if the asset can be modified,false
otherwise. Iftrue,
can_distribute_verbatim()
must also betrue
.Return type: boolean
Raise: IllegalState
–is_copyright_status_known()
isfalse
compliance: mandatory – This method must be implemented.
-
can_distribute_compositions
()¶ Tests if there are any license restrictions on this asset that restrict the distribution, re-publication or public display of this asset as an inclusion within other content or composition, commercial or otherwise, for any purpose, including restrictions upon the distribution or license of the resulting composition.
This method is intended to offer consumers a means of filtering out search results that restrict the use of this asset within compositions. The scope of this method does not include licensing that describes warranty disclaimers or attribution requirements. This method is intended for informational purposes only and does not replace or override the terms specified in a license agreement which may specify exceptions or additional restrictions.
Returns: true
if the asset can be part of a larger compositionfalse
otherwise. Iftrue,
can_distribute_verbatim()
must also betrue
.Return type: boolean
Raise: IllegalState
–is_copyright_status_known()
isfalse
compliance: mandatory – This method must be implemented.
-
source_id
¶ Gets the
Resource Id
of the source of this asset.The source is the original owner of the copyright of this asset and may differ from the creator of this asset. The source for a published book written by Margaret Mitchell would be Macmillan. The source for an unpublished painting by Arthur Goodwin would be Arthur Goodwin.
An
Asset
isSourceable
and also contains a provider identity. The provider is the entity that makes this digital asset available in this repository but may or may not be the publisher of the contents depicted in the asset. For example, a map published by Ticknor and Fields in 1848 may have a provider of Library of Congress and a source of Ticknor and Fields. If copied from a repository at Middlebury College, the provider would be Middlebury College and a source of Ticknor and Fields.Returns: the source Id
Return type: osid.id.Id
compliance: mandatory – This method must be implemented.
-
source
¶ Gets the
Resource
of the source of this asset.The source is the original owner of the copyright of this asset and may differ from the creator of this asset. The source for a published book written by Margaret Mitchell would be Macmillan. The source for an unpublished painting by Arthur Goodwin would be Arthur Goodwin.
Returns: the source Return type: osid.resource.Resource
compliance: mandatory – This method must be implemented.
-
provider_link_ids
¶ Gets the resource
Ids
representing the source of this asset in order from the most recent provider to the originating source.Returns: the provider Ids
Return type: osid.id.IdList
compliance: mandatory – This method must be implemented.
-
provider_links
¶ Gets the
Resources
representing the source of this asset in order from the most recent provider to the originating source.Returns: the provider chain Return type: osid.resource.ResourceList
Raise: OperationFailed
– unable to complete requestcompliance: mandatory – This method must be implemented.
-
created_date
¶ Gets the created date of this asset, which is generally not related to when the object representing the asset was created.
The date returned may indicate that not much is known.
Returns: the created date Return type: osid.calendaring.DateTime
compliance: mandatory – This method must be implemented.
-
is_published
()¶ Tests if this asset has been published.
Not all assets viewable in this repository may have been published. The source of a published asset indicates the publisher.
Returns: true if this asset has been published, false
if unpublished or its published status is not knownReturn type: boolean
compliance: mandatory – This method must be implemented.
-
published_date
¶ Gets the published date of this asset.
Unpublished assets have no published date. A published asset has a date available, however the date returned may indicate that not much is known.
Returns: the published date Return type: osid.calendaring.DateTime
Raise: IllegalState
–is_published()
isfalse
compliance: mandatory – This method must be implemented.
-
principal_credit_string
¶ Gets the credits of the principal people involved in the production of this asset as a display string.
Returns: the principal credits Return type: osid.locale.DisplayText
compliance: mandatory – This method must be implemented.
-
asset_content_ids
¶ Gets the content
Ids
of this asset.Returns: the asset content Ids
Return type: osid.id.IdList
compliance: mandatory – This method must be implemented.
-
asset_contents
¶ Gets the content of this asset.
Returns: the asset contents Return type: osid.repository.AssetContentList
Raise: OperationFailed
– unable to complete requestcompliance: mandatory – This method must be implemented.
-
is_composition
()¶ Tetss if this asset is a representation of a composition of assets.
Returns: true if this asset is a composition, false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
composition_id
¶ Gets the
Composition
Id
corresponding to this asset.Returns: the composiiton Id
Return type: osid.id.Id
Raise: IllegalState
–is_composition()
isfalse
compliance: mandatory – This method must be implemented.
-
composition
¶ Gets the Composition corresponding to this asset.
Returns: the composiiton Return type: osid.repository.Composition
Raise: IllegalState
–is_composition()
isfalse
Raise: OperationFailed
– unable to complete requestcompliance: mandatory – This method must be implemented.
-
get_asset_record
(asset_record_type)¶ Gets the asset record corresponding to the given
Asset
recordType
.This method is used to retrieve an object implementing the requested record. The
asset_record_type
may be theType
returned inget_record_types()
or any of its parents in aType
hierarchy wherehas_record_type(asset_record_type)
istrue
.Parameters: asset_record_type ( osid.type.Type
) – an asset record typeReturns: the asset record Return type: osid.repository.records.AssetRecord
Raise: NullArgument
–asset_record_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: Unsupported
–has_record_type(asset_record_type)
isfalse
compliance: mandatory – This method must be implemented.
-
Asset Form¶
-
class
dlkit.repository.objects.
AssetForm
¶ Bases:
dlkit.osid.objects.OsidObjectForm
,dlkit.osid.objects.OsidAggregateableForm
,dlkit.osid.objects.OsidSourceableForm
This is the form for creating and updating
Assets
.Like all
OsidForm
objects, various data elements may be set here for use in the create and update methods in theAssetAdminSession
. For each data element that may be set, metadata may be examined to provide display hints or data constraints.-
title_metadata
¶ Gets the metadata for an asset title.
Returns: metadata for the title Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
title
¶
-
public_domain_metadata
¶ Gets the metadata for the public domain flag.
Returns: metadata for the public domain Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
public_domain
¶
-
copyright_metadata
¶ Gets the metadata for the copyright.
Returns: metadata for the copyright Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
copyright_
¶
-
copyright_registration_metadata
¶ Gets the metadata for the copyright registration.
Returns: metadata for the copyright registration Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
copyright_registration
¶
-
distribute_verbatim_metadata
¶ Gets the metadata for the distribute verbatim rights flag.
Returns: metadata for the distribution rights fields Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
distribute_verbatim
¶
-
distribute_alterations_metadata
¶ Gets the metadata for the distribute alterations rights flag.
Returns: metadata for the distribution rights fields Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
distribute_alterations
¶
-
distribute_compositions_metadata
¶ Gets the metadata for the distribute compositions rights flag.
Returns: metadata for the distribution rights fields Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
distribute_compositions
¶
-
source_metadata
¶ Gets the metadata for the source.
Returns: metadata for the source Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
source
¶
-
provider_links_metadata
¶ Gets the metadata for the provider chain.
Returns: metadata for the provider chain Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
provider_links
¶
-
created_date_metadata
¶ Gets the metadata for the asset creation date.
Returns: metadata for the created date Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
created_date
¶
-
published_metadata
¶ Gets the metadata for the published status.
Returns: metadata for the published field Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
published
¶
-
published_date_metadata
¶ Gets the metadata for the published date.
Returns: metadata for the published date Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
published_date
¶
-
principal_credit_string_metadata
¶ Gets the metadata for the principal credit string.
Returns: metadata for the credit string Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
principal_credit_string
¶
-
composition_metadata
¶ Gets the metadata for linking this asset to a composition.
Returns: metadata for the composition Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
composition
¶
-
get_asset_form_record
(asset_record_type)¶ Gets the
AssetFormRecord
corresponding to the givenAsset
recordType
.Parameters: asset_record_type ( osid.type.Type
) – an asset record typeReturns: the asset form record Return type: osid.repository.records.AssetFormRecord
Raise: NullArgument
–asset_record_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: Unsupported
–has_record_type(asset_record_type)
isfalse
compliance: mandatory – This method must be implemented.
-
Asset List¶
-
class
dlkit.repository.objects.
AssetList
¶ Bases:
dlkit.osid.objects.OsidList
Like all
OsidLists,
AssetList
provides a means for accessingAsset
elements sequentially either one at a time or many at a time.Examples: while (al.hasNext()) { Asset asset = al.getNextAsset(); }
- or
- while (al.hasNext()) {
- Asset[] assets = al.getNextAssets(al.available());
}
-
next_asset
¶ Gets the next
Asset
in this list.Returns: the next Asset
in this list. Thehas_next()
method should be used to test that a nextAsset
is available before calling this method.Return type: osid.repository.Asset
Raise: IllegalState
– no more elements available in this listRaise: OperationFailed
– unable to complete requestcompliance: mandatory – This method must be implemented.
-
get_next_assets
(n)¶ Gets the next set of
Assets
in this list which must be less than or equal to the return fromavailable()
.Parameters: n ( cardinal
) – the number ofAsset
elements requested which must be less than or equal toavailable()
Returns: an array of Asset
elements.The length of the array is less than or equal to the number specified.Return type: osid.repository.Asset
Raise: IllegalState
– no more elements available in this listRaise: OperationFailed
– unable to complete requestcompliance: mandatory – This method must be implemented.
Asset Content¶
-
class
dlkit.repository.objects.
AssetContent
¶ Bases:
dlkit.osid.objects.OsidObject
,dlkit.osid.markers.Subjugateable
AssetContent
represents a version of content represented by anAsset
.Although
AssetContent
is a separateOsidObject
with its ownId
to distuinguish it from other content inside anAsset, AssetContent
can only be accessed through anAsset
.Once an
Asset
is selected, multiple contents should be negotiated using the size, fidelity, accessibility requirements or application evnironment.-
asset_id
¶ Gets the
Asset Id
corresponding to this content.Returns: the asset Id
Return type: osid.id.Id
compliance: mandatory – This method must be implemented.
-
asset
¶ Gets the
Asset
corresponding to this content.Returns: the asset Return type: osid.repository.Asset
compliance: mandatory – This method must be implemented.
-
accessibility_types
¶ Gets the accessibility types associated with this content.
Returns: list of content accessibility types Return type: osid.type.TypeList
compliance: mandatory – This method must be implemented.
-
has_data_length
()¶ Tests if a data length is available.
Returns: true
if a length is available for this content,false
otherwise.Return type: boolean
compliance: mandatory – This method must be implemented.
-
data_length
¶ Gets the length of the data represented by this content in bytes.
Returns: the length of the data stream Return type: cardinal
Raise: IllegalState
–has_data_length()
isfalse
compliance: mandatory – This method must be implemented.
-
data
¶ Gets the asset content data.
Returns: the length of the content data Return type: osid.transport.DataInputStream
Raise: OperationFailed
– unable to complete requestcompliance: mandatory – This method must be implemented.
-
has_url
()¶ Tests if a URL is associated with this content.
Returns: true
if a URL is available,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
url
¶ Gets the URL associated with this content for web-based retrieval.
Returns: the url for this data Return type: string
Raise: IllegalState
–has_url()
isfalse
compliance: mandatory – This method must be implemented.
-
get_asset_content_record
(asset_content_content_record_type)¶ Gets the asset content record corresponding to the given
AssetContent
recordType
.This method is used to retrieve an object implementing the requested record. The
asset_record_type
may be theType
returned inget_record_types()
or any of its parents in aType
hierarchy wherehas_record_type(asset_record_type)
istrue
.Parameters: asset_content_content_record_type ( osid.type.Type
) – the type of the record to retrieveReturns: the asset content record Return type: osid.repository.records.AssetContentRecord
Raise: NullArgument
–asset_content_record_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: Unsupported
–has_record_type(asset_content_record_type)
isfalse
compliance: mandatory – This method must be implemented.
-
Asset Content Form¶
-
class
dlkit.repository.objects.
AssetContentForm
¶ Bases:
dlkit.osid.objects.OsidObjectForm
,dlkit.osid.objects.OsidSubjugateableForm
This is the form for creating and updating content for
AssetContent
.Like all
OsidForm
objects, various data elements may be set here for use in the create and update methods in theAssetAdminSession
. For each data element that may be set, metadata may be examined to provide display hints or data constraints.-
accessibility_type_metadata
¶ Gets the metadata for an accessibility type.
Returns: metadata for the accessibility types Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
add_accessibility_type
(accessibility_type)¶ Adds an accessibility type.
Multiple types can be added.
Parameters: accessibility_type ( osid.type.Type
) – a new accessibility typeRaise: InvalidArgument
–accessibility_type
is invalidRaise: NoAccess
–Metadata.isReadOnly()
istrue
Raise: NullArgument
–accessibility_t_ype
isnull
compliance: mandatory – This method must be implemented.
-
remove_accessibility_type
(accessibility_type)¶ Removes an accessibility type.
Parameters: accessibility_type ( osid.type.Type
) – accessibility type to removeRaise: NoAccess
–Metadata.isReadOnly()
istrue
Raise: NotFound
– acessibility type not foundRaise: NullArgument
–accessibility_type
isnull
compliance: mandatory – This method must be implemented.
-
accessibility_types
¶
-
data_metadata
¶ Gets the metadata for the content data.
Returns: metadata for the content data Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
data
¶
-
url_metadata
¶ Gets the metadata for the url.
Returns: metadata for the url Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
url
¶
-
get_asset_content_form_record
(asset_content_record_type)¶ Gets the
AssetContentFormRecord
corresponding to the given asset content recordType
.Parameters: asset_content_record_type ( osid.type.Type
) – an asset content record typeReturns: the asset content form record Return type: osid.repository.records.AssetContentFormRecord
Raise: NullArgument
–asset_content_record_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: Unsupported
–has_record_type(asset_content_record_type)
isfalse
compliance: mandatory – This method must be implemented.
-
Asset Content List¶
-
class
dlkit.repository.objects.
AssetContentList
¶ Bases:
dlkit.osid.objects.OsidList
Like all
OsidLists,
AssetContentList
provides a means for accessingAssetContent
elements sequentially either one at a time or many at a time.Examples: while (acl.hasNext()) { AssetContent content = acl.getNextAssetContent(); }
- or
- while (acl.hasNext()) {
- AssetContent[] contents = acl.getNextAssetContents(acl.available());
}
-
next_asset_content
¶ Gets the next
AssetContent
in this list.Returns: the next AssetContent
in this list. Thehas_next()
method should be used to test that a nextAssetContent
is available before calling this method.Return type: osid.repository.AssetContent
Raise: IllegalState
– no more elements available in this listRaise: OperationFailed
– unable to complete requestcompliance: mandatory – This method must be implemented.
-
get_next_asset_contents
(n)¶ Gets the next set of
AssetContents
in this list which must be less than or equal to the return fromavailable()
.Parameters: n ( cardinal
) – the number ofAssetContent
elements requested which must be less than or equal toavailable()
Returns: an array of AssetContent
elements.The length of the array is less than or equal to the number specified.Return type: osid.repository.AssetContent
Raise: IllegalState
– no more elements available in this listRaise: OperationFailed
– unable to complete requestcompliance: mandatory – This method must be implemented.
Composition¶
-
class
dlkit.repository.objects.
Composition
¶ Bases:
dlkit.osid.objects.OsidObject
,dlkit.osid.markers.Containable
,dlkit.osid.markers.Operable
,dlkit.osid.markers.Sourceable
A
Composition
represents an authenticatable identity.Like all OSID objects, a
Composition
is identified by its Id and any persisted references should use the Id.-
children_ids
¶ Gets the child
Ids
of this composition.Returns: the composition child Ids
Return type: osid.id.IdList
compliance: mandatory – This method must be implemented.
-
children
¶ Gets the children of this composition.
Returns: the composition children Return type: osid.repository.CompositionList
Raise: OperationFailed
– unable to complete requestcompliance: mandatory – This method must be implemented.
-
get_composition_record
(composition_record_type)¶ Gets the composition record corresponding to the given
Composition
recordType
.This method is used to retrieve an object implementing the requested record. The
composition_record_type
may be theType
returned inget_record_types()
or any of its parents in aType
hierarchy wherehas_record_type(composition_record_type)
istrue
.Parameters: composition_record_type ( osid.type.Type
) – a composition record typeReturns: the composition record Return type: osid.repository.records.CompositionRecord
Raise: NullArgument
–composition_record_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: Unsupported
–has_record_type(composition_record_type)
isfalse
compliance: mandatory – This method must be implemented.
-
Composition Form¶
-
class
dlkit.repository.objects.
CompositionForm
¶ Bases:
dlkit.osid.objects.OsidObjectForm
,dlkit.osid.objects.OsidContainableForm
,dlkit.osid.objects.OsidOperableForm
,dlkit.osid.objects.OsidSourceableForm
This is the form for creating and updating
Compositions
.Like all
OsidForm
objects, various data elements may be set here for use in the create and update methods in theCompositionAdminSession
. For each data element that may be set, metadata may be examined to provide display hints or data constraints.-
get_composition_form_record
(composition_record_type)¶ Gets the
CompositionFormRecord
corresponding to the given repository recordType
.Parameters: composition_record_type ( osid.type.Type
) – a composition record typeReturns: the composition form record Return type: osid.repository.records.CompositionFormRecord
Raise: NullArgument
–composition_record_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: Unsupported
–has_record_type(composition_record_type)
isfalse
compliance: mandatory – This method must be implemented.
-
Composition List¶
-
class
dlkit.repository.objects.
CompositionList
¶ Bases:
dlkit.osid.objects.OsidList
Like all
OsidLists,
CompositionList
provides a means for accessingComposition
elements sequentially either one at a time or many at a time.Examples: while (cl.hasNext()) { Composition composition = cl.getNextComposition(); }
- or
- while (cl.hasNext()) {
- Composition[] compositions = cl.getNextCompositions(cl.available());
}
-
next_composition
¶ Gets the next
Composition
in this list.Returns: the next Composition
in this list. Thehas_next()
method should be used to test that a nextComposition
is available before calling this method.Return type: osid.repository.Composition
Raise: IllegalState
– no more elements available in this listRaise: OperationFailed
– unable to complete requestcompliance: mandatory – This method must be implemented.
-
get_next_compositions
(n)¶ Gets the next set of
Composition
elements in this list which must be less than or equal to the return fromavailable()
.Parameters: n ( cardinal
) – the number ofComposition
elements requested which must be less than or equal toavailable()
Returns: an array of Composition
elements.The length of the array is less than or equal to the number specified.Return type: osid.repository.Composition
Raise: IllegalState
– no more elements available in this listRaise: OperationFailed
– unable to complete requestcompliance: mandatory – This method must be implemented.
Repository¶
-
class
dlkit.repository.objects.
Repository
(abc_repository_objects.Repository, osid_objects.OsidCatalog)¶ -
:noindex:
-
get_repository_record
(repository_record_type)¶ Gets the record corresponding to the given
Repository
recordType
.This method is used to retrieve an object implementing the requested record. The
repository_record_type
may be theType
returned inget_record_types()
or any of its parents in aType
hierarchy wherehas_record_type(repository_record_type)
istrue
.Parameters: repository_record_type ( osid.type.Type
) – a repository record typeReturns: the repository record Return type: osid.repository.records.RepositoryRecord
Raise: NullArgument
–repository_record_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: Unsupported
–has_record_type(repository_record_type)
isfalse
compliance: mandatory – This method must be implemented.
-
Repository Form¶
-
class
dlkit.repository.objects.
RepositoryForm
¶ Bases:
dlkit.osid.objects.OsidCatalogForm
This is the form for creating and updating repositories.
Like all
OsidForm
objects, various data elements may be set here for use in the create and update methods in theRepositoryAdminSession
. For each data element that may be set, metadata may be examined to provide display hints or data constraints.-
get_repository_form_record
(repository_record_type)¶ Gets the
RepositoryFormRecord
corresponding to the given repository recordType
.Parameters: repository_record_type ( osid.type.Type
) – a repository record typeReturns: the repository form record Return type: osid.repository.records.RepositoryFormRecord
Raise: NullArgument
–repository_record_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: Unsupported
–has_record_type(repository_record_type)
isfalse
compliance: mandatory – This method must be implemented.
-
Repository List¶
-
class
dlkit.repository.objects.
RepositoryList
¶ Bases:
dlkit.osid.objects.OsidList
Like all
OsidLists,
RepositoryList
provides a means for accessingRepository
elements sequentially either one at a time or many at a time.Examples: while (rl.hasNext()) { Repository repository = rl.getNextRepository(); }
- or
- while (rl.hasNext()) {
- Repository[] repositories = rl.getNextRepositories(rl.available());
}
-
next_repository
¶ Gets the next
Repository
in this list.Returns: the next Repository
in this list. Thehas_next()
method should be used to test that a nextRepository
is available before calling this method.Return type: osid.repository.Repository
Raise: IllegalState
– no more elements available in this listRaise: OperationFailed
– unable to complete requestcompliance: mandatory – This method must be implemented.
-
get_next_repositories
(n)¶ Gets the next set of
Repository
elements in this list which must be less than or equal to the return fromavailable()
.Parameters: n ( cardinal
) – the number ofRepository
elements requested which must be less than or equal toavailable()
Returns: an array of Repository
elements.The length of the array is less than or equal to the number specified.Return type: osid.repository.Repository
Raise: IllegalState
– no more elements available in this listRaise: OperationFailed
– unable to complete requestcompliance: mandatory – This method must be implemented.
Repository Node¶
-
class
dlkit.repository.objects.
RepositoryNode
¶ Bases:
dlkit.osid.objects.OsidNode
This interface is a container for a partial hierarchy retrieval.
The number of hierarchy levels traversable through this interface depend on the number of levels requested in the
RepositoryHierarchySession
.-
repository
¶ Gets the
Repository
at this node.Returns: the repository represented by this node Return type: osid.repository.Repository
compliance: mandatory – This method must be implemented.
-
parent_repository_nodes
¶ Gets the parents of this repository.
Returns: the parents of the id
Return type: osid.repository.RepositoryNodeList
compliance: mandatory – This method must be implemented.
-
child_repository_nodes
¶ Gets the children of this repository.
Returns: the children of this repository Return type: osid.repository.RepositoryNodeList
compliance: mandatory – This method must be implemented.
-
Repository Node List¶
-
class
dlkit.repository.objects.
RepositoryNodeList
¶ Bases:
dlkit.osid.objects.OsidList
Like all
OsidLists,
RepositoryNodeList
provides a means for accessingRepositoryNode
elements sequentially either one at a time or many at a time.Examples: while (rnl.hasNext()) { RepositoryNode node = rnl.getNextRepositoryNode(); }
- or
- while (rnl.hasNext()) {
- RepositoryNode[] nodes = rnl.getNextRepositoryNodes(rnl.available());
}
-
next_repository_node
¶ Gets the next
RepositoryNode
in this list.Returns: the next RepositoryNode
in this list. Thehas_next()
method should be used to test that a nextRepositoryNode
is available before calling this method.Return type: osid.repository.RepositoryNode
Raise: IllegalState
– no more elements available in this listRaise: OperationFailed
– unable to complete requestcompliance: mandatory – This method must be implemented.
-
get_next_repository_nodes
(n)¶ Gets the next set of
RepositoryNode
elements in this list which must be less than or equal to the return fromavailable()
.Parameters: n ( cardinal
) – the number ofRepositoryNode
elements requested which must be less than or equal toavailable()
Returns: an array of RepositoryNode
elements.The length of the array is less than or equal to the number specified.Return type: osid.repository.RepositoryNode
Raise: IllegalState
– no more elements available in this listRaise: OperationFailed
– unable to complete requestcompliance: mandatory – This method must be implemented.