de.umass.lastfm
Class ImageHolder

java.lang.Object
  extended by de.umass.lastfm.ImageHolder
Direct Known Subclasses:
Event, Image, MusicEntry, User, Venue

public abstract class ImageHolder
extends Object

Abstract superclass for all beans containing image data.

Author:
Janni Kovacs

Field Summary
protected  Map<ImageSize,String> imageUrls
           
 
Constructor Summary
ImageHolder()
           
 
Method Summary
 Set<ImageSize> availableSizes()
          Returns a Set of all ImageSizes available.
 String getImageURL(ImageSize size)
          Returns the URL of the image in the specified size, or null if not available.
protected static void loadImages(ImageHolder holder, DomElement element)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

imageUrls

protected Map<ImageSize,String> imageUrls
Constructor Detail

ImageHolder

public ImageHolder()
Method Detail

availableSizes

public Set<ImageSize> availableSizes()
Returns a Set of all ImageSizes available.

Returns:
all sizes

getImageURL

public String getImageURL(ImageSize size)
Returns the URL of the image in the specified size, or null if not available.

Parameters:
size - The preferred size
Returns:
an image URL

loadImages

protected static void loadImages(ImageHolder holder,
                                 DomElement element)