Hi Hayden,

There is a simple method where you can ask a THUMBNAIL bundle bitstream for
the ORIGINAL bitstream that it is related to.
Bitstream findOriginalBitstream(Item item, Bitstream derived)

Its good that there is a simple method to call, however, its implementation
reveals how fragile the relationship between bitstreams is.
dspace-api:
https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/java/org/dspace/content/packager/AbstractMETSDisseminator.java#L1259

Additionally it is replicated in XMLUI:
https://github.com/DSpace/DSpace/blob/master/dspace-xmlui/dspace-xmlui-api/src/main/java/org/dspace/app/xmlui/objectmanager/ItemAdapter.java#L925


Thus, to relate between the ORIGINAL full sized bitstream "paris.jpg" and
the derived THUMBNAIL bitstream "paris.jpg.jpg", there's no bitstream-group
or intelligent parent/child relationship going on other than the filenames
being similar. In the implementation of the findOriginal method, the
filenames are identical except for the final four characters, which could be
".png", ".jpg", ".txt".



Peter Dietz



On Fri, Jun 3, 2011 at 10:15 AM, Hayden Young <haydenyo...@wijiti.com>wrote:

> I have a script which displays an item and its associated bitstreams.
>
> What I would like to do is only list the originals with thumbnails
> displayed next to image originals. Additionally each original would have
> a preview link so that branded previews could be viewed where available.
>
> Using /items/{id}.json returns an item, its bitstreams and bundles but
> looking at the output I cannot see how to associate an original with its
> thumbnail and preview. While this isn't a problem with an item that has
> one PNG bitstream it becomes impossible to associate a thumbnail and
> preview when there are multiple assets.
>
> Therefore, how do I associate an original with its thumbnail and preview?
>
> Cheers
>
>
> Hayden
>
> --
> Hayden Young
> Managing Director
> Wijiti Pty Ltd
> p. +61 (0) 8 6102 1198
> m. +61 (0) 405 520 778
> e. haydenyo...@wijiti.com
> w. www.wijiti.com
> vcard. www.wijiti.com/vcard/haydenyoung.vcf
>
> NOTICE
> This e-mail and any attachments are intended for the addressee(s) only and
> may be confidential. They may contain legally privileged or copyright
> material. You should not read, copy, use or disclose them without
> authorization. If you are not the intended recipient please contact the
> sender as soon as possible by return e-mail and then please delete both
> messages. This notice should not be removed.
>
>
>
> ------------------------------------------------------------------------------
> Simplify data backup and recovery for your virtual environment with
> vRanger.
> Installation's a snap, and flexible recovery options mean your data is
> safe,
> secure and there when you need it. Discover what all the cheering's about.
> Get your free trial download today.
> http://p.sf.net/sfu/quest-dev2dev2
> _______________________________________________
> DSpace-tech mailing list
> DSpace-tech@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
>
------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Discover what all the cheering's about.
Get your free trial download today. 
http://p.sf.net/sfu/quest-dev2dev2 
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to