Package de.umass.lastfm
Class MusicEntry
java.lang.Object
de.umass.lastfm.ImageHolder
de.umass.lastfm.MusicEntry
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
FieldsModifier and TypeFieldDescriptionprotected Stringprotected intprotected Stringprotected Stringprotected intThis property is only available on hype charts, likeChart.getHypedArtists(String)orGroup.getHype(String, String)protected intprotected booleanprotected Collection<String> protected Stringprotected intFields inherited from class de.umass.lastfm.ImageHolder
imageUrls -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMusicEntry(String name, String url) protectedMusicEntry(String name, String url, String mbid, int playcount, int listeners, boolean streamable) -
Method Summary
Modifier and TypeMethodDescriptiongetId()intgetMbid()getName()intReturns the value of the "percentage change" fields in weekly hype charts responses, such as inGroup.getHype(String, String)orChart.getHypedArtists(String).intgetTags()getUrl()intbooleanprotected static voidloadStandardInfo(MusicEntry entry, DomElement element) Loads all generic information from an XMLDomElementinto the givenMusicEntryinstance, i.e.Methods inherited from class de.umass.lastfm.ImageHolder
availableSizes, getImageURL, loadImages
-
Field Details
-
name
-
url
-
mbid
-
playcount
protected int playcount -
userPlaycount
protected int userPlaycount -
listeners
protected int listeners -
streamable
protected boolean streamable -
id
-
percentageChange
protected int percentageChangeThis property is only available on hype charts, likeChart.getHypedArtists(String)orGroup.getHype(String, String) -
tags
-
-
Constructor Details
-
MusicEntry
-
MusicEntry
-
-
Method Details
-
getListeners
public int getListeners() -
getMbid
-
getName
-
getId
-
getPlaycount
public int getPlaycount() -
getUserPlaycount
public int getUserPlaycount() -
isStreamable
public boolean isStreamable() -
getUrl
-
getTags
-
getPercentageChange
public int getPercentageChange()Returns the value of the "percentage change" fields in weekly hype charts responses, such as inGroup.getHype(String, String)orChart.getHypedArtists(String).- Returns:
- Weekly percentage change
-
loadStandardInfo
Loads all generic information from an XMLDomElementinto the givenMusicEntryinstance, i.e. the following tags:
- playcount/plays
- listeners
- streamable
- name
- url
- mbid
- image
- tags
- Parameters:
entry- An entryelement- XML source element
-
getWikiLastChanged
-
getWikiSummary
-
getWikiText
-