Hi Peter

Thanks for the clarification and the find original method; I already had code to carry out a similar function and have modified it to more closely match the DSpace functionality.

My assumption was that a bundle would encompass all variations of an asset; original, thumb, preview, but perhaps my understanding of what a bundle actually represents is wrong.

Thanks again


Hayden

On 07/06/11 03:21, Peter Dietz wrote:
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 <mailto: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 <tel:%2B61%20%280%29%208%206102%201198>
    m. +61 (0) 405 520 778 <tel:%2B61%20%280%29%20405%20520%20778>
    e. haydenyo...@wijiti.com <mailto:haydenyo...@wijiti.com>
    w. www.wijiti.com <http://www.wijiti.com>
    vcard. www.wijiti.com/vcard/haydenyoung.vcf
    <http://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
    <mailto:DSpace-tech@lists.sourceforge.net>
    https://lists.sourceforge.net/lists/listinfo/dspace-tech



--
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.

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to