File tree

3 files changed

+279
-56
lines changed

3 files changed

+279
-56
lines changed
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,15 @@ public class Feed {
2626
//**************************************************************************
2727
//** Constructor
2828
//**************************************************************************
29-
/** Creates a new instance of this class using an XML node. */
29+
protected Feed(){}
30+
3031

32+
//**************************************************************************
33+
//** Constructor
34+
//**************************************************************************
35+
/** Creates a new instance of this class using an XML node from an RSS XML
36+
* document.
37+
*/
3138
protected Feed(org.w3c.dom.Node node, java.util.HashMap<String, String> namespaces) {
3239
//java.util.ArrayList<Item> items = new java.util.ArrayList<Item>();
3340
NodeList nodeList = node.getChildNodes();
@@ -75,26 +82,33 @@ else if (nodeName.equals("ttl")){
7582
catch(Exception e){
7683
}
7784
}
78-
}
85+
}
7986
}
8087

8188
}
8289

90+
91+
//**************************************************************************
92+
//** getTitle
93+
//**************************************************************************
8394
public String getTitle(){ return title; }
95+
public void setTitle(String title){ this.title = title; }
96+
97+
98+
//**************************************************************************
99+
//** getDescription
100+
//**************************************************************************
84101
public String getDescription(){ return description; }
85-
public java.net.URL getLink(){ return link; }
86-
102+
public void setDescription(String description){ this.description = description; }
103+
87104

88105
//**************************************************************************
89-
//** getItems
106+
//** getLink
90107
//**************************************************************************
91-
/** Returns a list of items found in an RSS feed. */
108+
public java.net.URL getLink(){ return link; }
109+
public void setLink(java.net.URL link){ this.link = link; }
92110

93-
public Item[] getItems(){
94-
return items.toArray(new Item[items.size()]);
95-
}
96111

97-
98112
//**************************************************************************
99113
//** getLocation
100114
//**************************************************************************
@@ -105,11 +119,26 @@ public Location getLocation(){
105119
return location;
106120
}
107121

122+
123+
//**************************************************************************
124+
//** getLastUpdate
125+
//**************************************************************************
108126
public java.util.Date getLastUpdate(){
109127
return lastUpdate;
110128
}
111129

112130

131+
//**************************************************************************
132+
//** getItems
133+
//**************************************************************************
134+
/** Returns a list of items found in an RSS feed.
135+
*/
136+
public Item[] getItems(){
137+
return items.toArray(new Item[items.size()]);
138+
}
139+
140+
141+
113142
//**************************************************************************
114143
//** getRefreshInterval
115144
//**************************************************************************
@@ -120,7 +149,11 @@ public java.util.Date getLastUpdate(){
120149
public Integer getRefreshInterval(){
121150
return interval;
122151
}
152+
123153

154+
//**************************************************************************
155+
//** toString
156+
//**************************************************************************
124157
public String toString(){
125158
StringBuffer out = new StringBuffer();
126159
String br = "\r\n";

0 commit comments

Comments
 (0)