Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

asset metadata

yoni_hirsh
Level 1
Level 1

Hi,

Can anyone add a Java code snippet to retrieve asset metadata? I've been trying now for a few days to retrieve the description and tags, but no success. Title for some reason is easy and straight forward .getTitle(); , see code below:

Resource childImage = (Resource)childImagesItr.next(); ImageResource imgResource = new ImageResource(childImage);Image image = new Image(childImage); //media is an internally used classmedia = new MediaVariables();media.setImageSrc(imgResource.getSrc());media.setTitle(imgResource.getTitle());
media.setTitle(image.getTitle());

but description, although method exists, returns null, such as:

media.setDescription(image.getDescription());

or

media.setDescrioption(imgResource.getDescription());
1 Accepted Solution
ashu4pma
Correct answer by
Level 4
Level 4
1 Reply
ashu4pma
Correct answer by
Level 4
Level 4