| java.lang.Object org.clapper.curn.FeedCacheEntry
FeedCacheEntry | public class FeedCacheEntry (Code) | | Defines the contents of a cache entry. There is one cache entry
per feed item.
See Also: CurnConfig See Also: FeedInfo version: $Revision: 7041 $ |
Constructor Summary | |
public | FeedCacheEntry(String entryID, URL channelURL, URL entryURL, Date pubDate, long timestamp) Construct a new FeedCacheEntry.
Parameters: entryID - the entry's unique ID. Parameters: channelURL - the main URL for the site's RSS feed Parameters: entryURL - the URL to be cached. |
Method Summary | |
public URL | getChannelURL() Get the main (channel) RSS URL for the site. | public URL | getEntryURL() Get the URL for this entry. | public Date | getPublicationDate() Get the publication date associated with the cached item. | public long | getTimestamp() Get the timestamp associated with this entry. | public String | getUniqueID() Get the unique ID (i.e., cache key) associated with this item. | public boolean | isChannelEntry() Determine whether this entry is a channel entry or not. | public boolean | isSticky() Determine whether this entry is "sticky" (i.e., should be shown even
though it's already been seen. | public void | setSticky(boolean sticky) Set or clear the "sticky" flag. | public void | setTimestamp(long timestamp) Set the timestamp associated with this entry. |
FeedCacheEntry | public FeedCacheEntry(String entryID, URL channelURL, URL entryURL, Date pubDate, long timestamp)(Code) | | Construct a new FeedCacheEntry.
Parameters: entryID - the entry's unique ID. Parameters: channelURL - the main URL for the site's RSS feed Parameters: entryURL - the URL to be cached. May be an individual item URL,or the channel URL (again). Parameters: pubDate - the publication date of the item, or null if unknown Parameters: timestamp - the timestamp (milliseconds) to be cached |
getChannelURL | public URL getChannelURL()(Code) | | Get the main (channel) RSS URL for the site. This URL is the main
feed URL, not the item's specific URL.
the site's main RSS URL |
getEntryURL | public URL getEntryURL()(Code) | | Get the URL for this entry.
the entry URL |
getPublicationDate | public Date getPublicationDate()(Code) | | Get the publication date associated with the cached item. This value
is typically from within the parsed RSS item.
the publication date, or null if not known |
getTimestamp | public long getTimestamp()(Code) | | Get the timestamp associated with this entry. The timestamp
represents the last time (in milliseconds) that the URL was read.
the timestamp |
getUniqueID | public String getUniqueID()(Code) | | Get the unique ID (i.e., cache key) associated with this item.
the unique ID |
isChannelEntry | public boolean isChannelEntry()(Code) | | Determine whether this entry is a channel entry or not. A channel
entry has the same entry URL and channel URL. This method is really
just convenient shorthand for:
entry.getChannelURL().sameFile(entry.getEntryURL())
true if this entry is a channel (a.k.a., feed) entry,false if it is an item entry |
isSticky | public boolean isSticky()(Code) | | Determine whether this entry is "sticky" (i.e., should be shown even
though it's already been seen.
true if the item is marked "sticky",false if not |
setSticky | public void setSticky(boolean sticky)(Code) | | Set or clear the "sticky" flag. If an item is marked sticky, it will
be shown even though it's already in the cache. NOTE: Stickiness is
not automatically persisted to the disk store. It's intended to be
calculated at runtime, based on other criteria.
Parameters: sticky - whether or not the entry is to be marked sticky |
setTimestamp | public void setTimestamp(long timestamp)(Code) | | Set the timestamp associated with this entry. The timestamp
represents the last time (in milliseconds) that the URL was read.
Parameters: timestamp - the timestamp |
|
|