001: /*
002: * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com>
003: * Distributed under the terms of either:
004: * - the common development and distribution license (CDDL), v1.0; or
005: * - the GNU Lesser General Public License, v2.1 or later
006: * $Id: Feed.java 3634 2007-01-08 21:42:24Z gbevin $
007: */
008: package com.uwyn.rife.feed;
009:
010: import java.util.Date;
011: import java.util.Map;
012:
013: /**
014: * A bean representing a feed, or rather a feed's metadata.
015: * <p>A <code>Feed</code> is a set of metadata that helps to describe a feed
016: * for the user and/or the engine processing the feed.
017: *
018: * @author JR Boyens (jboyens[remove] at uwyn dot com)
019: * @author Geert Bevin (gbevin[remove] at uwyn dot com)
020: * @version $Revision: 3634 $
021: * @see com.uwyn.rife.feed.Entry
022: * @since 1.0
023: */
024: public class Feed {
025: private String mTitle = null;
026: private String mLink = null;
027: private String mDescription = null;
028: private String mLanguage = null;
029: private String mCopyright = null;
030: private Date mPublishedDate = null;
031: private String mAuthor = null;
032: private Map<String, String> mNamespaces = null;
033:
034: public Feed author(String author) {
035: setAuthor(author);
036: return this ;
037: }
038:
039: public String getAuthor() {
040: return mAuthor;
041: }
042:
043: public void setAuthor(String author) {
044: mAuthor = author;
045: }
046:
047: public Feed copyright(String copyright) {
048: setCopyright(copyright);
049: return this ;
050: }
051:
052: public String getCopyright() {
053: return mCopyright;
054: }
055:
056: public void setCopyright(String copyright) {
057: mCopyright = copyright;
058: }
059:
060: public Feed description(String description) {
061: setDescription(description);
062: return this ;
063: }
064:
065: public String getDescription() {
066: return mDescription;
067: }
068:
069: public void setDescription(String description) {
070: mDescription = description;
071: }
072:
073: public Feed language(String language) {
074: setLanguage(language);
075: return this ;
076: }
077:
078: public String getLanguage() {
079: return mLanguage;
080: }
081:
082: public void setLanguage(String language) {
083: mLanguage = language;
084: }
085:
086: public Feed link(String link) {
087: setLink(link);
088: return this ;
089: }
090:
091: public String getLink() {
092: return mLink;
093: }
094:
095: public void setLink(String link) {
096: mLink = link;
097: }
098:
099: public Feed publishedDate(Date publishedDate) {
100: setPublishedDate(publishedDate);
101: return this ;
102: }
103:
104: public Date getPublishedDate() {
105: return mPublishedDate;
106: }
107:
108: public void setPublishedDate(Date publishedDate) {
109: mPublishedDate = publishedDate;
110: }
111:
112: public Feed title(String title) {
113: setTitle(title);
114: return this ;
115: }
116:
117: public String getTitle() {
118: return mTitle;
119: }
120:
121: public void setTitle(String title) {
122: mTitle = title;
123: }
124:
125: public Map<String, String> getNamespaces() {
126: return mNamespaces;
127: }
128:
129: public void setNamespaces(Map<String, String> namespaces) {
130: mNamespaces = namespaces;
131: }
132:
133: public Feed namespaces(Map<String, String> namespaces) {
134: setNamespaces(namespaces);
135: return this;
136: }
137: }
|