25 lines
611 B
Java
25 lines
611 B
Java
|
package org.gcube.portlets.user.geoportaldataviewer.client.ui.cms.project;
|
||
|
|
||
|
import java.util.Map.Entry;
|
||
|
|
||
|
import org.gcube.application.geoportalcommon.shared.geoportal.DocumentDV;
|
||
|
|
||
|
public class ProjectUtil {
|
||
|
|
||
|
public static <T extends DocumentDV> String toHMLCode(T document, String projectID) {
|
||
|
String htmlCode = "";
|
||
|
|
||
|
Entry<String, Object> firstEntrySet = document.getFirstEntryOfMap();
|
||
|
if (firstEntrySet != null) {
|
||
|
htmlCode += firstEntrySet.getKey() + ": <b>" + firstEntrySet.getValue() + "</b>";
|
||
|
}
|
||
|
|
||
|
if (projectID != null) {
|
||
|
htmlCode += "(id: " + projectID + ")";
|
||
|
}
|
||
|
|
||
|
return htmlCode;
|
||
|
}
|
||
|
|
||
|
}
|