org.clapper.curn.parser.rome
Class RSSItemAdapter

java.lang.Object
  extended by org.clapper.curn.parser.RSSElement
      extended by org.clapper.curn.parser.RSSItem
          extended by org.clapper.curn.parser.rome.RSSItemAdapter
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable

public class RSSItemAdapter
extends RSSItem

This class implements the RSSItem interface and defines an adapter for the Rome RSS Parser's SyndEntry type.

Version:
$Revision: 6479 $
See Also:
RSSParserFactory, RSSParser, RSSItem, RSSItemAdapter

Field Summary
 
Fields inherited from class org.clapper.curn.parser.RSSItem
DEFAULT_CONTENT_TYPE, NO_SUMMARY_LIMIT
 
Method Summary
 void addAuthor(java.lang.String author)
          Add to the item's author list.
 void clearAuthors()
          Clear the authors list.
 java.util.Collection<java.lang.String> getAuthors()
          Get the item's author list.
 java.util.Collection<java.lang.String> getCategories()
          Get the categories the item belongs to.
 java.lang.String getID()
          Get the item's ID field, if any.
 java.util.Collection<RSSLink> getLinks()
          Get the item's published links.
 RSSChannel getParentChannel()
          Get the parent Channel object.
 java.util.Date getPublicationDate()
          Get the item's publication date.
 java.lang.String getSummary()
          Get the item's summary.
 java.lang.String getTitle()
          Get the item's title
 RSSItem newInstance(RSSChannel channel)
          Create a new, empty instance of the underlying concrete class.
 void setCategories(java.util.Collection<java.lang.String> categories)
          Set the categories the item belongs to.
 void setID(java.lang.String id)
          Set the item's ID field, if any.
 void setLinks(java.util.Collection<RSSLink> links)
          Set the item's published links.
 void setPublicationDate(java.util.Date date)
          Set the item's publication date.
 void setSummary(java.lang.String newSummary)
          Set the item's summary (also sometimes called the description or synopsis).
 void setTitle(java.lang.String newTitle)
          Set the item's title
 
Methods inherited from class org.clapper.curn.parser.RSSItem
clearContent, clone, compareTo, equals, getContent, getFirstContentOfType, hashCode, makeCopy, setContent, toString
 
Methods inherited from class org.clapper.curn.parser.RSSElement
getAuthor, getLink, getLink, getLink, getLinkWithFallback, getURL, setAuthor, setAuthors
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

newInstance

public RSSItem newInstance(RSSChannel channel)
Create a new, empty instance of the underlying concrete class.

Specified by:
newInstance in class RSSItem
Parameters:
channel - the parent channel
Returns:
the new instance

getParentChannel

public RSSChannel getParentChannel()
Get the parent Channel object.

Specified by:
getParentChannel in class RSSItem
Returns:
the parent Channel object

getTitle

public java.lang.String getTitle()
Get the item's title

Specified by:
getTitle in class RSSItem
Returns:
the item's title, or null if there isn't one
See Also:
setTitle(java.lang.String)

setTitle

public void setTitle(java.lang.String newTitle)
Set the item's title

Specified by:
setTitle in class RSSItem
Parameters:
newTitle - the item's title, or null if there isn't one
See Also:
getTitle()

getLinks

public final java.util.Collection<RSSLink> getLinks()
Get the item's published links.

Specified by:
getLinks in class RSSItem
Returns:
the collection of links, or an empty collection
See Also:
RSSElement.getLink(java.lang.String, org.clapper.curn.parser.RSSLink.Type...)

setLinks

public void setLinks(java.util.Collection<RSSLink> links)
Set the item's published links.

Specified by:
setLinks in class RSSItem
Parameters:
links - the collection of links, or an empty collection (or null)
See Also:
getLinks()

getSummary

public java.lang.String getSummary()
Get the item's summary.

Specified by:
getSummary in class RSSItem
Returns:
the summary, or null if not available
See Also:
setSummary(java.lang.String)

setSummary

public void setSummary(java.lang.String newSummary)
Set the item's summary (also sometimes called the description or synopsis).

Specified by:
setSummary in class RSSItem
Parameters:
newSummary - the summary, or null if not available
See Also:
getSummary()

getAuthors

public java.util.Collection<java.lang.String> getAuthors()
Get the item's author list.

Specified by:
getAuthors in class RSSItem
Returns:
the authors, or null (or an empty Collection) if not available
See Also:
addAuthor(java.lang.String), clearAuthors()

addAuthor

public void addAuthor(java.lang.String author)
Add to the item's author list.

Specified by:
addAuthor in class RSSItem
Parameters:
author - another author string to add
See Also:
getAuthors(), clearAuthors()

clearAuthors

public void clearAuthors()
Clear the authors list.

Specified by:
clearAuthors in class RSSItem
See Also:
getAuthors(), addAuthor(java.lang.String)

getCategories

public java.util.Collection<java.lang.String> getCategories()
Get the categories the item belongs to.

Specified by:
getCategories in class RSSItem
Returns:
a Collection of category strings (String objects) or null if not applicable
See Also:
RSSItem.setCategories(java.util.Collection)

setCategories

public void setCategories(java.util.Collection<java.lang.String> categories)
Set the categories the item belongs to.

Specified by:
setCategories in class RSSItem
Parameters:
categories - a Collection of category strings or null if not applicable
See Also:
getCategories()

getPublicationDate

public java.util.Date getPublicationDate()
Get the item's publication date.

Specified by:
getPublicationDate in class RSSItem
Returns:
the date, or null if not available
See Also:
RSSItem.getPublicationDate()

setPublicationDate

public void setPublicationDate(java.util.Date date)
Set the item's publication date.

Specified by:
setPublicationDate in class RSSItem
See Also:
getPublicationDate()

getID

public java.lang.String getID()
Get the item's ID field, if any.

Specified by:
getID in class RSSItem
Returns:
the ID field, or null if not set
See Also:
RSSItem.setID(java.lang.String)

setID

public void setID(java.lang.String id)
Set the item's ID field, if any.

Specified by:
setID in class RSSItem
Parameters:
id - the ID field, or null


Copyright © 2004-2006 Brian M. Clapper. All Rights Reserved.