com.sonettic.mrss.elements
Class MRSSItem

java.lang.Object
  extended by com.sonettic.mrss.elements.MRSSItem

public class MRSSItem
extends java.lang.Object

Class representing item node of the Sonettic playlist MRSS feed.

Author:
Vasyl Skrypij

Constructor Summary
MRSSItem(java.lang.String id, java.lang.String url)
          Public constructor
 
Method Summary
 void addContent(MRSSMediaContent content)
          Add media content to this item.
 void addContents(java.util.Collection<MRSSMediaContent> contents)
          Appends all of the media contents in the collection to this item.
 void addNode(MRSSNode node)
          Adding any optional node (like "keywords", "description" etc.) that don't represented by class to current item.
protected  org.dom4j.Element build(org.dom4j.Element element)
           
 MRSSAds getAds()
          Getter for ads node of this item.
 java.util.List<MRSSMediaContent> getContents()
          Get media contents of this item.
 java.lang.String getId()
          Getter for unique id.
 java.util.List<MRSSNode> getNodes()
          Get MRSSNodes of this channel.
 MRSSPoster getPoster()
          Getter for poster node of this item.
 void setAds(MRSSAds ads)
          Setter for ads node of this item.
 void setId(java.lang.String id)
          Set unique id.
 void setPoster(MRSSPoster poster)
          Setter for poster node of this item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MRSSItem

public MRSSItem(java.lang.String id,
                java.lang.String url)
Public constructor

Parameters:
id - unique id
url - url of first MRSSMediaContent object.
Method Detail

getNodes

public java.util.List<MRSSNode> getNodes()
Get MRSSNodes of this channel.

Returns:
list of nodes.

addNode

public void addNode(MRSSNode node)
Adding any optional node (like "keywords", "description" etc.) that don't represented by class to current item.

Parameters:
node - new node

getContents

public java.util.List<MRSSMediaContent> getContents()
Get media contents of this item.

Returns:
list of nodes.

addContents

public void addContents(java.util.Collection<MRSSMediaContent> contents)
Appends all of the media contents in the collection to this item.

Parameters:
contents - collection of contents.

addContent

public void addContent(MRSSMediaContent content)
Add media content to this item.

Parameters:
content - media content

setId

public void setId(java.lang.String id)
Set unique id.

Parameters:
id - unique id.

getId

public java.lang.String getId()
Getter for unique id.

Returns:
unique id

getAds

public MRSSAds getAds()
Getter for ads node of this item.

Returns:
ads, or null, if item has not ads.

setAds

public void setAds(MRSSAds ads)
Setter for ads node of this item.

Parameters:
ads - MRSSAds object.

getPoster

public MRSSPoster getPoster()
Getter for poster node of this item.

Returns:
poster, or null, if channel has not poster.

setPoster

public void setPoster(MRSSPoster poster)
Setter for poster node of this item.

Parameters:
poster - MRSSPoster object.

build

protected org.dom4j.Element build(org.dom4j.Element element)