Package org.dspace.app.itemmarking

Examples of org.dspace.app.itemmarking.ItemMarkingInfo


           
            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("\"");
              }
View Full Code Here

TOP

Related Classes of org.dspace.app.itemmarking.ItemMarkingInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.