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.Modifier and Type | Field and Description |
---|---|
private static DateFormat |
DATE_FORMAT |
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 |
private float |
similarityMatch |
protected boolean |
streamable |
protected Collection<String> |
tags |
protected String |
url |
protected int |
userPlaycount |
private Date |
wikiLastChanged |
private String |
wikiSummary |
private String |
wikiText |
imageUrls
Modifier | Constructor and Description |
---|---|
protected |
MusicEntry(String name,
String url) |
protected |
MusicEntry(String name,
String url,
String mbid,
int playcount,
int listeners,
boolean streamable) |
Modifier and Type | Method and Description |
---|---|
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() |
float |
getSimilarityMatch()
Returns the "similarity" property, which is included in Artist.getSimilar and Track.getSimilar responses
|
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. the following
tags:playcount/plays listeners streamable name url mbid image tags |
(package private) static Integer |
maybeParseInt(String s) |
String |
toString() |
availableSizes, getImageURL, loadImages
private static final DateFormat DATE_FORMAT
protected int playcount
protected int userPlaycount
protected int listeners
protected boolean streamable
protected int percentageChange
Chart.getHypedArtists(String)
or Group.getHype(String, String)
protected Collection<String> tags
private Date wikiLastChanged
private String wikiSummary
private float similarityMatch
protected MusicEntry(String name, String url)
protected MusicEntry(String name, String url, String mbid, int playcount, int listeners, boolean streamable)
public int getListeners()
public int getPlaycount()
public int getUserPlaycount()
public boolean isStreamable()
public Collection<String> getTags()
public int getPercentageChange()
Group.getHype(String, String)
or Chart.getHypedArtists(String)
.public Date getWikiLastChanged()
public String getWikiSummary()
public String getWikiText()
public float getSimilarityMatch()
static Integer maybeParseInt(String s)
protected static void loadStandardInfo(MusicEntry entry, DomElement element)
DomElement
into the given MusicEntry
instance, i.e. the following
tags:entry
- An entryelement
- XML source elementWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses