Source Code Cross Referenced for RSSDoublinCoreModule.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: RSSDoublinCoreModule.java,v 1.5 2004/03/25 10:09:10 taganaka Exp $
002:        package org.gnu.stealthp.rsslib;
003:
004:        import java.util.*;
005:
006:        /**
007:         * Handler for doublin core information.
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:         * <b>Namespace Declarations</b><br>
015:         * <ul>
016:         *  <li><b>xmlns:dc="http://purl.org/dc/elements/1.1/"</b></li>
017:         * </ul>
018:         * <h2><a name="model">Model</a></h2>
019:         *  <p>
020:         * <em>&lt;channel&gt;, &lt;item&gt;, &lt;image&gt;, and &lt;textinput&gt; Elements:</em> </p>
021:         * <ul>
022:         * <li><b>&lt;dc:title&gt;</b> ( #PCDATA )</li>
023:         * <li><b>&lt;dc:creator&gt;</b> ( #PCDATA )</li>
024:         * <li><b>&lt;dc:subject&gt;</b> ( #PCDATA )</li>
025:         * <li><b>&lt;dc:description&gt;</b> ( #PCDATA )</li>
026:         * <li><b>&lt;dc:publisher&gt;</b> ( #PCDATA )</li>
027:         * <li><b>&lt;dc:contributor&gt;</b> ( #PCDATA )</li>
028:         * <li><b>&lt;dc:date&gt;</b> ( #PCDATA ) [<a href="http://www.w3.org/TR/NOTE-datetime">W3CDTF</a>]</li>
029:         * <li><b>&lt;dc:type&gt;</b> ( #PCDATA )</li>
030:         * <li><b>&lt;dc:format&gt;</b> ( #PCDATA )</li>
031:         * <li><b>&lt;dc:identifier&gt;</b> ( #PCDATA )</li>
032:         * <li><b>&lt;dc:source&gt;</b> ( #PCDATA )</li>
033:         * <li><b>&lt;dc:language&gt;</b> ( #PCDATA )</li>
034:         * <li><b>&lt;dc:relation&gt;</b> ( #PCDATA )</li>
035:         * <li><b>&lt;dc:coverage&gt;</b> ( #PCDATA )</li>
036:         * <li><b>&lt;dc:rights&gt;</b> ( #PCDATA )</li>
037:         * </ul>
038:         *
039:         * </p>
040:         *
041:         * </blockquote>
042:         *
043:         *
044:         *
045:         * @since RSSLIB4J 0.1
046:         * @author Francesco aka 'Stealthp' stealthp[@]stealthp.org
047:         * @version 0.2
048:         */
049:
050:        public class RSSDoublinCoreModule {
051:            private String title;
052:            private String creator;
053:            private String subject;
054:            private String description;
055:            private String publisher;
056:            private String contributor;
057:            private String date;
058:            private String type;
059:            private String format;
060:            private String identifier;
061:            private String source;
062:            private String language;
063:            private String relation;
064:            private String coverage;
065:            private String rights;
066:
067:            /**
068:             * Set the title
069:             * @param t title
070:             */
071:            public void setDcTitle(String t) {
072:                title = t;
073:            }
074:
075:            /**
076:             * Set the creator
077:             * @param t creator
078:             */
079:            public void setDcCreator(String t) {
080:                creator = t;
081:            }
082:
083:            /**
084:             * Set subject
085:             * @param t subject
086:             */
087:            public void setDcSubject(String t) {
088:                subject = t;
089:            }
090:
091:            /**
092:             * Set the description
093:             * @param t description
094:             */
095:            public void setDcDescription(String t) {
096:                description = t;
097:            }
098:
099:            /**
100:             * Set the publiscer
101:             * @param t publisher
102:             */
103:            public void setDcPublisher(String t) {
104:                publisher = t;
105:            }
106:
107:            /**
108:             * Set the Contributor
109:             * @param t contributor
110:             */
111:            public void setDcContributor(String t) {
112:                contributor = t;
113:            }
114:
115:            /**
116:             * Set the date
117:             * @param t date
118:             */
119:            public void setDcDate(String t) {
120:                date = t;
121:            }
122:
123:            /**
124:             * Set the type
125:             * @param t typr
126:             */
127:            public void setDcType(String t) {
128:                type = t;
129:            }
130:
131:            /**
132:             * Set the format
133:             * @param t format
134:             */
135:            public void setDcFormat(String t) {
136:                format = t;
137:            }
138:
139:            /**
140:             * Set the identifier
141:             * @param t identifier
142:             */
143:            public void setDcIdentifier(String t) {
144:                identifier = t;
145:            }
146:
147:            /**
148:             * Set the source
149:             * @param t source
150:             */
151:            public void setDcSource(String t) {
152:                source = t;
153:            }
154:
155:            /**
156:             * Set the language
157:             * @param t language
158:             */
159:            public void setDcLanguage(String t) {
160:                language = t;
161:            }
162:
163:            /**
164:             * Set declaration
165:             * @param t declaration
166:             */
167:            public void setDcRelation(String t) {
168:                relation = t;
169:            }
170:
171:            /**
172:             * Set coverage
173:             * @param t coverage
174:             */
175:            public void setDcCoverage(String t) {
176:                coverage = t;
177:            }
178:
179:            /**
180:             * Set copy rights
181:             * @param t rights
182:             */
183:            public void setDcRights(String t) {
184:                rights = t;
185:            }
186:
187:            /**
188:             * Get the title
189:             * @return title
190:             */
191:            public String getDcTitle() {
192:                return title;
193:            }
194:
195:            /**
196:             * Get the creator
197:             * @return creator
198:             */
199:            public String getDcCreator() {
200:                return creator;
201:            }
202:
203:            /**
204:             * Get the subject
205:             * @return subject
206:             */
207:            public String getDcSubject() {
208:                return subject;
209:            }
210:
211:            /**
212:             * Get description
213:             * @return description
214:             */
215:            public String getDcDescription() {
216:                return description;
217:            }
218:
219:            /**
220:             * Get the publischer
221:             * @return the publischer
222:             */
223:            public String getDcPublisher() {
224:                return publisher;
225:            }
226:
227:            /**
228:             * Get the contributor
229:             * @return contributor
230:             */
231:            public String getDcContributor() {
232:                return contributor;
233:            }
234:
235:            /**
236:             * Get the date
237:             * @return date
238:             */
239:            public String getDcDate() {
240:                return date;
241:            }
242:
243:            /**
244:             * Get the type
245:             * @return the type
246:             */
247:            public String getDcType() {
248:                return type;
249:            }
250:
251:            /**
252:             * The format
253:             * @return format
254:             */
255:            public String getDcFormat() {
256:                return format;
257:            }
258:
259:            /**
260:             * Get the identifier
261:             * @return the identifier
262:             */
263:            public String getDcIdentifier() {
264:                return identifier;
265:            }
266:
267:            /**
268:             * Get the source
269:             * @return the source
270:             */
271:            public String getDcSource() {
272:                return source;
273:            }
274:
275:            /**
276:             * Get the language
277:             * @return language
278:             */
279:            public String getDcLanguage() {
280:                return language;
281:            }
282:
283:            /**
284:             * Get the declaration
285:             * @return declaration
286:             */
287:            public String getDcRelation() {
288:                return relation;
289:            }
290:
291:            /**
292:             * Get the coverage
293:             * @return coverage
294:             */
295:            public String getDcCoverage() {
296:                return coverage;
297:            }
298:
299:            /**
300:             * The Right
301:             * @return right
302:             */
303:            public String getDcRight() {
304:                return title;
305:            }
306:
307:            /**
308:             * A poor informational string
309:             * @return info
310:             */
311:            public String toString() {
312:                String info = "DC SUBJECT: " + subject + "\nDC CREATOR: "
313:                        + creator;
314:                return info;
315:            }
316:
317:            /**
318:             * Build a RSSDoublinCoreModule object from an Hashtable
319:             * @param t The Hashtable with key as dc tag and value as tag's value
320:             * @return the RSSDoublinCoreModule object
321:             */
322:            protected static RSSDoublinCoreModule buildDcModule(Hashtable t) {
323:
324:                if (t == null || t.size() == 0)
325:                    return null;
326:
327:                RSSDoublinCoreModule dc = new RSSDoublinCoreModule();
328:
329:                Hashtable tbl = t;
330:
331:                Enumeration en = t.keys();
332:
333:                while (en.hasMoreElements()) {
334:
335:                    String qName = (String) en.nextElement();
336:                    String data = (String) tbl.get(qName);
337:
338:                    if (data == null)
339:                        continue;
340:
341:                    if (RSSHandler.tagIsEqual(RSSHandler.DC_TITLE_TAG, qName))
342:                        dc.setDcTitle(data);
343:
344:                    if (RSSHandler.tagIsEqual(RSSHandler.DC_CREATOR_TAG, qName))
345:                        dc.setDcCreator(data);
346:
347:                    if (RSSHandler.tagIsEqual(RSSHandler.DC_SUBJECT_TAG, qName))
348:                        dc.setDcSubject(data);
349:
350:                    if (RSSHandler.tagIsEqual(RSSHandler.DC_DESCRIPTION_TAG,
351:                            qName))
352:                        dc.setDcDescription(data);
353:
354:                    if (RSSHandler.tagIsEqual(RSSHandler.DC_PUBLISHER_TAG,
355:                            qName))
356:                        dc.setDcPublisher(data);
357:
358:                    if (RSSHandler.tagIsEqual(RSSHandler.DC_CONTRIBUTOR_TAG,
359:                            qName))
360:                        dc.setDcContributor(data);
361:
362:                    if (RSSHandler.tagIsEqual(RSSHandler.DC_DATE_TAG, qName))
363:                        dc.setDcDate(data);
364:
365:                    if (RSSHandler.tagIsEqual(RSSHandler.DC_TYPE_TAG, qName))
366:                        dc.setDcType(data);
367:
368:                    if (RSSHandler.tagIsEqual(RSSHandler.DC_FORMAT_TAG, qName))
369:                        dc.setDcFormat(data);
370:
371:                    if (RSSHandler.tagIsEqual(RSSHandler.DC_IDENTIFIER_TAG,
372:                            qName))
373:                        dc.setDcIdentifier(data);
374:
375:                    if (RSSHandler.tagIsEqual(RSSHandler.DC_SOURCE_TAG, qName))
376:                        dc.setDcSource(data);
377:
378:                    if (RSSHandler
379:                            .tagIsEqual(RSSHandler.DC_LANGUAGE_TAG, qName))
380:                        dc.setDcLanguage(data);
381:
382:                    if (RSSHandler
383:                            .tagIsEqual(RSSHandler.DC_RELATION_TAG, qName))
384:                        dc.setDcRelation(data);
385:
386:                    if (RSSHandler
387:                            .tagIsEqual(RSSHandler.DC_COVERAGE_TAG, qName))
388:                        dc.setDcCoverage(data);
389:
390:                    if (RSSHandler.tagIsEqual(RSSHandler.DC_RIGHTS_TAG, qName))
391:                        dc.setDcRights(data);
392:                }
393:
394:                return dc;
395:            }
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.