com.aetrion.flickr.photos
Class Photo

java.lang.Object
  extended by com.aetrion.flickr.photos.Photo

public class Photo
extends java.lang.Object

Class representing metadata about a Flickr photo. Instances do not actually contain the photo data, however you can obtain the photo data by calling PhotosInterface.getImage(Photo, int) or PhotosInterface.getImageAsStream(Photo, int).

Version:
$Id: Photo.java,v 1.28 2009/07/23 21:49:35 x-mago Exp $
Author:
Anthony Eden

Constructor Summary
Photo()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int getComments()
           
 java.util.Date getDateAdded()
           
 java.util.Date getDatePosted()
           
 java.util.Date getDateTaken()
           
 java.lang.String getDescription()
           
 Editability getEditability()
           
 java.lang.String getFarm()
           
 GeoData getGeoData()
           
 java.lang.String getIconFarm()
           
 java.lang.String getIconServer()
           
 java.lang.String getId()
           
 java.io.InputStream getLargeAsStream()
          Deprecated.  
 java.awt.image.BufferedImage getLargeImage()
          Deprecated.  
 Size getLargeSize()
           
 java.lang.String getLargeUrl()
           
 java.util.Date getLastUpdate()
           
 java.lang.String getLicense()
           
 java.lang.String getMedia()
           
 java.lang.String getMediaStatus()
           
 java.io.InputStream getMediumAsStream()
          Deprecated.  
 java.awt.image.BufferedImage getMediumImage()
          Deprecated.  
 Size getMediumSize()
           
 java.lang.String getMediumUrl()
           
 java.util.Collection getNotes()
           
 java.io.InputStream getOriginalAsStream()
          Deprecated.  
 java.lang.String getOriginalFormat()
           
 int getOriginalHeight()
           
 java.awt.image.BufferedImage getOriginalImage()
          Deprecated.  
 java.lang.String getOriginalSecret()
           
 Size getOriginalSize()
           
 java.lang.String getOriginalUrl()
          Get the original image URL.
 int getOriginalWidth()
           
 User getOwner()
           
 java.lang.String getPathAlias()
           
 Permissions getPermissions()
           
 java.lang.String getPlaceId()
           
 int getRotation()
           
 java.lang.String getSecret()
           
 java.lang.String getServer()
           
 java.io.InputStream getSmallAsInputStream()
          Deprecated.  
 java.awt.image.BufferedImage getSmallImage()
          Deprecated.  
 Size getSmallSize()
           
 java.io.InputStream getSmallSquareAsInputStream()
          Deprecated.  
 java.awt.image.BufferedImage getSmallSquareImage()
          Deprecated.  
 java.lang.String getSmallSquareUrl()
           
 java.lang.String getSmallUrl()
           
 Size getSquareSize()
           
 java.util.Collection getTags()
           
 java.lang.String getTakenGranularity()
           
 java.io.InputStream getThumbnailAsInputStream()
          Deprecated.  
 java.awt.image.BufferedImage getThumbnailImage()
          Deprecated.  
 Size getThumbnailSize()
           
 java.lang.String getThumbnailUrl()
           
 java.lang.String getTitle()
           
 java.lang.String getUrl()
           
 java.util.Collection getUrls()
           
 int getViews()
          Deprecated. attribute no longer available
 boolean hasGeoData()
           
 int hashCode()
           
 boolean isFamilyFlag()
           
 boolean isFavorite()
           
 boolean isFriendFlag()
           
 boolean isPrimary()
           
 boolean isPublicFlag()
           
 void setComments(int comments)
           
 void setComments(java.lang.String comments)
           
 void setDateAdded(java.util.Date dateAdded)
           
 void setDateAdded(long dateAdded)
           
 void setDateAdded(java.lang.String dateAdded)
           
 void setDatePosted(java.util.Date datePosted)
           
 void setDatePosted(long datePosted)
           
 void setDatePosted(java.lang.String datePosted)
           
 void setDateTaken(java.util.Date dateTaken)
           
 void setDateTaken(java.lang.String dateTaken)
           
 void setDescription(java.lang.String description)
           
 void setEditability(Editability editability)
           
 void setFamilyFlag(boolean familyFlag)
           
 void setFarm(java.lang.String farm)
           
 void setFavorite(boolean favorite)
           
 void setFriendFlag(boolean friendFlag)
           
 void setGeoData(GeoData geoData)
           
 void setIconFarm(java.lang.String iconFarm)
           
 void setIconServer(java.lang.String iconServer)
           
 void setId(java.lang.String id)
           
 void setLastUpdate(java.util.Date lastUpdate)
           
 void setLastUpdate(java.lang.String lastUpdateStr)
           
 void setLicense(java.lang.String license)
           
 void setMedia(java.lang.String media)
           
 void setMediaStatus(java.lang.String mediaStatus)
           
 void setNotes(java.util.Collection notes)
           
 void setOriginalFormat(java.lang.String originalFormat)
           
 void setOriginalHeight(int originalHeight)
           
 void setOriginalHeight(java.lang.String originalHeight)
           
 void setOriginalSecret(java.lang.String originalSecret)
           
 void setOriginalWidth(int originalWidth)
           
 void setOriginalWidth(java.lang.String originalWidth)
           
 void setOwner(User owner)
           
 void setPathAlias(java.lang.String pathAlias)
           
 void setPermissions(Permissions permissions)
           
 void setPlaceId(java.lang.String placeId)
           
 void setPrimary(boolean primary)
           
 void setPrimary(java.lang.String primary)
           
 void setPublicFlag(boolean publicFlag)
           
 void setRotation(int rotation)
           
 void setRotation(java.lang.String rotation)
          Set the degrees of rotation.
 void setSecret(java.lang.String secret)
           
 void setServer(java.lang.String server)
           
 void setSizes(java.util.Collection sizes)
          Set sizes to override the generated URLs of the different sizes.
 void setTags(java.util.Collection tags)
           
 void setTakenGranularity(java.lang.String takenGranularity)
           
 void setTitle(java.lang.String title)
           
 void setUrl(java.lang.String url)
           
 void setUrls(java.util.Collection urls)
           
 void setViews(int views)
          Deprecated. attribute no longer available
 void setViews(java.lang.String views)
          Deprecated. attribute no longer available
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Photo

public Photo()
Method Detail

getId

public java.lang.String getId()

setId

public void setId(java.lang.String id)

getOwner

public User getOwner()

setOwner

public void setOwner(User owner)

getSecret

public java.lang.String getSecret()

setSecret

public void setSecret(java.lang.String secret)

getFarm

public java.lang.String getFarm()

setFarm

public void setFarm(java.lang.String farm)

getServer

public java.lang.String getServer()

setServer

public void setServer(java.lang.String server)

isFavorite

public boolean isFavorite()

setFavorite

public void setFavorite(boolean favorite)

getLicense

public java.lang.String getLicense()

setLicense

public void setLicense(java.lang.String license)

isPrimary

public boolean isPrimary()

setPrimary

public void setPrimary(boolean primary)

setPrimary

public void setPrimary(java.lang.String primary)

getTitle

public java.lang.String getTitle()

setTitle

public void setTitle(java.lang.String title)

getDescription

public java.lang.String getDescription()

setDescription

public void setDescription(java.lang.String description)

isPublicFlag

public boolean isPublicFlag()

setPublicFlag

public void setPublicFlag(boolean publicFlag)

isFriendFlag

public boolean isFriendFlag()

setFriendFlag

public void setFriendFlag(boolean friendFlag)

isFamilyFlag

public boolean isFamilyFlag()

setFamilyFlag

public void setFamilyFlag(boolean familyFlag)

getDateAdded

public java.util.Date getDateAdded()

setDateAdded

public void setDateAdded(java.util.Date dateAdded)

setDateAdded

public void setDateAdded(long dateAdded)

setDateAdded

public void setDateAdded(java.lang.String dateAdded)

getDatePosted

public java.util.Date getDatePosted()

setDatePosted

public void setDatePosted(java.util.Date datePosted)

setDatePosted

public void setDatePosted(long datePosted)

setDatePosted

public void setDatePosted(java.lang.String datePosted)

getDateTaken

public java.util.Date getDateTaken()

setDateTaken

public void setDateTaken(java.util.Date dateTaken)

setDateTaken

public void setDateTaken(java.lang.String dateTaken)

getLastUpdate

public java.util.Date getLastUpdate()

setLastUpdate

public void setLastUpdate(java.util.Date lastUpdate)

setLastUpdate

public void setLastUpdate(java.lang.String lastUpdateStr)

getTakenGranularity

public java.lang.String getTakenGranularity()

setTakenGranularity

public void setTakenGranularity(java.lang.String takenGranularity)

getPermissions

public Permissions getPermissions()

setPermissions

public void setPermissions(Permissions permissions)

getEditability

public Editability getEditability()

setEditability

public void setEditability(Editability editability)

getComments

public int getComments()

setComments

public void setComments(int comments)

setComments

public void setComments(java.lang.String comments)

getNotes

public java.util.Collection getNotes()

setNotes

public void setNotes(java.util.Collection notes)

getTags

public java.util.Collection getTags()

setTags

public void setTags(java.util.Collection tags)

getUrls

public java.util.Collection getUrls()
Returns:
List of PhotoUrl

setUrls

public void setUrls(java.util.Collection urls)
Parameters:
urls - List of PhotoUrl

setViews

public void setViews(java.lang.String views)
Deprecated. attribute no longer available

Sets the number of views for this Photo. For un-authenticated calls this value is not available and will be set to -1.

Parameters:
views -

setViews

public void setViews(int views)
Deprecated. attribute no longer available

Parameters:
views -

getViews

public int getViews()
Deprecated. attribute no longer available

Number of views. Set to -1 if the value is not available.

Returns:
Number of views

setRotation

public void setRotation(java.lang.String rotation)
Set the degrees of rotation. Value will be set to -1, if not available.

Parameters:
rotation -

setRotation

public void setRotation(int rotation)

getRotation

public int getRotation()

getIconServer

public java.lang.String getIconServer()

setIconServer

public void setIconServer(java.lang.String iconServer)

getIconFarm

public java.lang.String getIconFarm()

setIconFarm

public void setIconFarm(java.lang.String iconFarm)

getUrl

public java.lang.String getUrl()

setUrl

public void setUrl(java.lang.String url)

getGeoData

public GeoData getGeoData()

setGeoData

public void setGeoData(GeoData geoData)

hasGeoData

public boolean hasGeoData()

getOriginalFormat

public java.lang.String getOriginalFormat()

setOriginalFormat

public void setOriginalFormat(java.lang.String originalFormat)

getOriginalSecret

public java.lang.String getOriginalSecret()

setOriginalSecret

public void setOriginalSecret(java.lang.String originalSecret)

getOriginalImage

public java.awt.image.BufferedImage getOriginalImage()
                                              throws java.io.IOException,
                                                     FlickrException
Deprecated. 

Returns:
An Image
Throws:
java.io.IOException
FlickrException
See Also:
PhotosInterface.getImage(Photo, int)

getOriginalAsStream

public java.io.InputStream getOriginalAsStream()
                                        throws java.io.IOException,
                                               FlickrException
Deprecated. 

Get an InputStream for the original image. Callers must close the stream upon completion.

Returns:
The InputStream
Throws:
java.io.IOException
FlickrException
See Also:
PhotosInterface.getImageAsStream(Photo, int)

getOriginalUrl

public java.lang.String getOriginalUrl()
                                throws FlickrException
Get the original image URL.

Returns:
The original image URL
Throws:
FlickrException

getSmallSquareImage

public java.awt.image.BufferedImage getSmallSquareImage()
                                                 throws java.io.IOException
Deprecated. 

Get an Image object which is a 75x75 pixel square.

Returns:
An Image
Throws:
java.io.IOException
See Also:
PhotosInterface.getImage(Photo, int)

getSmallSquareAsInputStream

public java.io.InputStream getSmallSquareAsInputStream()
                                                throws java.io.IOException
Deprecated. 

Returns:
The InputStream
Throws:
java.io.IOException
See Also:
PhotosInterface.getImageAsStream(Photo, int)

getSmallSquareUrl

public java.lang.String getSmallSquareUrl()

getThumbnailImage

public java.awt.image.BufferedImage getThumbnailImage()
                                               throws java.io.IOException
Deprecated. 

Returns:
An Image
Throws:
java.io.IOException
See Also:
PhotosInterface.getImage(Photo, int)

getThumbnailAsInputStream

public java.io.InputStream getThumbnailAsInputStream()
                                              throws java.io.IOException
Deprecated. 

Returns:
The InputStream
Throws:
java.io.IOException
See Also:
PhotosInterface.getImageAsStream(Photo, int)

getThumbnailUrl

public java.lang.String getThumbnailUrl()

getSmallImage

public java.awt.image.BufferedImage getSmallImage()
                                           throws java.io.IOException
Deprecated. 

Returns:
An Image
Throws:
java.io.IOException
See Also:
PhotosInterface.getImage(Photo, int)

getSmallAsInputStream

public java.io.InputStream getSmallAsInputStream()
                                          throws java.io.IOException
Deprecated. 

Returns:
The InputStream
Throws:
java.io.IOException
See Also:
PhotosInterface.getImageAsStream(Photo, int)

getSmallUrl

public java.lang.String getSmallUrl()

getMediumImage

public java.awt.image.BufferedImage getMediumImage()
                                            throws java.io.IOException
Deprecated. 

Returns:
An Image
Throws:
java.io.IOException
See Also:
PhotosInterface.getImage(Photo, int)

getMediumAsStream

public java.io.InputStream getMediumAsStream()
                                      throws java.io.IOException
Deprecated. 

Returns:
The InputStream
Throws:
java.io.IOException
See Also:
PhotosInterface.getImageAsStream(Photo, int)

getMediumUrl

public java.lang.String getMediumUrl()

getLargeImage

public java.awt.image.BufferedImage getLargeImage()
                                           throws java.io.IOException
Deprecated. 

Returns:
An Image
Throws:
java.io.IOException
See Also:
PhotosInterface.getImage(Photo, int)

getLargeAsStream

public java.io.InputStream getLargeAsStream()
                                     throws java.io.IOException
Deprecated. 

Returns:
The InputStream
Throws:
java.io.IOException
See Also:
PhotosInterface.getImageAsStream(Photo, int)

getLargeUrl

public java.lang.String getLargeUrl()

getPlaceId

public java.lang.String getPlaceId()
Returns:
A placeId
See Also:
PlacesInterface.resolvePlaceId(String)

setPlaceId

public void setPlaceId(java.lang.String placeId)

getMedia

public java.lang.String getMedia()

setMedia

public void setMedia(java.lang.String media)

getMediaStatus

public java.lang.String getMediaStatus()

setMediaStatus

public void setMediaStatus(java.lang.String mediaStatus)

getOriginalWidth

public int getOriginalWidth()

setOriginalWidth

public void setOriginalWidth(java.lang.String originalWidth)

setOriginalWidth

public void setOriginalWidth(int originalWidth)

getOriginalHeight

public int getOriginalHeight()

setOriginalHeight

public void setOriginalHeight(java.lang.String originalHeight)

setOriginalHeight

public void setOriginalHeight(int originalHeight)

setSizes

public void setSizes(java.util.Collection sizes)
Set sizes to override the generated URLs of the different sizes.

Parameters:
sizes -
See Also:
PhotosInterface.getSizes(String)

getSquareSize

public Size getSquareSize()

getSmallSize

public Size getSmallSize()

getThumbnailSize

public Size getThumbnailSize()

getMediumSize

public Size getMediumSize()

getLargeSize

public Size getLargeSize()

getOriginalSize

public Size getOriginalSize()

getPathAlias

public java.lang.String getPathAlias()
Returns:
the pathAlias

setPathAlias

public void setPathAlias(java.lang.String pathAlias)
Parameters:
pathAlias - the pathAlias to set

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object), http://www.ibm.com/developerworks/library/j-dyn0603/

hashCode

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


Copyright (C) 2005-2008 Aetrion LLC. All Rights Reserved.