if (markingExtractor == null){ // In case we cannot find the corresponding extractor (strategy) in xml beans
return "";
}
ItemMarkingInfo markInfo = markingExtractor.getItemMarkingInfo(c, item);
if (markInfo == null){
return "";
}
StringBuffer markFrag = new StringBuffer();
String localizedTooltip = null;
if (markInfo.getTooltip()!=null){
localizedTooltip = org.dspace.core.I18nUtil.getMessage(markInfo.getTooltip(), hrq.getLocale());
}
String markLink = markInfo.getLink();
if (markInfo.getImageName()!=null){
//Link
if (StringUtils.isNotEmpty(markLink)){
markFrag.append("<a href=\"")
.append(contextPath+"/" + markLink)
.append("\">");
}
markFrag.append("<img class=\""+markType+"_img\" src=\""+ contextPath+"/")
.append(markInfo.getImageName()).append("\"");
if (StringUtils.isNotEmpty(localizedTooltip)){
markFrag.append(" title=\"")
.append(localizedTooltip)
.append("\"");
}
markFrag.append("/>");
//Link
if (StringUtils.isNotEmpty(markLink)){
markFrag.append("</a>");
}
}
else if (markInfo.getClassInfo()!=null){
//Link
if (StringUtils.isNotEmpty(markLink)){
markFrag.append("<a href=\"")
.append(contextPath+"/" + markLink)
.append("\">");
}
markFrag.append("<div class=\""+markType+"_class" + " " + markInfo.getClassInfo() + "\" ");
if (StringUtils.isNotEmpty(localizedTooltip)){
markFrag.append(" title=\"")
.append(localizedTooltip)
.append("\"");
}