01: /*
02: * Thumbnail.java
03: *
04: * Copyright (c) 2002-2007, Hewlett-Packard Company and Massachusetts
05: * Institute of Technology. All rights reserved.
06: *
07: * Redistribution and use in source and binary forms, with or without
08: * modification, are permitted provided that the following conditions are
09: * met:
10: *
11: * - Redistributions of source code must retain the above copyright
12: * notice, this list of conditions and the following disclaimer.
13: *
14: * - Redistributions in binary form must reproduce the above copyright
15: * notice, this list of conditions and the following disclaimer in the
16: * documentation and/or other materials provided with the distribution.
17: *
18: * - Neither the name of the Hewlett-Packard Company nor the name of the
19: * Massachusetts Institute of Technology nor the names of their
20: * contributors may be used to endorse or promote products derived from
21: * this software without specific prior written permission.
22: *
23: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24: * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25: * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26: * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27: * HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
28: * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
29: * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
30: * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
31: * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
32: * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
33: * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
34: * DAMAGE.
35: */
36: package org.dspace.content;
37:
38: import org.dspace.content.Bitstream;
39:
40: /**
41: * Wrapper class for bitstreams with Thumbnails associated with them for
42: * convenience in the browse system
43: *
44: * @author Richard Jones
45: *
46: */
47: public class Thumbnail {
48: /** the bitstream that is actually the thumbnail */
49: private Bitstream thumb;
50:
51: /** the original bitstream for which this is the thumbnail */
52: private Bitstream original;
53:
54: /**
55: * Construct a new thumbnail using the two bitstreams
56: *
57: * @param thumb the thumbnail bitstream
58: * @param original the original bitstream
59: */
60: public Thumbnail(Bitstream thumb, Bitstream original) {
61: this .thumb = thumb;
62: this .original = original;
63: }
64:
65: /**
66: * @return Returns the original.
67: */
68: public Bitstream getOriginal() {
69: return original;
70: }
71:
72: /**
73: * @param original The original to set.
74: */
75: public void setOriginal(Bitstream original) {
76: this .original = original;
77: }
78:
79: /**
80: * @return Returns the thumb.
81: */
82: public Bitstream getThumb() {
83: return thumb;
84: }
85:
86: /**
87: * @param thumb The thumb to set.
88: */
89: public void setThumb(Bitstream thumb) {
90: this.thumb = thumb;
91: }
92:
93: }
|