|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.clapper.curn.parser.RSSElement
public abstract class RSSElement
Abstract parent class of RSSItem and RSSChannel,
containing various shared methods.
RSSParser,
RSSChannel,
RSSItem| Constructor Summary | |
|---|---|
protected |
RSSElement()
Default constructor |
| Method Summary | |
|---|---|
abstract void |
addAuthor(java.lang.String author)
Add to the element's author list. |
abstract void |
clearAuthors()
Clear the authors list. |
java.lang.String |
getAuthor()
Get the item's author. |
abstract java.util.Collection<java.lang.String> |
getAuthors()
Get the item's author list. |
RSSLink |
getLink(RSSLink.Type linkType)
Get the first link with the specified link type. |
RSSLink |
getLink(java.lang.String mimeType)
Get the first link with the specified MIME type. |
RSSLink |
getLink(java.lang.String mimeType,
RSSLink.Type... linkTypes)
Get the link with a specific MIME type and one of a set of link types. |
abstract java.util.Collection<RSSLink> |
getLinks()
Get the element's list of published links (its URLs). |
RSSLink |
getLinkWithFallback(java.lang.String mimeType)
Get the first link with the specified MIME type. |
RSSLink |
getURL()
Get the URL associated with this item. |
void |
setAuthor(java.lang.String newAuthor)
Set the item's author. |
void |
setAuthors(java.util.Collection<java.lang.String> newAuthors)
Set the item's list of authors to the specified Collection. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected RSSElement()
| Method Detail |
|---|
public final java.lang.String getAuthor()
getAuthors() method and combines the results into a comma-delimited
string.
setAuthor(java.lang.String),
getAuthors()public final void setAuthor(java.lang.String newAuthor)
addAuthor(java.lang.String). You're better off calling
addAuthor(java.lang.String) directly, since some sites support multiple
authors for a feed item.
newAuthor - the author, or null if not availablesetAuthors(java.util.Collection) public final void setAuthors(java.util.Collection<java.lang.String> newAuthors)
addAuthor(java.lang.String) for every string in the Collection.
newAuthors - the author, or null if not availableaddAuthor(java.lang.String),
getAuthor(),
clearAuthors()
public final RSSLink getLink(java.lang.String mimeType,
RSSLink.Type... linkTypes)
mimeType - the desired MIME typelinkTypes - one or more link types that are acceptable
public final RSSLink getLink(RSSLink.Type linkType)
linkType - the link type
public final RSSLink getLink(java.lang.String mimeType)
mimeType - the MIME type
public final RSSLink getLinkWithFallback(java.lang.String mimeType)
SELF link if not found. Fall back to the
first available link if the SELF link is not found.
mimeType - the MIME type
public final RSSLink getURL()
SELF link. If that fails, it looks
for the first ALTERNATE link.
RSSLink for the URL, or null if it can't be foundpublic abstract java.util.Collection<RSSLink> getLinks()
RSSLink object.
public abstract java.util.Collection<java.lang.String> getAuthors()
addAuthor(java.lang.String),
clearAuthors(),
setAuthor(java.lang.String),
getAuthor()public abstract void addAuthor(java.lang.String author)
author - another author string to addgetAuthors(),
clearAuthors(),
setAuthor(java.lang.String),
getAuthor()public abstract void clearAuthors()
getAuthors(),
addAuthor(java.lang.String),
setAuthor(java.lang.String),
getAuthor()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||