Package de.umass.lastfm
Class Tag
java.lang.Object
de.umass.lastfm.Tag
- All Implemented Interfaces:
Comparable<Tag>
Bean for Tag data and provides methods for global tags.
- Author:
- Janni Kovacs
-
Method Summary
Modifier and TypeMethodDescriptionintfilter(Collection<Tag> tags, double percentage) Filters tags from the given list; retains only those tags with a count higher than the given percentage of the total sum as fromgetTagCountSum(Collection).intgetCount()static TagGets the metadata for a tag.static TagGets the metadata for a tag.getName()intgetReach()static Collection<Tag> getSimilar(String tag, String apiKey) Search for tags similar to this one.static longgetTagCountSum(Collection<Tag> tags) Returns the sum of allcountelements in the results.intReturns the number of taggings of this specific tag.static Collection<Album> getTopAlbums(String tag, String apiKey) static Collection<Artist> getTopArtists(String tag, String apiKey) static Collection<Tag> getTopTags(String apiKey) static Collection<Track> getTopTracks(String tag, String apiKey) getUrl()getWeeklyArtistChart(String tag, int limit, String apiKey) getWeeklyArtistChart(String tag, String apiKey) getWeeklyArtistChart(String tag, String from, String to, int limit, String apiKey) static LinkedHashMap<String, String> getWeeklyChartList(String tag, String apiKey) static Collection<Chart> getWeeklyChartListAsCharts(String tag, String apiKey) booleanstatic Collection<Tag> static Collection<Tag>
-
Method Details
-
getCount
public int getCount() -
getTaggings
public int getTaggings()Returns the number of taggings of this specific tag. Alias forgetCount().- Returns:
- Number of Taggings
- See Also:
-
getName
-
getUrl
-
isStreamable
public boolean isStreamable() -
getReach
public int getReach() -
getWikiLastChanged
-
getWikiSummary
-
getWikiText
-
getTagCountSum
Returns the sum of allcountelements in the results.- Parameters:
tags- a list of tags- Returns:
- the total count of all tags
-
filter
Filters tags from the given list; retains only those tags with a count higher than the given percentage of the total sum as fromgetTagCountSum(Collection).- Parameters:
tags- list of tagspercentage- cut off percentage- Returns:
- the filtered list of tags
-
getSimilar
Search for tags similar to this one. Returns tags ranked by similarity, based on listening data.- Parameters:
tag- The tag nameapiKey- A Last.fm API key- Returns:
- a List of
Tags
-
getTopTags
-
getTopAlbums
-
getTopTracks
-
getTopArtists
-
search
-
search
-
getWeeklyArtistChart
-
getWeeklyArtistChart
-
getWeeklyArtistChart
-
getWeeklyChartList
-
getWeeklyChartListAsCharts
-
getInfo
Gets the metadata for a tag.- Parameters:
tag- The tag nameapiKey- A Last.fm API key- Returns:
- Tag metdata such as Wiki Text, reach and tag count
-
getInfo
Gets the metadata for a tag.- Parameters:
tag- The tag namelocale- The language to fetch info in, ornullapiKey- A Last.fm API key- Returns:
- Tag metdata such as Wiki Text, reach and tag count
-
compareTo
- Specified by:
compareToin interfaceComparable<Tag>
-