CS 1705 Library

cs1705.web
Class RssEntry

java.lang.Object
  extended by cs1705.web.RssEntry
All Implemented Interfaces:
RssEntity, Serializable, Cloneable

public class RssEntry
extends Object
implements RssEntity, Serializable, Cloneable

This class represents one entry in a syndication feed, like an RssFeed.

Version:
2007.09.01
Author:
Stephen Edwards
See Also:
Serialized Form

Constructor Summary
RssEntry()
          Creates a new RssEntry object that is completely blank.
RssEntry(RssEntry existingEntry)
          Creates a new RssEntry object as a copy of an existing entry.
 
Method Summary
 Object clone()
          Clone this object.
 String getAuthor()
          Get this entry's author.
 List<String> getAuthors()
          Get this entry's authors.
 Date getDate()
          Get this entry's publication date.
 String getDescription()
          Get this entry's description.
 String getDescriptionType()
          Get the MIME type of the description (like "text/html" or "text/plain").
 URL getLink()
          Get this entry's link as a URL.
 String getTitle()
          Get this entry's title.
 void setAuthor(String author)
          Set this entry's author.
 void setAuthors(List<String> authors)
          Set this entry's authors.
 void setDate(Date date)
          Set this entry's publication date.
 void setDescription(String description)
          Set this entry's description.
 void setDescriptionType(String mimeType)
          Set the MIME type for this entry's description.
 void setLink(URL link)
          Set this entry's link.
 void setTitle(String title)
          Set this entry's title.
 String toString()
          Generate a printable version of this entry.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RssEntry

public RssEntry()
Creates a new RssEntry object that is completely blank.


RssEntry

public RssEntry(RssEntry existingEntry)
Creates a new RssEntry object as a copy of an existing entry. Subclasses should override this constructor if they add their own data, so that their internal subclass data gets initialized properly.

Parameters:
existingEntry - The entry to copy
Method Detail

getAuthor

public String getAuthor()
Get this entry's author. If there are multiple authors, this method returns the first one.

Specified by:
getAuthor in interface RssEntity
Returns:
This entry's author

setAuthor

public void setAuthor(String author)
Set this entry's author.

Specified by:
setAuthor in interface RssEntity
Parameters:
author - This entry's author

getAuthors

public List<String> getAuthors()
Get this entry's authors.

Specified by:
getAuthors in interface RssEntity
Returns:
This entry's authors

setAuthors

public void setAuthors(List<String> authors)
Set this entry's authors.

Specified by:
setAuthors in interface RssEntity
Parameters:
authors - A list of this entry's authors

getDate

public Date getDate()
Get this entry's publication date.

Specified by:
getDate in interface RssEntity
Returns:
This entry's date

setDate

public void setDate(Date date)
Set this entry's publication date.

Specified by:
setDate in interface RssEntity
Parameters:
date - This entry's date

getDescription

public String getDescription()
Get this entry's description.

Specified by:
getDescription in interface RssEntity
Returns:
This entry's description

setDescription

public void setDescription(String description)
Set this entry's description.

Specified by:
setDescription in interface RssEntity
Parameters:
description - The new description

getDescriptionType

public String getDescriptionType()
Get the MIME type of the description (like "text/html" or "text/plain").

Returns:
The description's MIME type

setDescriptionType

public void setDescriptionType(String mimeType)
Set the MIME type for this entry's description. The default (if unset) is "text/plain".

Parameters:
mimeType - The new MIME type

getLink

public URL getLink()
Get this entry's link as a URL.

Specified by:
getLink in interface RssEntity
Returns:
The link's URL, or null if there is none

setLink

public void setLink(URL link)
Set this entry's link.

Specified by:
setLink in interface RssEntity
Parameters:
link - The new URL to use

getTitle

public String getTitle()
Get this entry's title.

Specified by:
getTitle in interface RssEntity
Returns:
The entry's title

setTitle

public void setTitle(String title)
Set this entry's title.

Specified by:
setTitle in interface RssEntity
Parameters:
title - The entry's title

clone

public Object clone()
Clone this object.

Overrides:
clone in class Object
Returns:
a copy of this object

toString

public String toString()
Generate a printable version of this entry.

Overrides:
toString in class Object
Returns:
the string representation of this object

Last updated: Wed, Apr 1, 2009 • 12:29 AM EDT

Copyright © 2009 Virginia Tech.