KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > de > nava > informa > impl > basic > Feed


1 //
2
// Informa -- RSS Library for Java
3
// Copyright (c) 2002, 2003 by Niko Schmuck
4
//
5
// Niko Schmuck
6
// http://sourceforge.net/projects/informa
7
// mailto:niko_schmuck@users.sourceforge.net
8
//
9
// This library is free software.
10
//
11
// You may redistribute it and/or modify it under the terms of the GNU
12
// Lesser General Public License as published by the Free Software Foundation.
13
//
14
// Version 2.1 of the license should be included with this distribution in
15
// the file LICENSE. If the license is not included with this distribution,
16
// you may find a copy at the FSF web site at 'www.gnu.org' or 'www.fsf.org',
17
// or you may write to the Free Software Foundation, 675 Mass Ave, Cambridge,
18
// MA 02139 USA.
19
//
20
// This library is distributed in the hope that it will be useful,
21
// but WITHOUT ANY WARRANTY; without even the implied waranty of
22
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23
// Lesser General Public License for more details.
24
//
25

26
27 // $Id: Feed.java,v 1.5 2004/06/28 19:33:43 niko_schmuck Exp $
28

29 package de.nava.informa.impl.basic;
30
31 import java.io.Serializable JavaDoc;
32 import java.net.URL JavaDoc;
33 import java.util.Date JavaDoc;
34
35 import de.nava.informa.core.ChannelIF;
36 import de.nava.informa.core.FeedIF;
37
38 /**
39  * In-Memory implementation of the FeedIF interface.
40  *
41  * @author Niko Schmuck
42  */

43 public class Feed implements FeedIF, Serializable JavaDoc {
44
45   private String JavaDoc title;
46   private String JavaDoc text;
47   private URL JavaDoc location;
48   private URL JavaDoc site;
49   private String JavaDoc contentType;
50   private String JavaDoc copyright;
51   private Date JavaDoc dateFound;
52   private Date JavaDoc lastUpdated;
53   private ChannelIF feed;
54
55   public Feed() {
56     this("No title");
57   }
58
59   /**
60    * Convinence constrcutor - creates meta data for a preexisting feed.
61    * @param channel
62    */

63   public Feed(ChannelIF channel)
64   {
65     setChannel(channel);
66     setTitle(channel.getTitle());
67     setLocation(channel.getLocation());
68     setSite(channel.getSite());
69     setCopyright(channel.getCopyright());
70   }
71   
72   public Feed(String JavaDoc title) {
73     this.title = title;
74   }
75
76   public String JavaDoc getContentType() {
77     return contentType;
78   }
79
80   public String JavaDoc getCopyright() {
81     return copyright;
82   }
83
84   public Date JavaDoc getDateFound() {
85     return dateFound;
86   }
87
88   public Date JavaDoc getLastUpdated() {
89     return lastUpdated;
90   }
91
92   public URL JavaDoc getLocation() {
93     return location;
94   }
95
96   public URL JavaDoc getSite() {
97     return site;
98   }
99
100   public String JavaDoc getText() {
101     return text;
102   }
103
104   public String JavaDoc getTitle() {
105     return title;
106   }
107
108   public void setContentType(String JavaDoc string) {
109     this.contentType = string;
110   }
111
112   public void setCopyright(String JavaDoc string) {
113     this.copyright = string;
114   }
115
116   public void setDateFound(Date JavaDoc date) {
117     this.dateFound = date;
118   }
119
120   public void setLastUpdated(Date JavaDoc date) {
121     this.lastUpdated = date;
122   }
123
124   public void setLocation(URL JavaDoc location) {
125     this.location = location;
126   }
127
128   public void setSite(URL JavaDoc site) {
129     this.site = site;
130   }
131
132   public void setText(String JavaDoc string) {
133     this.text = string;
134   }
135
136   public void setTitle(String JavaDoc string) {
137     this.title = string;
138   }
139
140   public ChannelIF getChannel() {
141     return feed;
142   }
143
144   public void setChannel(ChannelIF channelIF) {
145     feed = channelIF;
146   }
147
148 }
149
Popular Tags