org.switchboard
Class AllMusicMood

java.lang.Object
  extended by HttpClient
      extended by org.switchboard.browser.Browser
          extended by org.switchboard.AllMusicMood
All Implemented Interfaces:
TreeModel

public class AllMusicMood
extends Browser

Represents a mood found on the AllMusic.com "Moods" page.


Constructor Summary
AllMusicMood(String mood, String url)
           
 
Method Summary
 String getMood()
          Gets the word.
 String getRandomArtist()
          Gets either an artist who made one of the top albums, or an artist who made one of the top songs.
 String[] getSynonyms()
          Gets a list of synonyms for the mood.
 Album[] getTopAlbums()
          Gets the top albums, as listed on the AllMusic "Browse by mood..." page.
 String[] getTopArtists()
           
 Song[] getTopSongs()
          Gets the top songs, as listed on the AllMusic "Browse by mood..." page.
 void setThesaurus(Thesaurus thesaurus)
          Sets the Thesaurus to use to look up synonyms.
 
Methods inherited from class org.switchboard.browser.Browser
addCookie, addCookie, addListener, addTreeModelListener, clearCookies, getAcceptCookies, getChild, getChildCount, getImages, getIndexOfChild, getLinks, getRoot, getSentences, getTitle, getURL, isLeaf, main, newHTML, newXML, numImages, open, query, refresh, removeTreeModelListener, save, save, setAcceptCookies, setTag, valueForPathChanged
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AllMusicMood

public AllMusicMood(String mood,
                    String url)
Method Detail

getMood

public String getMood()
Gets the word.

Returns:
The word that this mood object represents.

getTopAlbums

public Album[] getTopAlbums()
Gets the top albums, as listed on the AllMusic "Browse by mood..." page.

Returns:
An array of Albums

getTopSongs

public Song[] getTopSongs()
Gets the top songs, as listed on the AllMusic "Browse by mood..." page.

Returns:
An array of Songs

getTopArtists

public String[] getTopArtists()

getRandomArtist

public String getRandomArtist()
Gets either an artist who made one of the top albums, or an artist who made one of the top songs.

Returns:
The name of the random artist.

setThesaurus

public void setThesaurus(Thesaurus thesaurus)
Sets the Thesaurus to use to look up synonyms.

Parameters:
thesaurus - Sets the Thesaurus to be used to look up synonyms.

getSynonyms

public String[] getSynonyms()
Gets a list of synonyms for the mood.

Returns:
An array of strings, each of which is a synonym for the mood.