Class MusicEntry

java.lang.Object
de.umass.lastfm.ImageHolder
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 Details

  • Constructor Details

    • MusicEntry

      protected MusicEntry(String name, String url)
    • MusicEntry

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

    • 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:
      • playcount/plays
      • listeners
      • streamable
      • name
      • url
      • mbid
      • image
      • tags
      Parameters:
      entry - An entry
      element - XML source element
    • getWikiLastChanged

      public Date getWikiLastChanged()
    • getWikiSummary

      public String getWikiSummary()
    • getWikiText

      public String getWikiText()