Source Code Cross Referenced for ParsedFileInfo.java in  » Search-Engine » zilverline » org » zilverline » core » 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 » Search Engine » zilverline » org.zilverline.core 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2003-2004 Michael Franken, Zilverline.
003:         *
004:         * The contents of this file, or the files included with this file, are subject to
005:         * the current version of ZILVERLINE Collaborative Source License for the
006:         * Zilverline Search Engine (the "License"); You may not use this file except in
007:         * compliance with the License.
008:         *
009:         * You may obtain a copy of the License at
010:         *
011:         *     http://www.zilverline.org.
012:         *
013:         * See the License for the rights, obligations and
014:         * limitations governing use of the contents of the file.
015:         *
016:         * The Original and Upgraded Code is the Zilverline Search Engine. The developer of
017:         * the Original and Upgraded Code is Michael Franken. Michael Franken owns the
018:         * copyrights in the portions it created. All Rights Reserved.
019:         *
020:         */
021:
022:        package org.zilverline.core;
023:
024:        import java.io.File;
025:        import java.io.Reader;
026:
027:        import org.apache.commons.logging.Log;
028:        import org.apache.commons.logging.LogFactory;
029:
030:        /**
031:         * Java bean for the Result of a Parsed File. Used in {@link Extractor}.
032:         * 
033:         * @author Michael Franken
034:         * @version $Revision: 1.6 $
035:         */
036:        public final class ParsedFileInfo {
037:            /** logger for Commons logging. */
038:            private static Log log = LogFactory.getLog(ParsedFileInfo.class);
039:
040:            /**
041:             * The file from which the info is extracted.
042:             */
043:            private File file;
044:
045:            /**
046:             * The reader containing the extracted text.
047:             */
048:            private Reader reader;
049:
050:            /**
051:             * The author of the document.
052:             */
053:            private String author = "";
054:
055:            /**
056:             * The ISBN number of the document.
057:             */
058:            private String ISBN = "";
059:
060:            /**
061:             * The title of the document.
062:             */
063:            private String title = "";
064:
065:            /**
066:             * The summary of the document.
067:             */
068:            private String summary = "";
069:
070:            /**
071:             * The creation date of the document.
072:             */
073:            private long creationDate;
074:
075:            /**
076:             * The modification date of the document.
077:             */
078:            private long modificationDate;
079:
080:            /**
081:             * The type of the document.
082:             */
083:            private String type = "";
084:
085:            /**
086:             * The size of the document.
087:             */
088:            private long size;
089:
090:            /**
091:             * Get the author of the document.
092:             * 
093:             * @return the author
094:             */
095:            public String getAuthor() {
096:                return author;
097:            }
098:
099:            /**
100:             * Get the creation date of the document.
101:             * 
102:             * @return the creation data
103:             */
104:            public long getCreationDate() {
105:                return creationDate;
106:            }
107:
108:            /**
109:             * Get the modification date of the document.
110:             * 
111:             * @return the modification data
112:             */
113:            public long getModificationDate() {
114:                return modificationDate;
115:            }
116:
117:            /**
118:             * Get the text of the document as a reader.
119:             * 
120:             * @return the text of the document
121:             */
122:            public Reader getReader() {
123:                return reader;
124:            }
125:
126:            /**
127:             * Get the summary of the document.
128:             * 
129:             * @return the summary
130:             */
131:            public String getSummary() {
132:                return summary;
133:            }
134:
135:            /**
136:             * Get the type of the document.
137:             * 
138:             * @return the type
139:             */
140:            public String getType() {
141:                return type;
142:            }
143:
144:            /**
145:             * Set the author of the document.
146:             * 
147:             * @param string the Author
148:             */
149:            public void setAuthor(final String string) {
150:                author = string;
151:            }
152:
153:            /**
154:             * Set the creation date of the document.
155:             * 
156:             * @param theDate the date of creation in milliseconds since midnight, January 1, 1970 UTC
157:             */
158:            public void setCreationDate(final long theDate) {
159:                creationDate = theDate;
160:            }
161:
162:            /**
163:             * Set the mofification date of the document.
164:             * 
165:             * @param theDate the date of last modification in milliseconds since midnight, January 1, 1970 UTC
166:             */
167:            public void setModificationDate(final long theDate) {
168:                modificationDate = theDate;
169:            }
170:
171:            /**
172:             * Set the reader containing the plain text of this document.
173:             * 
174:             * @param thisReader the reader constructed to contain just the text of the document
175:             */
176:            public void setReader(final Reader this Reader) {
177:                this .reader = this Reader;
178:            }
179:
180:            /**
181:             * Set the summary containing the a short summary of this document.
182:             * 
183:             * @param string containing
184:             */
185:            public void setSummary(final String string) {
186:                summary = string;
187:            }
188:
189:            /**
190:             * Set the type of this document.
191:             * 
192:             * @param string (such as "PDF", "Word")
193:             */
194:            public void setType(final String string) {
195:                type = string;
196:            }
197:
198:            /**
199:             * Get the file from which the info is extracted.
200:             * 
201:             * @return file
202:             */
203:            public File getFile() {
204:                return file;
205:            }
206:
207:            /**
208:             * Get the size of the document in bytes.
209:             * 
210:             * @return size
211:             */
212:            public long getSize() {
213:                return size;
214:            }
215:
216:            /**
217:             * Get the title of the document.
218:             * 
219:             * @return title
220:             */
221:            public String getTitle() {
222:                return title;
223:            }
224:
225:            /**
226:             * Set the file containing the document.
227:             * 
228:             * @param thisFile file
229:             */
230:            public void setFile(final File this File) {
231:                this .file = this File;
232:            }
233:
234:            /**
235:             * Set the size of the document.
236:             * 
237:             * @param l in bytes
238:             */
239:            public void setSize(final long l) {
240:                size = l;
241:            }
242:
243:            /**
244:             * Set the title of the document.
245:             * 
246:             * @param string title
247:             */
248:            public void setTitle(final String string) {
249:                title = string;
250:            }
251:
252:            /**
253:             * Print the file info for logging purposes.
254:             * 
255:             * @return string pretty formatted
256:             */
257:            public String toString() {
258:                StringBuffer info = new StringBuffer();
259:
260:                info.append("File: " + file.getName());
261:                info.append(", type: " + type);
262:                info.append(", title: " + title);
263:                info.append(", author: " + author);
264:                info.append(", creationDate: " + creationDate);
265:                info.append(", modificationDate: " + modificationDate);
266:                info.append(", size: " + size);
267:                info.append(", summary: " + summary);
268:
269:                return info.toString();
270:            }
271:
272:            /**
273:             * @return Returns the iSBN.
274:             */
275:            public String getISBN() {
276:                return ISBN;
277:            }
278:
279:            /**
280:             * @param isbn The iSBN to set.
281:             */
282:            public void setISBN(String isbn) {
283:                ISBN = isbn;
284:            }
285:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.