Package org.dspace.content

Examples of org.dspace.content.Thumbnail


           
            thumbBitstream   = dao.getFirstBitstream(itemId, "THUMBNAIL");
        }

        if (thumbBitstream != null)
            return new Thumbnail(thumbBitstream, primaryBitstream);

        return null;
    }
View Full Code Here


            throws JspException
    {
      try
      {
            Context c = UIUtil.obtainContext(hrq);
            Thumbnail thumbnail = ItemService.getThumbnail(c, item.getID(), linkToBitstream);

            if (thumbnail == null)
        {
          return "";
        }
          StringBuffer thumbFrag = new StringBuffer();

          if (linkToBitstream)
          {
            Bitstream original = thumbnail.getOriginal();
            String link = hrq.getContextPath() + "/bitstream/" + item.getHandle() + "/" + original.getSequenceID() + "/" +
                    UIUtil.encodeBitstreamName(original.getName(), Constants.DEFAULT_ENCODING);
            thumbFrag.append("<a target=\"_blank\" href=\"" + link + "\" />");
          }
          else
          {
            String link = hrq.getContextPath() + "/handle/" + item.getHandle();
            thumbFrag.append("<a href=\"" + link + "\" />");
          }

          Bitstream thumb = thumbnail.getThumb();
          String img = hrq.getContextPath() + "/retrieve/" + thumb.getID() + "/" +
                UIUtil.encodeBitstreamName(thumb.getName(), Constants.DEFAULT_ENCODING);
          String alt = thumb.getName();
            String scAttr = getScalingAttr(hrq, thumb);
            thumbFrag.append("<img src=\"")
View Full Code Here

            throws JspException
    {
        try
        {
            Context c = UIUtil.obtainContext(hrq);
            Thumbnail thumbnail = ItemService.getThumbnail(c, item.getID(), linkToBitstream);

            if (thumbnail == null)
            {
                return "";
            }
            StringBuffer thumbFrag = new StringBuffer();

            if (linkToBitstream)
            {
                Bitstream original = thumbnail.getOriginal();
                String link = hrq.getContextPath() + "/bitstream/" + item.getHandle() + "/" + original.getSequenceID() + "/" +
                                UIUtil.encodeBitstreamName(original.getName(), Constants.DEFAULT_ENCODING);
                thumbFrag.append("<a target=\"_blank\" href=\"" + link + "\" />");
            }
            else
            {
                String link = hrq.getContextPath() + "/handle/" + item.getHandle();
                thumbFrag.append("<a href=\"" + link + "\" />");
            }

            Bitstream thumb = thumbnail.getThumb();
            String img = hrq.getContextPath() + "/retrieve/" + thumb.getID() + "/" +
                        UIUtil.encodeBitstreamName(thumb.getName(), Constants.DEFAULT_ENCODING);
            String alt = thumb.getName();
            String scAttr = getScalingAttr(hrq, thumb);
            thumbFrag.append("<img src=\"")
View Full Code Here

            thumbBitstream   = dao.getFirstBitstream(itemId, "THUMBNAIL");
        }

        if (thumbBitstream != null)
        {
            return new Thumbnail(thumbBitstream, primaryBitstream);
        }

        return null;
    }
View Full Code Here

            throws JspException
    {
        try
        {
            Context c = UIUtil.obtainContext(hrq);
            Thumbnail thumbnail = ItemService.getThumbnail(c, item.getID(), linkToBitstream);

            if (thumbnail == null)
            {
                return "";
            }
            StringBuffer thumbFrag = new StringBuffer();

            if (linkToBitstream)
            {
                Bitstream original = thumbnail.getOriginal();
                String link = hrq.getContextPath() + "/bitstream/" + item.getHandle() + "/" + original.getSequenceID() + "/" +
                                UIUtil.encodeBitstreamName(original.getName(), Constants.DEFAULT_ENCODING);
                thumbFrag.append("<a target=\"_blank\" href=\"" + link + "\" />");
            }
            else
            {
                String link = hrq.getContextPath() + "/handle/" + item.getHandle();
                thumbFrag.append("<a href=\"" + link + "\" />");
            }

            Bitstream thumb = thumbnail.getThumb();
            String img = hrq.getContextPath() + "/retrieve/" + thumb.getID() + "/" +
                        UIUtil.encodeBitstreamName(thumb.getName(), Constants.DEFAULT_ENCODING);
            String alt = thumb.getName();
            String scAttr = getScalingAttr(hrq, thumb);
            thumbFrag.append("<img src=\"")
View Full Code Here

            throws JspException
    {
      try
      {
            Context c = UIUtil.obtainContext(hrq);
            Thumbnail thumbnail = ItemService.getThumbnail(c, item.getID(), linkToBitstream);

            if (thumbnail == null)
        {
          return "";
        }
          StringBuffer thumbFrag = new StringBuffer();

          if (linkToBitstream)
          {
            Bitstream original = thumbnail.getOriginal();
            String link = hrq.getContextPath() + "/bitstream/" + item.getHandle() + "/" + original.getSequenceID() + "/" +
                    UIUtil.encodeBitstreamName(original.getName(), Constants.DEFAULT_ENCODING);
            thumbFrag.append("<a target=\"_blank\" href=\"" + link + "\" />");
          }
          else
          {
            String link = hrq.getContextPath() + "/handle/" + item.getHandle();
            thumbFrag.append("<a href=\"" + link + "\" />");
          }

          Bitstream thumb = thumbnail.getThumb();
          String img = hrq.getContextPath() + "/retrieve/" + thumb.getID() + "/" +
                UIUtil.encodeBitstreamName(thumb.getName(), Constants.DEFAULT_ENCODING);
          String alt = thumb.getName();
            String scAttr = getScalingAttr(hrq, thumb);
            thumbFrag.append("<img src=\"")
View Full Code Here

TOP

Related Classes of org.dspace.content.Thumbnail

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.