1 package net.sf.flock;
2
3 import java.net.URL;
4 import java.util.Date;
5
6 /***
7 * @version $Revision$
8 * @author $Author$
9 */
10 class Item implements ItemI {
11
12 private final FeedI origin;
13
14 private String title;
15 private String description;
16 private URL link;
17 private Date creationTime;
18
19 public Item(FeedI origin) {
20 this.origin = origin;
21 }
22
23 /***
24 * @see net.sf.flock.ItemI#getFeed()
25 */
26 public FeedI getOrigin() {
27 return this.origin;
28 }
29
30 /***
31 * @see net.sf.flock.ItemI#getTitle()
32 */
33 public String getTitle() {
34 return this.title;
35 }
36
37 public void setTitle(String title) {
38 this.title = title;
39 }
40
41 /***
42 * @see net.sf.flock.ItemI#getDescription()
43 */
44 public String getDescription() {
45 return this.description;
46 }
47
48 public void setDescription(String description) {
49 this.description = description;
50 }
51
52 /***
53 * @see net.sf.flock.ItemI#getLink()
54 */
55 public URL getLink() {
56 return this.link;
57 }
58
59 public void setLink(URL link) {
60 this.link = link;
61 }
62
63 /***
64 * @see net.sf.flock.ItemI#getCreationTime()
65 */
66 public Date getCreationTime() {
67 return this.creationTime;
68 }
69
70 public void setCreationTime(Date creationTime) {
71 this.creationTime = creationTime;
72 }
73
74 /***
75 * Compare based on article title.
76 *
77 * @see java.lang.Object#equals(java.lang.Object)
78 */
79 public boolean equals(Object obj) {
80 if (!(obj instanceof ItemI)) {
81 return false;
82 }
83 ItemI art = (ItemI)obj;
84 return this.getTitle().equals( art.getTitle() );
85 }
86
87 public String toString() {
88 return "Item["+getTitle()+"]";
89 }
90
91 }
This page was automatically generated by Maven