1 /***
2 Copyright (C) 2005 The Java Community
3
4 This program is free software; you can redistribute it and/or modify it under
5 the terms of the GNU General Public License as published by the Free Software
6 Foundation; either version 2 of the License, or (at your option) any later
7 version.
8
9 This program is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12
13 You should have received a copy of the GNU General Public License along with
14 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
15 Place, Suite 330, Boston, MA 02111-1307 USA.
16 */
17 package org.bejug.javacareers.feeder.model;
18
19 /***
20 * Value object for an RSS Feed
21 *
22 * @author Bavo (last modified by $Author: ge0ffrey $)
23 * @version $Revision: 1.1 $ - $Date: 2005/08/26 07:58:29 $
24 */
25 public class RssFeed implements Feed {
26
27 private Integer id;
28 private String uri;
29 private String sourceName;
30 private String sourceUrl;
31 private String keywords;
32 private boolean onTitle;
33 private boolean onDescription;
34
35
36 /***
37 * Gets the keywords for this feed
38 *
39 * @return The keywords in this feed
40 */
41 public String getKeywords() {
42 return keywords;
43 }
44
45 /***
46 * Sets the keywords for this feed
47 *
48 * @param keywords comma-delimited
49 */
50 public void setKeywords(String keywords) {
51 this.keywords = keywords;
52 }
53
54 /***
55 * Gets whether keywords are on description (else title)
56 *
57 * @return true if keywords are on description
58 */
59 public boolean isOnDescription() {
60 return onDescription;
61 }
62
63 /***
64 * Sets zhether keyzords are on description (else they are on title)
65 *
66 * @param onDescription On description
67 */
68 public void setOnDescription(boolean onDescription) {
69 this.onDescription = onDescription;
70 }
71
72
73
74
75
76 /***
77 * The source url.
78 *
79 * @return String the source url for this feed
80 */
81 public String getSourceUrl() {
82 return sourceUrl;
83 }
84
85 /***
86 * Sets the source URL for this feed
87 *
88 * @param sourceUrl Sets the source URL of this feed
89 */
90 public void setSourceUrl(String sourceUrl) {
91 this.sourceUrl = sourceUrl;
92 }
93
94 /***
95 * Gets whether keywords are on title
96 *
97 * @return true if keywords on title
98 */
99 public boolean isOnTitle() {
100 return onTitle;
101 }
102
103 /***
104 * Sets whether keywords are on title
105 *
106 * @param onTitle true if on title
107 */
108 public void setOnTitle(boolean onTitle) {
109 this.onTitle = onTitle;
110 }
111
112 /***
113 * The source name
114 *
115 * @return String the source name for this feed
116 */
117 public String getSourceName() {
118 return sourceName;
119 }
120
121 /***
122 * Sets the source name for this feed.
123 *
124 * @param sourceName Sets the source of this feed
125 */
126 public void setSourceName(String sourceName) {
127 this.sourceName = sourceName;
128 }
129
130 /***
131 * Returns ID
132 *
133 * @return Returns the id.
134 */
135 public Integer getId() {
136 return id;
137 }
138
139 /***
140 * Sets ID
141 *
142 * @param id The id to set.
143 */
144 public void setId(Integer id) {
145 this.id = id;
146 }
147
148 /***
149 * Gets the URL for this feed
150 *
151 * @return String The URL for this feed
152 */
153 public String getUri() {
154 return uri;
155 }
156
157 /***
158 * Sets the URL for this feed
159 *
160 * @param uri The URL for this feed as a string
161 */
162 public void setUri(String uri) {
163 this.uri = uri;
164 }
165
166 /***
167 * Gets a String representation of this feed
168 *
169 * @return String A string representation of this feed's properties
170 */
171 public String toString() {
172 final StringBuffer buf = new StringBuffer();
173 buf.append("RssFeed");
174 buf.append("{id=").append(id);
175 buf.append(",uri=").append(uri);
176 buf.append(",source=").append(sourceName);
177 buf.append(",keywords=").append(keywords);
178 buf.append(",onTitle=").append(onTitle);
179 buf.append(",onDescription=").append(onDescription);
180 buf.append('}');
181 return buf.toString();
182 }
183 }
184
185 /***
186 * $Log: RssFeed.java,v $
187 * Revision 1.1 2005/08/26 07:58:29 ge0ffrey
188 * split up the sources in service, serviceimpl and webclient
189 *
190 * Revision 1.3 2005/06/17 11:42:47 schauwvliege
191 * CheckStyle/ PMD
192 *
193 * Revision 1.2 2005/06/09 08:18:43 bejug_cc
194 * Fix initial import
195 *
196 * Revision 1.3 2005/06/05 12:27:00 sja
197 * Added sourceUrl and sourceName.
198 *
199 * Revision 1.2 2005/05/24 11:52:39 bbr
200 * Using spring sheduling
201 *
202 * Revision 1.1 2005/05/23 17:04:57 sja
203 * Moved to org.bejug.javacareers.feeder package.
204 *
205 * Revision 1.1 2005/05/23 08:46:33 PSONG09
206 * added feeder source files to project
207 *
208 * Revision 1.2 2005/05/23 07:13:43 stephan_janssen
209 * Added javadoc.
210 *
211 * Revision 1.1 2005/05/11 11:53:25 bavo_jcs
212 * refactored
213 * - conform to conventions
214 * - some javadoc
215 * - Added FeederTask design
216 *
217 * Revision 1.6 2005/05/10 16:03:39 bavo_jcs
218 * cleanup
219 *
220 * Revision 1.5 2005/05/10 11:32:48 bavo_jcs
221 * integrated with services from JavaCareers Web
222 *
223 * Revision 1.4 2005/05/04 15:43:22 bavo_jcs
224 * Added mockups, changes to IoC mechanism
225 *
226 * Revision 1.3 2005/05/02 15:37:37 bavo_jcs
227 * Added Javadocs
228 *
229 * Revision 1.2 2005/05/02 14:49:47 bavo_jcs
230 * no message
231 *
232 * Revision 1.1.1.1 2005/04/26 14:13:50 stephan_janssen
233 * Initial import
234 *
235 * Revision 1.1.1.1 2005/04/26 12:58:31 sja
236 * Initial Release
237 *
238 * Revision 1.1.1.1 2005/04/26 12:51:26 sja
239 * Initial Release
240 *
241 */