public class RssFeed extends Object implements RssEntity, Serializable, Cloneable
RssEntry
objects.Modifier and Type | Field and Description |
---|---|
protected List<RssEntry> |
entries
The list of entries.
|
protected URL |
feedLink
The feed's link URL (set lazily in
getLink() . |
protected URL |
iconLink
The feed site's favicon URL (set lazily in
getIconLink() . |
protected URL |
imageLink
The feed's image URL (set lazily in
getImageLink() . |
protected com.sun.syndication.feed.synd.SyndFeed |
nativeFeed
The raw ROME feed.
|
Constructor and Description |
---|
RssFeed()
Creates a new RssFeed object that is completely empty.
|
RssFeed(RssFeed existingFeed)
Creates a new RssFeed object by copying from an existing one.
|
RssFeed(String url)
Creates a new RssFeed object by reading from the given URL.
|
RssFeed(URL url)
Creates a new RssFeed object by reading from the given URL.
|
Modifier and Type | Method and Description |
---|---|
void |
addEntry(RssEntry entry)
Add a new entry to this feed.
|
Object |
clone()
Clone this object.
|
protected void |
convertEntryList()
|
String |
getAuthor()
Get this feed's author.
|
List<String> |
getAuthors()
Get this feed's authors.
|
Date |
getDate()
Get this feed's publication date.
|
String |
getDescription()
Get this feed's description.
|
List<RssEntry> |
getEntries()
Get this feed's entries.
|
URL |
getIconLink()
Get the link for the site icon belonging to this feed's home site.
|
URL |
getImageLink()
Get the link for this feed's image as a URL.
|
URL |
getLink()
Get the link (as a URL) where this feed is officially published.
|
URL |
getLoadedFromLink()
Get the link as a URL where this feed was loaded from.
|
String |
getTitle()
Get this feed's title.
|
protected static com.sun.syndication.feed.synd.SyndFeed |
readFeed(String url)
Create a ROME feed by reading from the given URL.
|
protected static com.sun.syndication.feed.synd.SyndFeed |
readFeed(URL url)
Create a ROME feed by reading from the given URL.
|
void |
setAuthor(String author)
Set this feed's author.
|
void |
setAuthors(List<String> authors)
Set this feed's authors.
|
void |
setDate(Date date)
Set this feed's publication date.
|
void |
setDescription(String description)
Set this feed's description.
|
void |
setEntries(List<RssEntry> entries)
Set this feed's entries.
|
void |
setIconLink(URL link)
Set the link for the site icon belonging to this feed's home site.
|
void |
setImageLink(URL link)
Set this link for this feed's image.
|
void |
setLink(URL link)
Set this feed's publication link.
|
void |
setLoadedFromLink(URL link)
Set the value this feed believes it was loaded from (normally
set by the constructor).
|
void |
setTitle(String title)
Set this feed's title.
|
String |
toString()
Generate a printable version of this feed.
|
protected com.sun.syndication.feed.synd.SyndFeed nativeFeed
protected URL imageLink
getImageLink()
.protected URL iconLink
getIconLink()
.public RssFeed()
public RssFeed(String url)
url
- The URL to read from, as a stringpublic RssFeed(URL url)
url
- The URL to read from, as a stringpublic RssFeed(RssFeed existingFeed)
existingFeed
- The feed to copypublic String getAuthor()
public void setAuthor(String author)
public List<String> getAuthors()
getAuthors
in interface RssEntity
public void setAuthors(List<String> authors)
setAuthors
in interface RssEntity
authors
- A list of this feed's authorspublic Date getDate()
public void setDate(Date date)
public String getDescription()
getDescription
in interface RssEntity
public void setDescription(String description)
setDescription
in interface RssEntity
description
- The new descriptionpublic void addEntry(RssEntry entry)
entry
- The new entry to addpublic void setEntries(List<RssEntry> entries)
entries
- This feed's entriespublic URL getIconLink()
public void setIconLink(URL link)
link
- The new URL to usepublic URL getImageLink()
public void setImageLink(URL link)
link
- The new URL to usepublic URL getLoadedFromLink()
public void setLoadedFromLink(URL link)
link
- The new URL to usepublic URL getLink()
public void setLink(URL link)
public String getTitle()
public void setTitle(String title)
public Object clone()
public String toString()
protected void convertEntryList()
protected static com.sun.syndication.feed.synd.SyndFeed readFeed(String url)
url
- The feed URL to read fromprotected static com.sun.syndication.feed.synd.SyndFeed readFeed(URL url)
url
- The feed URL to read from