1 17 package com.sun.syndication.feed.rss; 18 19 import com.sun.syndication.feed.impl.ObjectBean; 20 import com.sun.syndication.feed.module.Module; 21 import com.sun.syndication.feed.module.impl.ModuleUtils; 22 23 import java.util.ArrayList ; 24 import java.util.Date ; 25 import java.util.List ; 26 import java.io.Serializable ; 27 28 39 public class Item implements Cloneable ,Serializable { 40 private ObjectBean _objBean; 41 private String _title; 42 private String _link; 43 private Description _description; 44 private Source _source; 45 private List _enclosures; 46 private List _categories; 47 private Guid _guid; 48 private String _comments; 49 private String _author; 50 private Date _pubDate; 51 private Date _expirationDate; 52 private List _modules; 53 54 59 public Item() { 60 _objBean = new ObjectBean(this.getClass(),this); 61 } 62 63 70 public Object clone() throws CloneNotSupportedException { 71 return _objBean.clone(); 72 } 73 74 81 public boolean equals(Object other) { 82 return _objBean.equals(other); 83 } 84 85 93 public int hashCode() { 94 return _objBean.hashCode(); 95 } 96 97 103 public String toString() { 104 return _objBean.toString(); 105 } 106 107 113 public String getTitle() { 114 return _title; 115 } 116 117 123 public void setTitle(String title) { 124 _title = title; 125 } 126 127 133 public String getLink() { 134 return _link; 135 } 136 137 143 public void setLink(String link) { 144 _link = link; 145 } 146 147 153 public Description getDescription() { 154 return _description; 155 } 156 157 163 public void setDescription(Description description) { 164 _description = description; 165 } 166 167 173 public Source getSource() { 174 return _source; 175 } 176 177 183 public void setSource(Source source) { 184 _source = source; 185 } 186 187 194 public List getEnclosures() { 195 return (_enclosures==null) ? (_enclosures=new ArrayList ()) : _enclosures; 196 } 197 198 205 public void setEnclosures(List enclosures) { 206 _enclosures = enclosures; 207 } 208 209 216 public List getCategories() { 217 return (_categories==null) ? (_categories=new ArrayList ()) : _categories; 218 } 219 220 227 public void setCategories(List categories) { 228 _categories = categories; 229 } 230 231 237 public Guid getGuid() { 238 return _guid; 239 } 240 241 247 public void setGuid(Guid guid) { 248 _guid = guid; 249 } 250 251 257 public String getComments() { 258 return _comments; 259 } 260 261 267 public void setComments(String comments) { 268 _comments = comments; 269 } 270 271 277 public String getAuthor() { 278 return _author; 279 } 280 281 287 public void setAuthor(String author) { 288 _author = author; 289 } 290 291 298 public List getModules() { 299 return (_modules==null) ? (_modules=new ArrayList ()) : _modules; 300 } 301 302 309 public void setModules(List modules) { 310 _modules = modules; 311 } 312 313 319 public Module getModule(String uri) { 320 return ModuleUtils.getModule(_modules,uri); 321 } 322 323 324 330 public Date getPubDate() { 331 return _pubDate; 332 } 333 334 340 public void setPubDate(Date pubDate) { 341 _pubDate = pubDate; 342 } 343 344 350 public Date getExpirationDate() { 351 return _expirationDate; 352 } 353 354 360 public void setExpirationDate(Date expirationDate) { 361 _expirationDate = expirationDate; 362 } 363 364 } 365 | Popular Tags |