Groovy Documentation

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

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

public class YahooCompanyFinanceNews
extends YahooRSS

A simple JavaBean that queries Yahoo! for news items related to one or more companies, identified by stock ticker symbol. The type of news item returned may either be based on the company itself, or the industry the company is in, depending on the type property.

This bean differs from the YahooFinanceNews bean in that the news items returned are based on one or more companies ticker symbols, as opposed to a more customized RSS feed such as "international".

Authors:
rbair


Nested Class Summary
static enum YahooCompanyFinanceNews.Type

The type of news items to return.

 
Field Summary
private Set symbols

private YahooCompanyFinanceNews.Type type

The type of search to perform

 
Constructor Summary
YahooCompanyFinanceNews()

Creates a new instance of YahooFinance

 
Method Summary
void addSymbol(String symbol)

Adds the specified symbol to the set of symbols for which to retrieve news articles.

protected Map getParameters()

String[] getSymbols()

@return the set of symbols for which to retieve news articles

YahooCompanyFinanceNews.Type getType()

@return the Type of search that will be performed (see setType).

protected String getUrlPrefix()

void removeSymbol(String symbol)

Removes the specified symbol from the set of symbols for which to retrieve news articles.

void setSymbols(String... symbols)

Specifies the set of ticker symbols representing companies for which to retrieve news articles.

void setType(YahooCompanyFinanceNews.Type type)

The type of news items to return.

YahooCompanyFinanceNews valueOf(String name)

Returns the enum constant of this type with the specified name.

YahooCompanyFinanceNews[] values()

Returns an array containing the constants of this enum type, in the order they are declared.

 
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

symbols

private Set symbols

A simple JavaBean that queries Yahoo! for news items related to one or more companies, identified by stock ticker symbol. The type of news item returned may either be based on the company itself, or the industry the company is in, depending on the type property.

This bean differs from the YahooFinanceNews bean in that the news items returned are based on one or more companies ticker symbols, as opposed to a more customized RSS feed such as "international".

Authors:
rbair


type

private YahooCompanyFinanceNews.Type type
The type of search to perform


 
Constructor Detail

YahooCompanyFinanceNews

public YahooCompanyFinanceNews()
Creates a new instance of YahooFinance


 
Method Detail

addSymbol

public void addSymbol(String symbol)
Adds the specified symbol to the set of symbols for which to retrieve news articles. This may not be null.


getParameters

@Override
protected Map getParameters()


getSymbols

public String[] getSymbols()
Returns:
the set of symbols for which to retieve news articles


getType

public YahooCompanyFinanceNews.Type getType()
Returns:
the Type of search that will be performed (see setType).


getUrlPrefix

@Override
protected String getUrlPrefix()


removeSymbol

public void removeSymbol(String symbol)
Removes the specified symbol from the set of symbols for which to retrieve news articles. This may not be null.


setSymbols

public void setSymbols(String... symbols)
Specifies the set of ticker symbols representing companies for which to retrieve news articles. For example, SUNW.


setType

public void setType(YahooCompanyFinanceNews.Type type)
The type of news items to return. May be one of either:


valueOf

YahooCompanyFinanceNews valueOf(String name)
Returns the enum constant of this type with the specified name.


values

YahooCompanyFinanceNews[] values()
Returns an array containing the constants of this enum type, in the order they are declared.


 

Groovy Documentation