public class

PhotoFeed

extends GphotoFeed<F extends GphotoFeed>
implements AtomData PhotoData
java.lang.Object
   ↳ com.google.gdata.data.AbstractExtension
     ↳ com.google.gdata.data.ExtensionPoint
       ↳ com.google.gdata.data.Source
         ↳ com.google.gdata.data.BaseFeed<F extends com.google.gdata.data.BaseFeed, E extends com.google.gdata.data.BaseEntry>
           ↳ com.google.gdata.data.media.MediaFeed<F extends com.google.gdata.data.BaseFeed, E extends com.google.gdata.data.BaseEntry>
             ↳ com.google.gdata.data.photos.GphotoFeed<F extends com.google.gdata.data.photos.GphotoFeed>
               ↳ com.google.gdata.data.photos.PhotoFeed

Class Overview

Feed for a Photo in our google data api. This feed represents a photo as the container for other objects. A Photo feed contains entries of CommentEntry or TagEntry kind. The photo feed itself also contains all of the metadata available as part of a PhotoData object.

Summary

[Expand]
Inherited Constants
From interface com.google.gdata.data.photos.PhotoData
Fields
private final PhotoData delegate
[Expand]
Inherited Fields
From class com.google.gdata.data.photos.GphotoFeed
From class com.google.gdata.data.BaseFeed
From class com.google.gdata.data.Source
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
From interface com.google.gdata.data.photos.PhotoData
Public Constructors
PhotoFeed()
Constructs a new empty photo feed.
PhotoFeed(BaseFeed<?, ?> sourceFeed)
Constructs a new photo feed from a shallow copy of the data in the source feed.
Public Methods
void addStreamId(String streamId)
Add an individual streamId to the photo.
void clearGeoBoundingBox()
Clears the bounding box and removes the extension point.
void clearPoint()
Clears the point data and removes the extension point.
void declareExtensions(ExtensionProfile extProfile)
Declares the set of expected Extension types for an ExtensionPoint within the target extension profile.

The implementation of this method for BaseFeed will declare any extensions associated with the contained entry type.

String getAlbumAccess()
String getAlbumId()
The id of the album the photo is on.
String getChecksum()
The checksum on the photo.
String getClient()
The client string stored on the photo.
Integer getCommentCount()
The number of comments on this photo.
List<CommentEntry> getCommentEntries()
Get a list of entries of the CommentEntry kind.
Boolean getCommentsEnabled()
Gets the status of the commenting preference on the photo.
ExifTags getExifTags()
The exif information on the photo.
Date getFeaturedDate()
Box getGeoBoundingBox()
Gets the bounding box of this entity.
Point getGeoLocation()
Gets the geo-location of the entity.
Long getHeight()
The height of the photo in pixels.
List<MediaCategory> getMediaCategories()
Retrieve the list of media:category elements inside the media:group on this element.
List<MediaContent> getMediaContents()
Retrieve the list of media:content elements inside the media:group on this element.
List<MediaCredit> getMediaCredits()
Retrieve the list of media:credit elements inside the media:group on this element.
MediaGroup getMediaGroup()
Retrieve the media:group element on this element.
MediaKeywords getMediaKeywords()
Retrieve the list of media:keywords elements inside the media:group on this element.
List<MediaThumbnail> getMediaThumbnails()
Retrieve the list of media:thumbnail elements inside the media:group on this element.
Float getPosition()
The position of the photo in the album.
Integer getRotation()
The rotation of the photo.
Long getSize()
The size of the photo in bytes.
List<String> getStreamIds()
Stream ids can be used to specify additional information about where a photo came from, or where it is being used.
List<TagEntry> getTagEntries()
Get a list of entries of the TagEntry kind.
Date getTimestamp()
The time the photo was taken.
Integer getTotalStars()
The number of users who starred this photo.
Long getVersion()
The version of the image.
String getVideoStatus()
The video status in case the photo entry is a video.
Long getViewCount()
Long getWidth()
The width of the photo in pixels.
Boolean isStarred()
If this photo is starred by current user.
void setAlbumAccess(String access)
Set the access for the album that contains this photo.
void setAlbumId(String albumId)
Set the albumId of the photo as a string, the album the photo is in.
void setAlbumId(Long albumId)
Sets the id of the album the photo is in.
void setChecksum(String checksum)
Set the checksum of the photo.
void setClient(String client)
Set the client string on the photo.
void setCommentCount(Integer commentCount)
Set the number of comments on the photo.
void setCommentsEnabled(Boolean commentsEnabled)
Sets whether comments can be made on the photo.
void setExifTags(ExifTags tags)
Sets the exif tags for the photo.
void setFeaturedDate(Date featuredDate)
Sets the date that the photo was featured.
void setGeoBoundingBox(Point lowerLeft, Point upperRight)
Sets the bounding box based on two Point objects.
void setGeoBoundingBox(Box boundingBox)
Sets the bounding box for this entity based on a Box extension.
void setGeoLocation(Double lat, Double lon)
Sets the geo-location of the entity based on the lat and long coordinates passed in.
void setGeoLocation(Point point)
Sets the geo-location of the entity based on the Point extension.
void setHeight(Long height)
Set the height of the photo.
void setKeywords(MediaKeywords keywords)
Set the media keywords on this element to the given keywords.
void setPosition(Float position)
Set the position of the photo.
void setRotation(Integer rotation)
Set the rotation in degrees of the photo.
void setSize(Long size)
Set the size of the photo.
void setStarred(Boolean starred)
Sets if this photo is starred by current user.
void setTimestamp(Date timestamp)
Set the timestamp on the photo.
void setTotalStars(Integer totalStars)
Sets the number of users who starred this photo.
void setVersion(Long version)
Set the version of the photo.
void setVideoStatus(String videoId)
Set the video status of the photo entry.
void setViewCount(Long viewCount)
Sets the view count for this photo.
void setWidth(Long width)
Set the width of the photo.
[Expand]
Inherited Methods
From class com.google.gdata.data.photos.GphotoFeed
From class com.google.gdata.data.media.MediaFeed
From class com.google.gdata.data.BaseFeed
From class com.google.gdata.data.Source
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
From class java.lang.Object
From interface com.google.gdata.data.Extension
From interface com.google.gdata.data.IAtom
From interface com.google.gdata.data.IFeed
From interface com.google.gdata.data.Kind.Adaptable
From interface com.google.gdata.data.Kind.Adaptor
From interface com.google.gdata.data.geo.BoxData
From interface com.google.gdata.data.geo.PointData
From interface com.google.gdata.data.photos.AtomData
From interface com.google.gdata.data.photos.Extensible
From interface com.google.gdata.data.photos.GphotoData
From interface com.google.gdata.data.photos.MediaData
From interface com.google.gdata.data.photos.PhotoData

Fields

private final PhotoData delegate

Public Constructors

public PhotoFeed ()

Constructs a new empty photo feed.

public PhotoFeed (BaseFeed<?, ?> sourceFeed)

Constructs a new photo feed from a shallow copy of the data in the source feed. This is used to get the correct entry type based on the category of the entry.

Parameters
sourceFeed

Public Methods

public void addStreamId (String streamId)

Add an individual streamId to the photo. The streamid is an opaque string stored along with the photo and can be used to identify where a photo is from or used.

Parameters
streamId

public void clearGeoBoundingBox ()

Clears the bounding box and removes the extension point.

public void clearPoint ()

Clears the point data and removes the extension point.

public void declareExtensions (ExtensionProfile extProfile)

Declares the set of expected Extension types for an ExtensionPoint within the target extension profile. The base implementation does not declare any extensions, but can be overridden by specific types of ExtensionPoints that always contain a well-defined set of extensions.

The implementation of this method for BaseFeed will declare any extensions associated with the contained entry type.

Parameters
extProfile The ExtensionProfile to initialize.

public String getAlbumAccess ()

public String getAlbumId ()

The id of the album the photo is on.

Returns
  • the gphoto:albumId of the photo.

public String getChecksum ()

The checksum on the photo. This is another piece of client-provided information that will be stored on the server and returned to the client.

Returns
  • the gphoto:checksum of the photo.

public String getClient ()

The client string stored on the photo. Clients can use this to provide additional information about the photo that they can use later.

Returns
  • the gphoto:client of the photo.

public Integer getCommentCount ()

The number of comments on this photo.

Returns
  • the comment count on the photo.

public List<CommentEntry> getCommentEntries ()

Get a list of entries of the CommentEntry kind.

public Boolean getCommentsEnabled ()

Gets the status of the commenting preference on the photo. If comments are not enabled on the photo no comments may be sent.

Returns
  • true if comments are enabled on the photo.

public ExifTags getExifTags ()

The exif information on the photo. See the documentation for ExifTags for more information on available exif fields.

Returns
  • the exif tags for the photo.

public Date getFeaturedDate ()

public Box getGeoBoundingBox ()

Gets the bounding box of this entity.

Returns
  • a Box that contains the boundary for the content of this entity.

public Point getGeoLocation ()

Gets the geo-location of the entity.

Returns
  • a Point that contains the geo-coordinates (latitude and longitude).

public Long getHeight ()

The height of the photo in pixels. This is the height of the original image stored in the database, but not necessarily the height of the image returned by querying the image url (depending on image size).

Returns
  • the gphoto:height of the photo.

public List<MediaCategory> getMediaCategories ()

Retrieve the list of media:category elements inside the media:group on this element. If either the media:group or media:category elements are missing then an empty list will be returned.

Returns
  • a list of media:category elements found on the element.

public List<MediaContent> getMediaContents ()

Retrieve the list of media:content elements inside the media:group on this element. If either the media:group or media:content elements are missing then an empty list will be returned.

Returns
  • a list of media:content elements found on the element.

public List<MediaCredit> getMediaCredits ()

Retrieve the list of media:credit elements inside the media:group on this element. If either the media:group or media:credit elements are missing then an empty list will be returned.

Returns
  • a list of media:credit elements found on this element.

public MediaGroup getMediaGroup ()

Retrieve the media:group element on this element. This will return null if there was no media:group element set.

Returns
  • the media:group element on the element.

public MediaKeywords getMediaKeywords ()

Retrieve the list of media:keywords elements inside the media:group on this element. If either the media:group or media:keywords elements are missing then null will be returned.

Returns
  • the media:keywords elements found on the element, or null.

public List<MediaThumbnail> getMediaThumbnails ()

Retrieve the list of media:thumbnail elements inside the media:group on this element. If either the media:group or media:thumbnail elements are missing then an empty list will be returned.

Returns
  • a list of media:thumbnail elements found on the element.

public Float getPosition ()

The position of the photo in the album. This can be used to order the photo based on where the user has placed it within the album.

Returns
  • the gphoto:position of the photo.

public Integer getRotation ()

The rotation of the photo. This is only useful when downloading the original photo as the rotation is taken into account on thumbnails and the image is always provided in the right orientation.

Returns
  • the gphoto:rotation of the photo.

public Long getSize ()

The size of the photo in bytes. Read only, calculated by the server.

Returns
  • the gphoto:size of the photo.

public List<String> getStreamIds ()

Stream ids can be used to specify additional information about where a photo came from, or where it is being used. For example, a client may mark each photo they edit with a streamid so that the list of edited photos can be queried efficiently.

Returns
  • a list of streamIds associated with this photo.

public List<TagEntry> getTagEntries ()

Get a list of entries of the TagEntry kind.

public Date getTimestamp ()

The time the photo was taken. Modifiable by the client.

Returns
  • the gphoto:timestamp of the photo.

public Integer getTotalStars ()

The number of users who starred this photo.

Returns
  • the number of users who starred this photo.

public Long getVersion ()

The version of the image. This is the version of the image itself, and is changed whenever the image content is changed (such as by rotation).

Returns
  • the gphoto:version on the photo.

public String getVideoStatus ()

The video status in case the photo entry is a video.

Returns
  • the gphoto:videostatus of the video/photo.

public Long getViewCount ()

public Long getWidth ()

The width of the photo in pixels. This is the width of the original image stored in the database, but not necessarily the width of the image returned by querying the image url (depending on image size).

Returns
  • the gphoto:width of the photo.

public Boolean isStarred ()

If this photo is starred by current user.

Returns
  • if this photo is starred by current user.

public void setAlbumAccess (String access)

Set the access for the album that contains this photo.

Parameters
access The access of the album.

public void setAlbumId (String albumId)

Set the albumId of the photo as a string, the album the photo is in.

Parameters
albumId

public void setAlbumId (Long albumId)

Sets the id of the album the photo is in. If the albumid is changed the photo will be moved to the new album (as long as the provided albumid is valid). Set the albumId of the photo as a long, the album the photo is in.

Parameters
albumId

public void setChecksum (String checksum)

Set the checksum of the photo. Returned by the server, this is an opaque string and will not be used by the server.

Parameters
checksum The checksum on the photo, computed by a client.

public void setClient (String client)

Set the client string on the photo.

Parameters
client The client that created the photo.

public void setCommentCount (Integer commentCount)

Set the number of comments on the photo. Used by the server, this field is calculated and cannot be modified by the client.

Parameters
commentCount The number of comments on the photo.

public void setCommentsEnabled (Boolean commentsEnabled)

Sets whether comments can be made on the photo. The client can change whether comments are allowed as long as they are authenticated as the owner of the photo.

Parameters
commentsEnabled True if comments are enabled in the photo.

public void setExifTags (ExifTags tags)

Sets the exif tags for the photo. This will override existing exif data that was calculated when the photo was first uploaded.

Parameters
tags The exif tags for the photo, a collection of exif tags.

public void setFeaturedDate (Date featuredDate)

Sets the date that the photo was featured.

Parameters
featuredDate The date that the photo was featured.

public void setGeoBoundingBox (Point lowerLeft, Point upperRight)

Sets the bounding box based on two Point objects. If there is an existing Box on this object, the new points will be copied into the existing box rather than creating a new box.

Parameters
lowerLeft The lower left coordinate of the box.
upperRight The upper right coordinate of the box.

public void setGeoBoundingBox (Box boundingBox)

Sets the bounding box for this entity based on a Box extension. If there is an existing Box on this object, the new box will have its points copied into the existing box rather than using the passed-in box.

Parameters
boundingBox The box that bounds this entity.

public void setGeoLocation (Double lat, Double lon)

Sets the geo-location of the entity based on the lat and long coordinates passed in. This will create a new Point object if none exists, otherwise it will copy the new coordinates into the existing object.

Parameters
lat The latitude coordinate, between -90 and 90 degrees.
lon The longitude coordinate, between -180 and 180 degrees.
Throws
IllegalArgumentException

public void setGeoLocation (Point point)

Sets the geo-location of the entity based on the Point extension. This will use the passed in extension as the geo location if none already exists, otherwise it will copy the given point's data into the existing point object.

Parameters
point A point containing the latitude and longitude coordinates.

public void setHeight (Long height)

Set the height of the photo. Used by the server, this has no effect on the client.

Parameters
height The height of the photo.

public void setKeywords (MediaKeywords keywords)

Set the media keywords on this element to the given keywords. Will create the media:group element as needed.

Parameters
keywords

public void setPosition (Float position)

Set the position of the photo. This is the photo's position in the album it is in. This can be changed to place a photo between two other photos by choosing a position between the other two positions. Note that the server may change the positions to provide more space between photos if the limits of floating point rounding would cause errors, so the most recent position should be used before modifying a photo. Optimistic concurrency will catch this, however.

Parameters
position The position of the photo in the album.

public void setRotation (Integer rotation)

Set the rotation in degrees of the photo. This can be used to rotate the photo on the server.

Parameters
rotation The rotation of the photo.

public void setSize (Long size)

Set the size of the photo. This is used on the server, setting this on the client will have no effect.

Parameters
size The size of the photo in bytes.

public void setStarred (Boolean starred)

Sets if this photo is starred by current user.

Parameters
starred If this photo is starred by current user.

public void setTimestamp (Date timestamp)

Set the timestamp on the photo. This is the time the photo itself was taken.

Parameters
timestamp The timestamp on the photo.

public void setTotalStars (Integer totalStars)

Sets the number of users who starred this photo.

Parameters
totalStars The number of users who starred this photo.

public void setVersion (Long version)

Set the version of the photo. Used by the server to set the version, this is read only on the client.

Parameters
version The version of the photo.

public void setVideoStatus (String videoId)

Set the video status of the photo entry.

Parameters
videoId

public void setViewCount (Long viewCount)

Sets the view count for this photo.

Parameters
viewCount The number of views for this photo.

public void setWidth (Long width)

Set the width of the photo. Used by the server, this has no effect on the client.

Parameters
width The width of the photo.