Source Code Cross Referenced for ChannelData.java in  » RSS-RDF » Feedzeo » data » 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 » RSS RDF » Feedzeo » data 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**********************************************************************************
002:
003:            Feedzeo! 
004:            A free and open source RSS/Atom/RDF feed aggregator
005:
006:            Copyright (C) 2005-2006  Anand Rao (anandrao@users.sourceforge.net)
007:
008:            This library is free software; you can redistribute it and/or
009:            modify it under the terms of the GNU Lesser General Public
010:            License as published by the Free Software Foundation; either
011:            version 2.1 of the License, or (at your option) any later version.
012:
013:            This library is distributed in the hope that it will be useful,
014:            but WITHOUT ANY WARRANTY; without even the implied warranty of
015:            MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
016:            Lesser General Public License for more details.
017:
018:            You should have received a copy of the GNU Lesser General Public
019:            License along with this library; if not, write to the Free Software
020:            Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
021:
022:         ************************************************************************************/package data;
023:
024:        import java.util.*;
025:        import java.net.*;
026:
027:        import util.DateUtil;
028:
029:        /**
030:         *
031:         * @author  Anand Rao
032:         */
033:        public class ChannelData {
034:
035:            //int ChannelFormat;
036:            private String FeedSourceURL; // url to the feedsource
037:            private String Copyright;
038:            private String Creator;
039:            private String Title;
040:            private String Description;
041:            private URL ImageLink;
042:            private Date PublishDate;
043:            private String Publisher;
044:            private long FeedSourceLastModified; // time in ms when the url to feedsource 
045:            // was last modified
046:
047:            private String HTMLfilename; /* 
048:             * link to the HTML page generated for this
049:             * feed; this is set by the page generator
050:             * when it generates a page
051:             */
052:            private String HTMLTableDatafilename; /* link to the HTML file which contains 
053:                                                        HTML code for only main table with all the 
054:                                                        feed information, but excluding <head>
055:                                                        & <body> tags; This file is useful when
056:                                                        users want to embed the feed data into an
057:                                                        HTML page; So in those cases, the user can just 
058:                                                        request for this file and embed the data into 
059:                                                        their own HTML page
060:             */
061:
062:            private Vector ItemCollection; /* Vector holding collection of news items */
063:
064:            /** Creates a new instance of ChannelData */
065:            public ChannelData() {
066:                ItemCollection = new Vector();
067:            }
068:
069:            public void addItem(ItemData item) {
070:                ItemCollection.addElement(item);
071:            }
072:
073:            public int getNumItems() {
074:                return (ItemCollection.size());
075:            }
076:
077:            public ItemData getItem(int Index) {
078:                if (getNumItems() == 0)
079:                    return null;
080:                return ((ItemData) ItemCollection.elementAt(Index));
081:            }
082:
083:            /*
084:            public int getChannelFormat() {
085:             return ChannelFormat;
086:            }
087:             */
088:
089:            public String getCopyright() {
090:                return Copyright;
091:            }
092:
093:            public String getCreator() {
094:                return Creator;
095:            }
096:
097:            public String getTitle() {
098:                return Title;
099:            }
100:
101:            public String getDescription() {
102:                return Description;
103:            }
104:
105:            public String getImageLink() {
106:                return ImageLink.toString();
107:            }
108:
109:            public Date getPublishDate() {
110:                return PublishDate;
111:            }
112:
113:            public String getPublisher() {
114:                return Publisher;
115:            }
116:
117:            public String getHTMLfilename() {
118:                return HTMLfilename;
119:            }
120:
121:            public String getHTMLTableDatafilename() {
122:                return HTMLTableDatafilename;
123:            }
124:
125:            public String getFeedSourceURL() {
126:                return FeedSourceURL;
127:            }
128:
129:            public long getFeedSourceLastModified() {
130:                return FeedSourceLastModified;
131:            }
132:
133:            /*    
134:            public void setChannelFormat(int ChannelFormat) {
135:                this.ChannelFormat = ChannelFormat;
136:            }
137:             */
138:
139:            public void setCopyright(String Copyright) {
140:                this .Copyright = Copyright;
141:            }
142:
143:            public void setCreator(String Creator) {
144:                this .Creator = Creator;
145:            }
146:
147:            public void setTitle(String Title) {
148:                this .Title = Title;
149:            }
150:
151:            public void setDescription(String Description) {
152:                this .Description = Description;
153:            }
154:
155:            public void setImageLink(URL ImageLink) {
156:                this .ImageLink = ImageLink;
157:            }
158:
159:            public void setPublishDate(Date PublishDate) {
160:                this .PublishDate = PublishDate;
161:            }
162:
163:            public void setPublisher(String Publisher) {
164:                this .Publisher = Publisher;
165:            }
166:
167:            public void setHTMLfilename(String fname) {
168:                HTMLfilename = fname;
169:            }
170:
171:            public void setHTMLTableDatafilename(String fname) {
172:                HTMLTableDatafilename = fname;
173:            }
174:
175:            public void setFeedSourceURL(String url) {
176:                FeedSourceURL = url;
177:            }
178:
179:            public void setFeedSourceLastModified(long lastModifiedTime) {
180:                FeedSourceLastModified = lastModifiedTime;
181:            }
182:
183:            public String getData(String type) {
184:                if (type.equalsIgnoreCase(DataElement.FEED_TITLE_ELEM))
185:                    if (Title != null)
186:                        return Title;
187:                    else
188:                        return "";
189:                if (type.equalsIgnoreCase(DataElement.FEED_DESC_ELEM))
190:                    if (Description != null)
191:                        return Description;
192:                    else
193:                        return "";
194:                if (type.equalsIgnoreCase(DataElement.FEED_IMAGE_ELEM))
195:                    if (ImageLink != null)
196:                        return ImageLink.toString();
197:                    else
198:                        return "";
199:                if (type.equalsIgnoreCase(DataElement.FEED_DATE_ELEM))
200:                    if (PublishDate != null)
201:                        return DateUtil.getMonthDayYearStr(PublishDate); //PublishDate.toString();
202:                    else
203:                        return "";
204:
205:                // todo lots more to add
206:                return "";
207:            }
208:
209:            public String getItemData(String type, int index) {
210:                if ((index < 0) || (index >= ItemCollection.size()))
211:                    return ("");
212:                ItemData id = (ItemData) ItemCollection.elementAt(index);
213:                return id.getData(type);
214:            }
215:
216:        };
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.