Source Code Cross Referenced for RSSObject.java in  » RSS-RDF » RSSLib4J » org » gnu » stealthp » rsslib » 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 » RSSLib4J » org.gnu.stealthp.rsslib 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        //$Id: RSSObject.java,v 1.6 2004/03/25 10:09:10 taganaka Exp $
002:        package org.gnu.stealthp.rsslib;
003:
004:        import java.util.Hashtable;
005:
006:        /**
007:         * Handler for all common informations about rss elements.
008:         *
009:         * <blockquote>
010:         * <em>This module, both source code and documentation, is in the
011:         * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
012:         * </blockquote>
013:         *
014:         * @since RSSLIB4J 0.1
015:         * @author Francesco aka 'Stealthp' stealthp[@]stealthp.org
016:         * @version 0.2
017:         */
018:
019:        public abstract class RSSObject {
020:
021:            protected String about;
022:            protected String title;
023:            protected String link;
024:            protected String description;
025:            protected String pdate;
026:            protected RSSDoublinCoreModule dc;
027:            protected Hashtable dc_container;
028:
029:            public RSSObject() {
030:                dc_container = new Hashtable();
031:            }
032:
033:            /**
034:             * Set the element title
035:             * @param t The title
036:             */
037:            public void setTitle(String t) {
038:                this .title = t;
039:            }
040:
041:            /**
042:             * Set about attribute  of the element (if have)
043:             * @param ab The about content
044:             */
045:            public void setAboutAttribute(String ab) {
046:                this .about = ab;
047:            }
048:
049:            /**
050:             * Set the link of the resource
051:             * @param l The link
052:             */
053:            public void setLink(String l) {
054:                this .link = l;
055:            }
056:
057:            /**
058:             * Set the descriprion of the element
059:             * @param des The description
060:             */
061:            public void setDescription(String des) {
062:                this .description = des;
063:            }
064:
065:            /**
066:             * The publication date for the content in the channel or in the items
067:             * @param pubDate The date
068:             */
069:            public void setPubDate(String pubDate) {
070:                pdate = pubDate;
071:            }
072:
073:            public void setRSSDoublinCoreModule(RSSDoublinCoreModule m) {
074:                dc = m;
075:            }
076:
077:            /**
078:             * Get about attribute of element
079:             * @return The attribute value
080:             */
081:            public String getAboutAttribute() {
082:                return this .about;
083:            }
084:
085:            /**
086:             * Get the element's title
087:             * @return the title
088:             */
089:            public String getTitle() {
090:                return this .title;
091:            }
092:
093:            /**
094:             * Get the publication date of the channel or of an item
095:             * @return The publication date for the content in the channel
096:             */
097:            public String getPubDate() {
098:                return pdate;
099:            }
100:
101:            /**
102:             * Get the element's link
103:             * @return the link
104:             */
105:            public String getLink() {
106:                return this .link;
107:            }
108:
109:            /**
110:             * Get the element's description
111:             * @return the descricption
112:             */
113:            public String getDescription() {
114:                return this .description;
115:            }
116:
117:            /**
118:             * Get the Roubin Core object from the RSS object
119:             * @return The object or null
120:             */
121:            public RSSDoublinCoreModule getRSSDoublinCoreModule() {
122:                if (dc != null)
123:                    return dc;
124:                return RSSDoublinCoreModule.buildDcModule(dc_container);
125:
126:            }
127:
128:            /**
129:             * Add a doublin core element to the object
130:             * @param tag The dc tag
131:             * @param data the dc value
132:             */
133:            public void addDoublinCoreElement(String tag, String data) {
134:                //Remove old value
135:                if (dc_container.containsKey(tag)) {
136:                    dc_container.remove(tag);
137:                }
138:                dc_container.put(tag, data);
139:            }
140:
141:            /**
142:             * Get DC element by hashtable
143:             * @return the  hashtable with key as tag and value as tag's value
144:             */
145:            public Hashtable getDoublinCoreElements() {
146:
147:                if (dc_container.size() == 0)
148:                    return null;
149:
150:                return dc_container;
151:            }
152:
153:            /**
154:             * Each class have to implement this information method
155:             * @return An information about element
156:             */
157:            public abstract String toString();
158:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.