01: //$Id: RSSSyndicationModule.java,v 1.5 2004/03/25 10:09:10 taganaka Exp $
02: package org.gnu.stealthp.rsslib;
03:
04: /**
05: * Handler for Syndycation information.
06: *
07: * <blockquote>
08: * <em>This module, both source code and documentation, is in the
09: * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
10: * </blockquote>
11: *
12: *
13: * <h2><a name="namespaces">Namespace Declarations</a></h2>
14: * <ul>
15: * <li><b>xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"</b></li>
16: * </ul>
17: * <h2><a name="model">Model</a></h2>
18: * <p>
19: * <em><channel> Elements:</em></p>
20: * <ul>
21: * <li><b><sy:updatePeriod></b> ( 'hourly' | 'daily' | 'weekly' | 'monthly' | 'yearly' )</li>
22: * <li><b><sy:updateFrequency></b> ( a positive integer )</li>
23: * <li><b><sy:updateBase></b> ( #PCDATA ) [<a href="http://www.w3.org/TR/NOTE-datetime">W3CDTF</a>]</li>
24: * </ul>
25: *
26: * @since RSSLIB4J 0.1
27: * @author Francesco aka 'Stealthp' stealthp[@]stealthp.org
28: * @version 0.2
29: */
30:
31: public class RSSSyndicationModule {
32:
33: private String updatePeriod, updateFrequency, updateBase;
34:
35: /**
36: * Set the feed update period
37: * @param t ( 'hourly' | 'daily' | 'weekly' | 'monthly' | 'yearly' )
38: */
39: public void setSyUpdatePeriod(String t) {
40: updatePeriod = t;
41: }
42:
43: /**
44: * Set the update frequency
45: * @param t could be an integer value
46: */
47: public void setSyUpdateFrequency(String t) {
48: updateFrequency = t;
49: }
50:
51: /**
52: * The date of updateBase
53: * @param t the date
54: */
55: public void setSyUpdateBase(String t) {
56: updateBase = t;
57: }
58:
59: /**
60: * Get the period
61: * @return the period
62: */
63: public String getSyUpdatePeriod() {
64: return updatePeriod;
65: }
66:
67: /**
68: * Get the update frequecy
69: * @return the frequency
70: */
71: public String getSyUpdateFrequency() {
72: return updateFrequency;
73: }
74:
75: /**
76: * Get the date
77: * @return the date
78: */
79: public String getSyUpdateBase() {
80: return updateBase;
81: }
82:
83: /**
84: * Information string
85: * @return an info
86: */
87: public String toString() {
88: String info = "UPD_PERIOD: " + updatePeriod + "\nUPD_FREQ: "
89: + updateFrequency + "\nUPD_BASE: " + updateBase;
90: return info;
91: }
92: }
|