我正在嘗試獲取DAM中資產的元數據。但是,對於在它們前面沒有「dc:」的屬性,元數據似乎回到空白狀態。如何獲取值自定義元數據屬性
Resource rs = getResourceResolver().getResource(fileReference);
Asset asset = rs.adaptTo(Asset.class);
//this works
title = asset.getMetadataValue("dc:title").toString();
//this does not work.
//I have ensured that "mine.title" is a property and has string value assigned to it.
customTitle = asset.getMetadataValue("mine.title").toString():
//this does not work either
customTitle = asset.getMetadata("mine.title").toString():
有沒有辦法從自定義元數據屬性中獲取值?
在標題= asset.getMetadataValue( 「DC:標題」)的toString(); toString()可能是多餘的。 asset.getMetadataValue()默認返回一個「String」。 – Sabya