de.umass.lastfm
Class MusicEntry

java.lang.Object
  extended by de.umass.lastfm.ImageHolder
      extended by de.umass.lastfm.MusicEntry
Direct Known Subclasses:
Album, Artist, Track

public abstract class MusicEntry
extends ImageHolder

MusicEntry is the abstract superclass for Track, Artist and Album. It encapsulates data and provides methods used in all subclasses, for example: name, playcount, images and more.

Author:
Janni Kovacs

Field Summary
protected  String id
           
protected  int listeners
           
protected  String mbid
           
protected  String name
           
protected  int percentageChange
          This property is only available on hype charts, like Chart.getHypedArtists(String) or Group.getHype(String, String)
protected  int playcount
           
protected  boolean streamable
           
protected  Collection<String> tags
           
protected  String url
           
protected  int userPlaycount
           
 
Fields inherited from class de.umass.lastfm.ImageHolder
imageUrls
 
Constructor Summary
protected MusicEntry(String name, String url)
           
protected MusicEntry(String name, String url, String mbid, int playcount, int listeners, boolean streamable)
           
 
Method Summary
 String getId()
           
 int getListeners()
           
 String getMbid()
           
 String getName()
           
 int getPercentageChange()
          Returns the value of the "percentage change" fields in weekly hype charts responses, such as in Group.getHype(String, String) or Chart.getHypedArtists(String).
 int getPlaycount()
           
 Collection<String> getTags()
           
 String getUrl()
           
 int getUserPlaycount()
           
 Date getWikiLastChanged()
           
 String getWikiSummary()
           
 String getWikiText()
           
 boolean isStreamable()
           
protected static void loadStandardInfo(MusicEntry entry, DomElement element)
          Loads all generic information from an XML DomElement into the given MusicEntry instance, i.e.
 
Methods inherited from class de.umass.lastfm.ImageHolder
availableSizes, getImageURL, loadImages
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected String name

url

protected String url

mbid

protected String mbid

playcount

protected int playcount

userPlaycount

protected int userPlaycount

listeners

protected int listeners

streamable

protected boolean streamable

id

protected String id

percentageChange

protected int percentageChange
This property is only available on hype charts, like Chart.getHypedArtists(String) or Group.getHype(String, String)


tags

protected Collection<String> tags
Constructor Detail

MusicEntry

protected MusicEntry(String name,
                     String url)

MusicEntry

protected MusicEntry(String name,
                     String url,
                     String mbid,
                     int playcount,
                     int listeners,
                     boolean streamable)
Method Detail

getListeners

public int getListeners()

getMbid

public String getMbid()

getName

public String getName()

getId

public String getId()

getPlaycount

public int getPlaycount()

getUserPlaycount

public int getUserPlaycount()

isStreamable

public boolean isStreamable()

getUrl

public String getUrl()

getTags

public Collection<String> getTags()

getPercentageChange

public int getPercentageChange()
Returns the value of the "percentage change" fields in weekly hype charts responses, such as in Group.getHype(String, String) or Chart.getHypedArtists(String).

Returns:
Weekly percentage change

loadStandardInfo

protected static void loadStandardInfo(MusicEntry entry,
                                       DomElement element)
Loads all generic information from an XML DomElement into the given MusicEntry instance, i.e. the following tags:

Parameters:
entry - An entry
element - XML source element

getWikiLastChanged

public Date getWikiLastChanged()

getWikiSummary

public String getWikiSummary()

getWikiText

public String getWikiText()