maxon.AssetLinkInterface

Description

An AssetLink is a symbolic link to an asset identified by its id and version. Also an ASSET_UPDATE_POLICY is stored to control the behavior of the link when newer versions of the linked asset exists.

Alternatively an maxon.AssetLink can also just wrap a maxon.Url from which an asset can be loaded directly.

Inheritance diagram

Inheritance

Parent Class:

Child Class:

Methods Signature

Create(type, aid[, up])

Creates a new maxon.AssetLink.

GetUpdatePolicy()

Returns the update policy which this link uses.

GetUrl()

Returns the maxon.Url for a Url-based maxon.AssetLink.

Resolve(context)

Resolves this maxon.AssetLink to an maxon.AssetDescription in the given context.

SetUpdatePolicy(up)

Returns the update policy which this link uses.

Methods Definition

static AssetLinkInterface.Create(type, aid, up=None)

Creates a new maxon.AssetLink.

Use an maxon.Url for assets which aren’t stored in a repository, but shall be read directly from a Url such as a local image file.
Only one of the next calls is possible:
Parameters
Returns

A new AssetLink.

Return type

maxon.AssetLink

AssetLinkInterface.GetUpdatePolicy()

Returns the update policy which this link uses.

Returns

The update policy of this link.

Return type

maxon.ASSET_UPDATE_POLICY

AssetLinkInterface.GetUrl()

Returns the maxon.Url for a Url-based maxon.AssetLink.

Returns

The maxon.Url to which this maxon.AssetLink points. Or a null value when this maxon.AssetLink uses an asset identifier instead of a maxon.Url.

Return type

maxon.Url

AssetLinkInterface.Resolve(context)

Resolves this maxon.AssetLink to an maxon.AssetDescription in the given context.

The asset identifier of this link is used to find the asset in context, and if this link uses the policy maxon.ASSET_UPDATE_POLICY.IMPLICIT the latest version of the asset is used, otherwise the version recorded in this link.

Parameters

context (maxon.AssetRepositoryRef) – The repository to use for the asset lookup.

Returns

The found AssetDescription or a null value when no asset could be found.

Return type

maxon.AssetDescription

AssetLinkInterface.SetUpdatePolicy(up)

Returns the update policy which this link uses.

Parameters

up (maxon.ASSET_UPDATE_POLICY) – The new update policy for this link.