net.dontdrinkandroot.lastfm.api.model
Class Tag

java.lang.Object
  extended by net.dontdrinkandroot.lastfm.api.model.LfmEntity
      extended by net.dontdrinkandroot.lastfm.api.model.Tag
All Implemented Interfaces:
java.io.Serializable, CountEntity, Entity, NameEntity, ReachEntity, StreamableEntity, TaggingsEntity, UrlEntity, WikiEntity

public class Tag
extends LfmEntity
implements NameEntity, UrlEntity, CountEntity, TaggingsEntity, ReachEntity, StreamableEntity, WikiEntity

See Also:
Serialized Form

Constructor Summary
Tag()
           
Tag(org.w3c.dom.Element element)
          Construct Tag from dom Element.
Tag(java.lang.String name)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.Integer getCount()
           
static UnauthenticatedGetQuery<Tag> getInfo(java.lang.String tag, net.dontdrinkandroot.utils.ISO_3166_1_alpha2 lang)
          Get the metadata for a tag.
 java.lang.String getName()
           
 java.lang.Integer getReach()
           
 Streamable getStreamable()
           
 java.lang.Integer getTaggings()
           
static UnauthenticatedGetQuery<PaginatedResult<java.util.List<Album>>> getTopAlbums(java.lang.String tagName, java.lang.Integer limit, java.lang.Integer page)
          Get the top albums tagged by this tag, ordered by tag count
static UnauthenticatedGetQuery<PaginatedResult<java.util.List<Artist>>> getTopArtists(java.lang.String tagName, java.lang.Integer limit, java.lang.Integer page)
          Get the top artists tagged by this tag, ordered by tag count.
static UnauthenticatedGetQuery<java.util.ArrayList<Tag>> getTopTags()
          Fetches the top global tags on Last.fm, sorted by popularity (number oftimes used).
static UnauthenticatedGetQuery<PaginatedResult<java.util.List<Track>>> getTopTracks(java.lang.String tagName, java.lang.Integer limit, java.lang.Integer page)
          Get the top tracks tagged by this tag, ordered by tag count.
 java.net.URL getUrl()
           
 Wiki getWiki()
           
 int hashCode()
           
 void setCount(java.lang.Integer count)
           
 void setName(java.lang.String name)
           
 void setReach(java.lang.Integer reach)
           
 void setStreamable(Streamable streamable)
           
 void setTaggings(java.lang.Integer taggings)
           
 void setUrl(java.net.URL url)
           
 void setWiki(Wiki wiki)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Tag

public Tag()

Tag

public Tag(org.w3c.dom.Element element)
Construct Tag from dom Element.

Parameters:
element - The dom Element to convert.

Tag

public Tag(java.lang.String name)
Method Detail

getName

public final java.lang.String getName()
Specified by:
getName in interface NameEntity

setName

public final void setName(java.lang.String name)
Specified by:
setName in interface NameEntity

getUrl

public final java.net.URL getUrl()
Specified by:
getUrl in interface UrlEntity

setUrl

public final void setUrl(java.net.URL url)
Specified by:
setUrl in interface UrlEntity

getCount

public final java.lang.Integer getCount()
Specified by:
getCount in interface CountEntity

setCount

public final void setCount(java.lang.Integer count)
Specified by:
setCount in interface CountEntity

getReach

public final java.lang.Integer getReach()
Specified by:
getReach in interface ReachEntity

setReach

public final void setReach(java.lang.Integer reach)
Specified by:
setReach in interface ReachEntity

getTaggings

public final java.lang.Integer getTaggings()
Specified by:
getTaggings in interface TaggingsEntity

setTaggings

public final void setTaggings(java.lang.Integer taggings)
Specified by:
setTaggings in interface TaggingsEntity

getStreamable

public final Streamable getStreamable()
Specified by:
getStreamable in interface StreamableEntity

setStreamable

public final void setStreamable(Streamable streamable)
Specified by:
setStreamable in interface StreamableEntity

getWiki

public final Wiki getWiki()
Specified by:
getWiki in interface WikiEntity

setWiki

public final void setWiki(Wiki wiki)
Specified by:
setWiki in interface WikiEntity

toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public final int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public final boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

getInfo

public static UnauthenticatedGetQuery<Tag> getInfo(java.lang.String tag,
                                                   net.dontdrinkandroot.utils.ISO_3166_1_alpha2 lang)
Get the metadata for a tag.

Parameters:
tag - The tag name (Required).
lang - The language to return the wiki in, expressed as an ISO 639 alpha-2 code (Optional).
Returns:

getTopAlbums

public static UnauthenticatedGetQuery<PaginatedResult<java.util.List<Album>>> getTopAlbums(java.lang.String tagName,
                                                                                           java.lang.Integer limit,
                                                                                           java.lang.Integer page)
Get the top albums tagged by this tag, ordered by tag count. *

Parameters:
tagName - The tag name (Required).
limit - The number of results to fetch per page (Optional). Defaults to 50.
page - he page number to fetch (Optional). Defaults to first page.

getTopArtists

public static UnauthenticatedGetQuery<PaginatedResult<java.util.List<Artist>>> getTopArtists(java.lang.String tagName,
                                                                                             java.lang.Integer limit,
                                                                                             java.lang.Integer page)
Get the top artists tagged by this tag, ordered by tag count.

Parameters:
tagName - The tag name (Required).
limit - The number of results to fetch per page (Optional). Defaults to 50.
page - he page number to fetch (Optional). Defaults to first page.

getTopTags

public static UnauthenticatedGetQuery<java.util.ArrayList<Tag>> getTopTags()
Fetches the top global tags on Last.fm, sorted by popularity (number oftimes used). TODO: Using arraylist here to avoid complex generics.

Returns:
The query needed to fetch the TopTags.

getTopTracks

public static UnauthenticatedGetQuery<PaginatedResult<java.util.List<Track>>> getTopTracks(java.lang.String tagName,
                                                                                           java.lang.Integer limit,
                                                                                           java.lang.Integer page)
Get the top tracks tagged by this tag, ordered by tag count.

Parameters:
tagName - The tag name (Required).
limit - The number of results to fetch per page (Optional). Defaults to 50.
page - he page number to fetch (Optional). Defaults to first page.


Copyright © 2013 dontdrinkandroot. All Rights Reserved.