Class RSSItem
- java.lang.Object
-
- org.silverpeas.components.rssaggregator.model.RSSItem
-
- All Implemented Interfaces:
Serializable,Comparable<RSSItem>
public class RSSItem extends Object implements Serializable, Comparable<RSSItem>
Use RSSItem to encapsulate RSS news or ATOM data. It allows us having light JSON transfer data. Users who want more news about RSS only need to click on the items link.- Author:
- ebonnet
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(RSSItem other)Compares this RSS item with the specified one by their respective date.booleanequals(Object o)StringgetChannelDescription()LonggetChannelId()com.rometools.rome.feed.synd.SyndImagegetChannelImage()StringgetChannelTitle()StringgetChannelUrl()LonggetExternalChannelId()StringgetItemComments()DategetItemDate()StringgetItemDescription()StringgetItemLink()StringgetItemTitle()intgetNbDisplayedItems()inthashCode()
-
-
-
Constructor Detail
-
RSSItem
public RSSItem(com.rometools.rome.feed.synd.SyndEntry item, com.rometools.rome.feed.synd.SyndFeed feed, SPChannel spChannel)Default RSSItem constructor which encapsulate Item and Channel from informa API- Parameters:
item-feed-
-
-
Method Detail
-
getItemTitle
public String getItemTitle()
- Returns:
- the itemTitle
-
getItemDescription
public String getItemDescription()
- Returns:
- the itemDescription
-
getItemLink
public String getItemLink()
- Returns:
- the itemURL
-
getItemDate
public Date getItemDate()
- Returns:
- the itemDate
-
getItemComments
public String getItemComments()
- Returns:
- the itemComments
-
getExternalChannelId
public Long getExternalChannelId()
- Returns:
- the externalChannelId
-
getChannelTitle
public String getChannelTitle()
- Returns:
- the channelTitle
-
getChannelDescription
public String getChannelDescription()
- Returns:
- the channelDescription
-
getChannelImage
public com.rometools.rome.feed.synd.SyndImage getChannelImage()
- Returns:
- the image
-
getChannelId
public Long getChannelId()
- Returns:
- the channelId
-
getChannelUrl
public String getChannelUrl()
- Returns:
- the channelUrl
-
getNbDisplayedItems
public int getNbDisplayedItems()
- Returns:
- the nbDisplayedItems
-
compareTo
public int compareTo(RSSItem other)
Compares this RSS item with the specified one by their respective date. So, this method breaks the property(x.compareTo(y)==0) == (x.equals(y))- Specified by:
compareToin interfaceComparable<RSSItem>- Parameters:
other- the other RSS item.- Returns:
- the comparing between their date.
-
-