Groovy Documentation

org.jdesktop.swingx.ws.yahoo.rss
[Java] Class YahooNews

java.lang.Object
  org.jdesktop.beans.AbstractBean
      org.jdesktop.swingx.ws.yahoo.rss.YahooRSS
          org.jdesktop.swingx.ws.yahoo.rss.YahooNews

public class YahooNews
extends YahooRSS

A simple JavaBean encapsulating access to the Yahoo! News RSS feeds. To use this class, you simply need to set the feedName property and call the readFeed method. readFeed may be a long running operation, so be sure to wrap access to it in some way, such as with SwingWorker or BackgroundWorker.

There are many valid feedNames, and the list is ever growing. Some common popular names are listed as public static Strings in this class. See Yahoo! for more information about specific feeds that are available. By default, the TOP_STORIES feed is used.

Authors:
rbair


Field Summary
static String BUSINESS

static String BUSINESS_ECONOMY

static String BUSINESS_STOCKS

static String ENTERTAINMENT

static String HIGHEST_RATED

static String MOST_EMAILED

static String MOST_VIEWED

static String MOVIES

static String MUSIC

static String OPINION_EDITORIAL

static String SPORTS

static String TECH

static String TOP_STORIES

static String US

static String WORLD

private String feedName

The name of the feed to read

 
Constructor Summary
YahooNews()

Creates a new instance of YahooNews

 
Method Summary
String getFeedName()

Returns:
the name of the Yahoo!

protected Map getParameters()

@inheritDoc

protected String getUrlPrefix()

@inheritDoc

void setFeedName(String feedName)

Sets the name of the feed to read from Yahoo!

 
Methods inherited from class YahooRSS
constructUrl, getParameters, getUrlPrefix, readFeed
 
Methods inherited from class org.jdesktop.beans.AbstractBean
org.jdesktop.beans.AbstractBean#clone(), org.jdesktop.beans.AbstractBean#addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener), org.jdesktop.beans.AbstractBean#addPropertyChangeListener(java.beans.PropertyChangeListener), org.jdesktop.beans.AbstractBean#removePropertyChangeListener(java.beans.PropertyChangeListener), org.jdesktop.beans.AbstractBean#removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener), org.jdesktop.beans.AbstractBean#getPropertyChangeListeners(java.lang.String), org.jdesktop.beans.AbstractBean#getPropertyChangeListeners(), org.jdesktop.beans.AbstractBean#addVetoableChangeListener(java.lang.String, java.beans.VetoableChangeListener), org.jdesktop.beans.AbstractBean#addVetoableChangeListener(java.beans.VetoableChangeListener), org.jdesktop.beans.AbstractBean#removeVetoableChangeListener(java.lang.String, java.beans.VetoableChangeListener), org.jdesktop.beans.AbstractBean#removeVetoableChangeListener(java.beans.VetoableChangeListener), org.jdesktop.beans.AbstractBean#getVetoableChangeListeners(java.lang.String), org.jdesktop.beans.AbstractBean#getVetoableChangeListeners(), org.jdesktop.beans.AbstractBean#wait(), org.jdesktop.beans.AbstractBean#wait(long), org.jdesktop.beans.AbstractBean#wait(long, int), org.jdesktop.beans.AbstractBean#equals(java.lang.Object), org.jdesktop.beans.AbstractBean#toString(), org.jdesktop.beans.AbstractBean#hashCode(), org.jdesktop.beans.AbstractBean#getClass(), org.jdesktop.beans.AbstractBean#notify(), org.jdesktop.beans.AbstractBean#notifyAll()
 

Field Detail

BUSINESS

public static final String BUSINESS


BUSINESS_ECONOMY

public static final String BUSINESS_ECONOMY


BUSINESS_STOCKS

public static final String BUSINESS_STOCKS


ENTERTAINMENT

public static final String ENTERTAINMENT


HIGHEST_RATED

public static final String HIGHEST_RATED


MOST_EMAILED

public static final String MOST_EMAILED


MOST_VIEWED

public static final String MOST_VIEWED


MOVIES

public static final String MOVIES


MUSIC

public static final String MUSIC


OPINION_EDITORIAL

public static final String OPINION_EDITORIAL


SPORTS

public static final String SPORTS


TECH

public static final String TECH


TOP_STORIES

public static final String TOP_STORIES


US

public static final String US


WORLD

public static final String WORLD


feedName

private String feedName
The name of the feed to read


 
Constructor Detail

YahooNews

public YahooNews()
Creates a new instance of YahooNews


 
Method Detail

getFeedName

public String getFeedName()
Returns:
the name of the Yahoo! News feed


getParameters

protected Map getParameters()
inheritDoc:


getUrlPrefix

protected String getUrlPrefix()
inheritDoc:


setFeedName

public void setFeedName(String feedName)
Sets the name of the feed to read from Yahoo! News. Several common feednames are listed in this class (such as YahooNews.SPORTS).
Parameters:
feedName - name of a yahoo feed. This cannot be null or contain only whitespace


 

Groovy Documentation