@@ -26,8 +26,15 @@ public class Feed {
|
26 | 26 | //**************************************************************************
|
27 | 27 | //** Constructor
|
28 | 28 | //**************************************************************************
|
29 |
| -/** Creates a new instance of this class using an XML node. */ |
| 29 | +protected Feed(){} |
| 30 | + |
30 | 31 |
|
| 32 | +//************************************************************************** |
| 33 | +//** Constructor |
| 34 | +//************************************************************************** |
| 35 | +/** Creates a new instance of this class using an XML node from an RSS XML |
| 36 | +* document. |
| 37 | +*/ |
31 | 38 | protected Feed(org.w3c.dom.Node node, java.util.HashMap<String, String> namespaces) {
|
32 | 39 | //java.util.ArrayList<Item> items = new java.util.ArrayList<Item>();
|
33 | 40 | NodeList nodeList = node.getChildNodes();
|
@@ -75,26 +82,33 @@ else if (nodeName.equals("ttl")){
|
75 | 82 | catch(Exception e){
|
76 | 83 | }
|
77 | 84 | }
|
78 |
| -} |
| 85 | +} |
79 | 86 | }
|
80 | 87 |
|
81 | 88 | }
|
82 | 89 |
|
| 90 | + |
| 91 | +//************************************************************************** |
| 92 | +//** getTitle |
| 93 | +//************************************************************************** |
83 | 94 | public String getTitle(){ return title; }
|
| 95 | +public void setTitle(String title){ this.title = title; } |
| 96 | + |
| 97 | + |
| 98 | +//************************************************************************** |
| 99 | +//** getDescription |
| 100 | +//************************************************************************** |
84 | 101 | public String getDescription(){ return description; }
|
85 |
| -public java.net.URL getLink(){ return link; } |
86 |
| - |
| 102 | +public void setDescription(String description){ this.description = description; } |
| 103 | +
|
87 | 104 |
|
88 | 105 | //**************************************************************************
|
89 |
| -//** getItems |
| 106 | +//** getLink |
90 | 107 | //**************************************************************************
|
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; } |
92 | 110 |
|
93 |
| -public Item[] getItems(){ |
94 |
| -return items.toArray(new Item[items.size()]); |
95 |
| -} |
96 | 111 |
|
97 |
| - |
98 | 112 | //**************************************************************************
|
99 | 113 | //** getLocation
|
100 | 114 | //**************************************************************************
|
@@ -105,11 +119,26 @@ public Location getLocation(){
|
105 | 119 | return location;
|
106 | 120 | }
|
107 | 121 |
|
| 122 | + |
| 123 | +//************************************************************************** |
| 124 | +//** getLastUpdate |
| 125 | +//************************************************************************** |
108 | 126 | public java.util.Date getLastUpdate(){
|
109 | 127 | return lastUpdate;
|
110 | 128 | }
|
111 | 129 |
|
112 | 130 |
|
| 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 | + |
113 | 142 | //**************************************************************************
|
114 | 143 | //** getRefreshInterval
|
115 | 144 | //**************************************************************************
|
@@ -120,7 +149,11 @@ public java.util.Date getLastUpdate(){
|
120 | 149 | public Integer getRefreshInterval(){
|
121 | 150 | return interval;
|
122 | 151 | }
|
| 152 | + |
123 | 153 |
|
| 154 | +//************************************************************************** |
| 155 | +//** toString |
| 156 | +//************************************************************************** |
124 | 157 | public String toString(){
|
125 | 158 | StringBuffer out = new StringBuffer();
|
126 | 159 | String br = "\r\n";
|
|
0 commit comments