Source Code Cross Referenced for DSpaceBitstreamInfo.java in  » Content-Management-System » dspace » org » dspace » checker » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Content Management System » dspace » org.dspace.checker 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright (c) 2004-2005, Hewlett-Packard Company and Massachusetts
003:         * Institute of Technology.  All rights reserved.
004:         *
005:         * Redistribution and use in source and binary forms, with or without
006:         * modification, are permitted provided that the following conditions are
007:         * met:
008:         *
009:         * - Redistributions of source code must retain the above copyright
010:         * notice, this list of conditions and the following disclaimer.
011:         *
012:         * - Redistributions in binary form must reproduce the above copyright
013:         * notice, this list of conditions and the following disclaimer in the
014:         * documentation and/or other materials provided with the distribution.
015:         *
016:         * - Neither the name of the Hewlett-Packard Company nor the name of the
017:         * Massachusetts Institute of Technology nor the names of their
018:         * contributors may be used to endorse or promote products derived from
019:         * this software without specific prior written permission.
020:         *
021:         * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
022:         * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
023:         * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
024:         * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
025:         * HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
026:         * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
027:         * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
028:         * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
029:         * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
030:         * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
031:         * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
032:         * DAMAGE.
033:         */
034:        package org.dspace.checker;
035:
036:        /**
037:         * Value Object that holds bitstream information that will be used for dspace
038:         * bitstream.
039:         * 
040:         * @author Jim Downing
041:         * @author Grace Carpenter
042:         * @author Nathan Sarr
043:         * 
044:         */
045:        public final class DSpaceBitstreamInfo {
046:            /** database bitstream id. */
047:            private int bitstreamId;
048:
049:            /** format */
050:            private String bitstreamFormat;
051:
052:            /** name given to the bitstream. */
053:            private String name;
054:
055:            /** Stored size of the bitstream. */
056:            private int size;
057:
058:            /** the check sum value stored in the database. */
059:            private String storedChecksum;
060:
061:            /** checksum algorithm (usually MD5 for now). */
062:            private String checksumAlgorithm;
063:
064:            /** Bitstream Format Description */
065:            private String userFormatDescription;
066:
067:            /** source name of the file. */
068:            private String source;
069:
070:            /** file location in the assetstore. */
071:            private String internalId;
072:
073:            /** deleted flag. */
074:            private boolean deleted;
075:
076:            /** store number. */
077:            private int storeNumber;
078:
079:            /**
080:             * Blanked off no-op default constructor.
081:             */
082:            private DSpaceBitstreamInfo() {
083:                ;
084:            }
085:
086:            /**
087:             * Minimal constructor.
088:             * 
089:             * @param bid
090:             *            Bitstream identifier
091:             */
092:            public DSpaceBitstreamInfo(int bid) {
093:                deleted = false;
094:                storeNumber = -1;
095:                size = -1;
096:                bitstreamFormat = null;
097:                userFormatDescription = null;
098:                internalId = null;
099:                source = null;
100:                checksumAlgorithm = null;
101:                storedChecksum = null;
102:                name = null;
103:                this .bitstreamId = bid;
104:            }
105:
106:            /**
107:             * Complete constructor.
108:             * 
109:             * @param del
110:             *            Deleted
111:             * @param storeNo
112:             *            Bitstream storeNumber
113:             * @param sz
114:             *            Bitstream size
115:             * @param bitstrmFmt
116:             *            Bitstream format
117:             * @param bitstrmId
118:             *            Bitstream id
119:             * @param usrFmtDesc
120:             *            Bitstream format description
121:             * @param intrnlId
122:             *            Bitstream DSpace internal id
123:             * @param src
124:             *            Bitstream source
125:             * @param chksumAlgorthm
126:             *            Algorithm used to check bitstream
127:             * @param chksum
128:             *            Hash digest obtained
129:             * @param nm
130:             *            Name of bitstream
131:             * @param desc
132:             *            Bitstream description
133:             */
134:            public DSpaceBitstreamInfo(boolean del, int storeNo, int sz,
135:                    String bitstrmFmt, int bitstrmId, String usrFmtDesc,
136:                    String intrnlId, String src, String chksumAlgorthm,
137:                    String chksum, String nm, String desc) {
138:                this .deleted = del;
139:                this .storeNumber = storeNo;
140:                this .size = sz;
141:                this .bitstreamFormat = bitstrmFmt;
142:                this .bitstreamId = bitstrmId;
143:                this .userFormatDescription = usrFmtDesc;
144:                this .internalId = intrnlId;
145:                this .source = src;
146:                this .checksumAlgorithm = chksumAlgorthm;
147:                this .storedChecksum = chksum;
148:                this .name = nm;
149:            }
150:
151:            /**
152:             * Get the deleted flag.
153:             * 
154:             * @return boolean
155:             */
156:            public boolean getDeleted() {
157:                return deleted;
158:            }
159:
160:            /**
161:             * Set the deleted flag.
162:             * 
163:             * @param deleted
164:             *            deleted flag
165:             */
166:            public void setDeleted(boolean deleted) {
167:                this .deleted = deleted;
168:            }
169:
170:            /**
171:             * Get the store number.
172:             * 
173:             * @return int
174:             */
175:            public int getStoreNumber() {
176:                return storeNumber;
177:            }
178:
179:            /**
180:             * Set the store number.
181:             * 
182:             * @param storeNumber
183:             *            the store number
184:             */
185:            public void setStoreNumber(int storeNumber) {
186:                this .storeNumber = storeNumber;
187:            }
188:
189:            /**
190:             * Get the size.
191:             * 
192:             * @return int
193:             */
194:            public int getSize() {
195:                return size;
196:            }
197:
198:            /**
199:             * Set the size.
200:             * 
201:             * @param size
202:             *            the bitstream size
203:             */
204:            public void setSize(int size) {
205:                this .size = size;
206:            }
207:
208:            /**
209:             * Get the Bitstream Format id.
210:             * 
211:             * @return int
212:             */
213:            public String getBitstreamFormatId() {
214:                return bitstreamFormat;
215:            }
216:
217:            /**
218:             * Set the Bitstream Format id.
219:             * 
220:             * @param bitstrmFmt
221:             *            id of the bitstream format
222:             */
223:            public void setBitstreamFormatId(String bitstrmFmt) {
224:                this .bitstreamFormat = bitstrmFmt;
225:            }
226:
227:            /**
228:             * Get the Bitstream id.
229:             * 
230:             * @return int
231:             */
232:            public int getBitstreamId() {
233:                return bitstreamId;
234:            }
235:
236:            /**
237:             * Get the user format description.
238:             * 
239:             * @return String
240:             */
241:            public String getUserFormatDescription() {
242:                return userFormatDescription;
243:            }
244:
245:            /**
246:             * Set the user format description.
247:             * 
248:             * @param userFormatDescription
249:             *            the userFormatDescription
250:             */
251:            public void setUserFormatDescription(String userFormatDescription) {
252:                this .userFormatDescription = userFormatDescription;
253:            }
254:
255:            /**
256:             * Get the Internal Id.
257:             * 
258:             * @return String
259:             */
260:            public String getInternalId() {
261:                return internalId;
262:            }
263:
264:            /**
265:             * Set the Internal Id.
266:             * 
267:             * @param internalId
268:             *            the DSpace internal sequence id for the bitstream.
269:             */
270:            public void setInternalId(String internalId) {
271:                this .internalId = internalId;
272:            }
273:
274:            /**
275:             * Get the source.
276:             * 
277:             * @return String
278:             */
279:            public String getSource() {
280:                return source;
281:            }
282:
283:            /**
284:             * Set the source.
285:             * 
286:             * @param source
287:             *            The bitstream source.
288:             */
289:            public void setSource(String source) {
290:                this .source = source;
291:            }
292:
293:            /**
294:             * Get the checksum algorithm.
295:             * 
296:             * @return String
297:             */
298:            public String getChecksumAlgorithm() {
299:                return checksumAlgorithm;
300:            }
301:
302:            /**
303:             * Set the checksum algorithm.
304:             * 
305:             * @param checksumAlgorithm
306:             *            the algorithm used for checking this bitstream
307:             */
308:            public void setChecksumAlgorithm(String checksumAlgorithm) {
309:                this .checksumAlgorithm = checksumAlgorithm;
310:            }
311:
312:            /**
313:             * Get the checksum.
314:             * 
315:             * @return String
316:             */
317:            public String getStoredChecksum() {
318:                return storedChecksum;
319:            }
320:
321:            /**
322:             * Set the checksum.
323:             * 
324:             * @param checksum
325:             *            The last stored checksum for this bitstream.
326:             */
327:            public void setStoredChecksum(String checksum) {
328:                this .storedChecksum = checksum;
329:            }
330:
331:            /**
332:             * Get the name of the bitstream.
333:             * 
334:             * @return String
335:             */
336:            public String getName() {
337:                return name;
338:            }
339:
340:            /**
341:             * Set the name of the bitstream.
342:             * 
343:             * @param nm
344:             *            The name of this bitstream.
345:             */
346:            public void getName(String nm) {
347:                this .name = nm;
348:            }
349:
350:            /**
351:             * The name of the bitstream.
352:             * 
353:             * @param name
354:             *            The name to set.
355:             */
356:            public void setName(String name) {
357:                this .name = name;
358:            }
359:
360:            /**
361:             * Identity entirely dependent upon <code>bitstreamId</code>.
362:             * 
363:             * @see java.lang.Object#equals(java.lang.Object)
364:             */
365:            public boolean equals(Object o) {
366:                if (this  == o) {
367:                    return true;
368:                }
369:
370:                if (!(o instanceof  DSpaceBitstreamInfo)) {
371:                    return false;
372:                }
373:
374:                DSpaceBitstreamInfo other = (DSpaceBitstreamInfo) o;
375:
376:                return (this .bitstreamId == other.bitstreamId);
377:            }
378:
379:            /**
380:             * HashCode method uses <code>bitstreamId</code> as hashing function.
381:             * 
382:             * @see java.lang.Object#hashCode()
383:             */
384:            public int hashCode() {
385:                return bitstreamId;
386:            }
387:
388:            /**
389:             * Describes this BitstreamInfo.
390:             * 
391:             * @see java.lang.Object#toString()
392:             */
393:            public String toString() {
394:                return new StringBuffer("DSpace Bitstream Information for id ")
395:                        .append(bitstreamId).toString();
396:            }
397:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.