Magnolia 5.7 reached extended end of life on May 31, 2022. Support for this branch is limited, see End-of-life policy. Please note that to cover the extra maintenance effort, this EEoL period is a paid extension in the life of the branch. Customers who opt for the extended maintenance will need a new license key to run future versions of Magnolia 5.7. If you have any questions or to subscribe to the extended maintenance, please get in touch with your local contact at Magnolia.
Magnolia (DAM 2.0) includes a single implementation of the
AssetProvider
interface,
JcrAssetProvider
, that facilitates working with Assets
stored in the dam
workspace: This page provides the details of this implementation.
Workspace structure and node definitions
Here is the hierarchical structure of the dam
workspace:
mgnl:folder (nt:folder)
mgnl:asset (nt:file)
description
title
...
mgnl:resource (nt:resource)
jcr:data (type="Binary")size
...
mgnl:asset (nt:file
)
...
Note!
mgnl:asset
: Contains allAsset
main properties andDublinCore
properties.mgnl:resource
: Contains the binary andMagnoliaAssetMetadata
properties.
Refer to AssetNodeTypes
to access to the Asset
property constant definition and utility methods. AssetNodeTypes
should be used to refer to JCR Asset
properties and node structure.
Asset to JCR node mapping
Node | Property Name | Asset Getter | Description |
---|---|---|---|
mgnl:asset | (not related to a property
| Asset.getName() | JCR Asset node name. |
| language | Asset.getLanguage() | String representation of local ISO 639. |
mgnl:asset | (not related to a property
| Asset.getItemKey() | Composite Id build using new ItemKey(DamConstants.DEFAULT_JCR_PROVIDER_ID, assetNode.getIdentifier()) ; |
mgnl:asset | title | Asset.getTitle() | Title of the Asset . |
mgnl:asset | subject | Asset.getSubject() | Subject of the Asset . |
mgnl:asset | description | Asset.getDescription() | Description of the Asset . |
mgnl:asset | caption | Asset.getCaption() | Caption of the Asset . |
mgnl:asset | copyright | Asset.getCopyright() | Copyright of the Asset . |
mgnl:asset | comment | Asset.getComment() | Comment defined on the Asset . |
mgnl:asset | mgnl:lastModified | Asset.getLastModified() | Last modification date of the Asset . |
jcr:content | jcr:mimeType | Asset.getMimeType() | Mime Type of the Asset . |
jcr:content | extension | Asset.getFileExtension() | File extension of the Asset . |
jcr:content | fileName | Asset.getFileName() | File name of the Asset. This field includes the file extension 'me.tif'. |
cr:content | size | Asset.getFileSize() | Size of the Asset in bytes. |
jcr:content | jcr:data | Asset.getContentStream() | Asset content returned as a java.io.InputStream . |
mgnl:asset | (not related to a property) | Asset.getPath() | Asset path.assetNode.getPath() |
mgnl:asset | (not related to a property) | Asset.getAssetProvider() | The related AssetProvider . |
mgnl:asset | (not related to a property) | Asset.getParent() | Returns the parent Folder . Equivalent to node.getParent() |
mgnl:asset | (not related to a property) | Asset.isFolder() | Returns false |
mgnl:asset | (not related to a property) | Asset.isAsset() | Returns true |
These fields are required to be at this node level hierarchy (
mgnl:asset
.jcr:content
) by the current implementation of the Imaging module. They will be moved under the mgnl:asset
node level when the Imaging module is updated to work with Assets
.
Folder to JCR node mapping
Node | Property Name | Asset Getter | Description |
---|---|---|---|
mgnl: | (not related to a property
| Folder.getName() | JCR Folder node name. |
mgnl: | (not related to a property) |
| Folder path.folderNode.getPath() |
| (not related to a property) |
| Composite Id built using new ItemKey(DamConstants.DEFAULT_JCR_PROVIDER_ID, ; |
| (not related to a property) |
| Returns the item directly under this folder with the given name. |
| (not related to a property) |
| Returns an iterator over the direct elements under this folder. Returns both Asset and Folder . |
| (not related to a property) |
| Returns if the
|
| (not related to a property) |
| Returns the related AssetProvider . |
| (not related to a property) |
| Returns the parent Folder . Equivalent to node.getParent() |
| (not related to a property) |
| Returns
|
| (not related to a property) |
| Returns false |
AssetMetadata to JCR node mapping
MagnoliaAssetMetadata
Node | Property Name | Asset Getter | Description |
---|---|---|---|
jcr:content | height | MagnoliaAssetMetadata.getHeight() | File height of the Asset for image MediaType . |
jcr:content | width | MagnoliaAssetMetadata.getWidth() | File width of the Asset for image MediaType . |
DublinCore
For more Information see Dublin Core Metadata Element Set.
Node | Property Name | Asset Getter | Description |
---|---|---|---|
mgnl:asset | language | DublinCore.getLanguage() | The returned value is equivalent to Asset.getLanguage() . |
| title |
| The returned value is equivalent to Asset.getTitle() . |
mgnl:asset |
|
| The returned value is equivalent to Asset.getSubject() . |
mgnl:asset |
|
| The returned value is equivalent to Asset.getDescription() . |
mgnl:asset |
|
| The returned value is equivalent to Asset. . |
| jcr:mimeType |
| The returned value is equivalent to . |
mgnl:asset | (not related to a property
|
| The returned value is equivalent to . |
mgnl:asset |
|
| The entity primarily responsible for making the resource. |
mgnl:asset | mgnl:lastModified |
| The returned value is equivalent to . |
mgnl:asset |
|
| The entity responsible for making contributing to the resource. |
mgnl:asset |
|
| The spatial or temporal topic of the resource, the spatial applicability |
|
|
| The entity responsible for making the resource available. |
mgnl:asset |
|
| A related resource. |
|
|
| A related resource from which the described resource is derived. |
|
|
| The returned value is equivalent to
The MediaType is defined based on the MimeType . |