|
Lizzy v1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object christophedelory.rss.media.BaseMedia christophedelory.rss.Item
public class Item
An item may represent a "story" -- much like a story in a newspaper or magazine;
if so its description is a synopsis of the story, and the link points to the full story.
An item may also be complete in itself, if so, the description contains the text (entity-encoded HTML is allowed), and the link and title may be omitted.
All elements of an item are optional, however at least one of title or description must be present.
RSS Media note:
While both media contents and media groups have no limitations on the number of times they can appear,
the general nature of RSS should be preserved:
an item represents a "story".
Simply stated, this is similar to the blog style of syndication.
However, if one is using this module to strictly publish media, there should be one item element for each media object/group.
This is to allow for proper attribution for the origination of the media content through the link element.
It also allows the full benefit of the other RSS elements to be realized.
Constructor Summary | |
---|---|
Item()
|
Method Summary | |
---|---|
void |
addCategory(Category category)
Includes the item in a category. |
void |
addMediaContent(Content mediaContent)
Adds a media content. |
void |
addMediaGroup(Group mediaGroup)
Adds a media group. |
String |
getAuthor()
Returns the email address of the author of the item. |
List<Category> |
getCategories()
Returns a list of one or more item's categories. |
Channel |
getChannel()
Returns the parent channel, if any. |
String |
getComments()
Returns an URL of a page for comments relating to the item. |
String |
getDescription()
Returns the item synopsis. 0.92 allows entity-encoded HTML in the description of an item, to reflect actual practice by bloggers, who are often proficient HTML coders. |
Enclosure |
getEnclosure()
Describes a media object that is attached to the item. |
GUID |
getGuid()
Returns a string that uniquely identifies the item. |
URI |
getLink()
Returns the URL of the item. |
String |
getLinkString()
Returns the URL of the item. |
List<Content> |
getMediaContents()
Returns the list of media contents. |
List<Group> |
getMediaGroups()
Returns the list of media groups. |
Date |
getPubDate()
Indicates when the item was published. |
String |
getPubDateString()
Indicates when the item was published. |
Source |
getSource()
Returns the RSS channel that the item came from. |
String |
getTitle()
Returns the title of the item. |
void |
setAuthor(String author)
Initializes the email address of the author of the item. |
(package private) void |
setChannel(Channel channel)
Initializes the parent channel. |
void |
setComments(String comments)
Initializes an URL of a page for comments relating to the item. |
void |
setDescription(String description)
Initializes the item synopsis. |
void |
setEnclosure(Enclosure enclosure)
Describes a media object that is attached to the item. |
void |
setGuid(GUID guid)
Initializes a string that uniquely identifies the item. |
void |
setLink(URI link)
Initializes the URL of the item. |
void |
setLinkString(String link)
Initializes the URL of the item. |
void |
setPubDate(Date pubDate)
Indicates when the item was published. |
void |
setPubDateString(String pubDate)
Indicates when the item was published. |
void |
setSource(Source source)
Initializes the RSS channel that the item came from. |
void |
setTitle(String title)
Initializes the title of the item. |
Methods inherited from class christophedelory.rss.media.BaseMedia |
---|
addMediaCategory, addMediaCredit, addMediaHash, addMediaRating, addMediaRestriction, addMediaText, addMediaThumbnail, getMediaAdult, getMediaCategories, getMediaCopyright, getMediaCredits, getMediaDescription, getMediaHashes, getMediaKeywords, getMediaPlayer, getMediaRatings, getMediaRestrictions, getMediaTexts, getMediaThumbnails, getMediaTitle, isMediaAdult, setMediaAdult, setMediaAdult, setMediaCopyright, setMediaDescription, setMediaKeywords, setMediaPlayer, setMediaTitle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Item()
Method Detail |
---|
public String getTitle()
null
.setTitle(java.lang.String)
public void setTitle(String title)
title
- the item's title. May be null
.getTitle()
public void setLinkString(String link) throws URISyntaxException
link
- an URL as a string. Shall not be null
.
NullPointerException
- if link
is null
.
URISyntaxException
- if the given string violates RFC 2396, as augmented by the URI
deviations.getLinkString()
,
setLink(java.net.URI)
public String getLinkString()
null
.setLinkString(java.lang.String)
,
getLink()
public void setLink(URI link)
link
- an URL. May be null
.getLink()
,
setLinkString(java.lang.String)
public URI getLink()
null
.setLink(java.net.URI)
,
getLinkString()
public String getDescription()
null
.setDescription(java.lang.String)
public void setDescription(String description)
description
- the item's description. May be null
.getDescription()
public String getAuthor()
null
.setAuthor(java.lang.String)
public void setAuthor(String author)
author
- the author's email. May be null
.getAuthor()
public List<Category> getCategories()
null
.addCategory(christophedelory.rss.Category)
public void addCategory(Category category)
category
- an item's category. Shall not be null
.
NullPointerException
- if category
is null
.getCategories()
public String getComments()
null
.setComments(java.lang.String)
public void setComments(String comments)
comments
- an URL as a string. May be null
.getComments()
public Enclosure getEnclosure()
null
.setEnclosure(christophedelory.rss.Enclosure)
public void setEnclosure(Enclosure enclosure)
enclosure
- a media descriptor. May be null
.getEnclosure()
public GUID getGuid()
null
.setGuid(christophedelory.rss.GUID)
public void setGuid(GUID guid)
guid
- a GUID. May be null
.getGuid()
public void setPubDateString(String pubDate)
pubDate
- a date as a string. Shall not be null
.
NullPointerException
- if pubDate
is null
.getPubDateString()
,
setPubDate(java.util.Date)
public String getPubDateString()
null
.setPubDateString(java.lang.String)
,
getPubDate()
public Date getPubDate()
null
.setPubDate(java.util.Date)
,
getPubDateString()
public void setPubDate(Date pubDate)
pubDate
- a date. May be null
.getPubDate()
,
setPubDateString(java.lang.String)
public Source getSource()
null
.setSource(christophedelory.rss.Source)
public void setSource(Source source)
source
- the item's source. May be null
.getSource()
public void addMediaContent(Content mediaContent)
mediaContent
- a media content. Shall not be null
.
NullPointerException
- if mediaContent
is null
.getMediaContents()
public List<Content> getMediaContents()
null
.addMediaContent(christophedelory.rss.media.Content)
public List<Group> getMediaGroups()
null
.addMediaGroup(christophedelory.rss.media.Group)
public void addMediaGroup(Group mediaGroup)
mediaGroup
- a media group. Shall not be null
.
NullPointerException
- if mediaGroup
is null
.getMediaGroups()
void setChannel(Channel channel)
channel
- the parent channel. May be null
.getChannel()
public Channel getChannel()
null
.
|
© 2008-2009 Christophe Delory | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |