001: //
002: // Informa -- RSS Library for Java
003: // Copyright (c) 2002, 2003 by Niko Schmuck
004: //
005: // Niko Schmuck
006: // http://sourceforge.net/projects/informa
007: // mailto:niko_schmuck@users.sourceforge.net
008: //
009: // This library is free software.
010: //
011: // You may redistribute it and/or modify it under the terms of the GNU
012: // Lesser General Public License as published by the Free Software Foundation.
013: //
014: // Version 2.1 of the license should be included with this distribution in
015: // the file LICENSE. If the license is not included with this distribution,
016: // you may find a copy at the FSF web site at 'www.gnu.org' or 'www.fsf.org',
017: // or you may write to the Free Software Foundation, 675 Mass Ave, Cambridge,
018: // MA 02139 USA.
019: //
020: // This library is distributed in the hope that it will be useful,
021: // but WITHOUT ANY WARRANTY; without even the implied waranty of
022: // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
023: // Lesser General Public License for more details.
024: //
025:
026: // $Id: Feed.java,v 1.6 2005/09/27 22:17:08 niko_schmuck Exp $
027:
028: package de.nava.informa.impl.basic;
029:
030: import java.net.URL;
031: import java.util.Date;
032:
033: import de.nava.informa.core.ChannelIF;
034: import de.nava.informa.core.FeedIF;
035:
036: /**
037: * In-Memory implementation of the FeedIF interface.
038: *
039: * @author Niko Schmuck
040: */
041: public class Feed implements FeedIF {
042:
043: private static final long serialVersionUID = 1349458681404088401L;
044:
045: private long id;
046: private String title;
047: private String text;
048: private URL location;
049: private URL site;
050: private String contentType;
051: private String copyright;
052: private Date dateFound;
053: private Date lastUpdated;
054: private ChannelIF feed;
055:
056: /**
057: * Default constructor.
058: */
059: public Feed() {
060: this ("No title");
061: }
062:
063: /**
064: * Convinence constrcutor - creates meta data for a preexisting feed.
065: * @param channel
066: */
067: public Feed(ChannelIF channel) {
068: setChannel(channel);
069: setTitle(channel.getTitle());
070: setLocation(channel.getLocation());
071: setSite(channel.getSite());
072: setCopyright(channel.getCopyright());
073: }
074:
075: public Feed(String title) {
076: this .title = title;
077: }
078:
079: public long getId() {
080: return id;
081: }
082:
083: public void setId(long id) {
084: this .id = id;
085: }
086:
087: public String getContentType() {
088: return contentType;
089: }
090:
091: public String getCopyright() {
092: return copyright;
093: }
094:
095: public Date getDateFound() {
096: return dateFound;
097: }
098:
099: public Date getLastUpdated() {
100: return lastUpdated;
101: }
102:
103: public URL getLocation() {
104: return location;
105: }
106:
107: public URL getSite() {
108: return site;
109: }
110:
111: public String getText() {
112: return text;
113: }
114:
115: public String getTitle() {
116: return title;
117: }
118:
119: public void setContentType(String string) {
120: this .contentType = string;
121: }
122:
123: public void setCopyright(String string) {
124: this .copyright = string;
125: }
126:
127: public void setDateFound(Date date) {
128: this .dateFound = date;
129: }
130:
131: public void setLastUpdated(Date date) {
132: this .lastUpdated = date;
133: }
134:
135: public void setLocation(URL location) {
136: this .location = location;
137: }
138:
139: public void setSite(URL site) {
140: this .site = site;
141: }
142:
143: public void setText(String string) {
144: this .text = string;
145: }
146:
147: public void setTitle(String string) {
148: this .title = string;
149: }
150:
151: public ChannelIF getChannel() {
152: return feed;
153: }
154:
155: public void setChannel(ChannelIF channelIF) {
156: feed = channelIF;
157: }
158:
159: }
|