public interface

PhotoData

implements BoxData PointData GphotoData MediaData
com.google.gdata.data.photos.PhotoData
Known Indirect Subclasses

Class Overview

Base data object for photo feeds and entries, this interface contains the methods that all photo objects must provide. Note that some information may not be available based on the source of the photo data.

Summary

Constants
String KIND The unqualified kind for a photo.
String PHOTO_KIND The fully qualified kind term for photos.
Fields
public static final Category PHOTO_CATEGORY A category object for photos.
Public Methods
abstract void addStreamId(String streamId)
Add an individual streamId to the photo.
abstract String getAlbumAccess()
abstract String getAlbumId()
The id of the album the photo is on.
abstract String getChecksum()
The checksum on the photo.
abstract String getClient()
The client string stored on the photo.
abstract Integer getCommentCount()
The number of comments on this photo.
abstract Boolean getCommentsEnabled()
Gets the status of the commenting preference on the photo.
abstract ExifTags getExifTags()
The exif information on the photo.
abstract Date getFeaturedDate()
abstract Long getHeight()
The height of the photo in pixels.
abstract Float getPosition()
The position of the photo in the album.
abstract Integer getRotation()
The rotation of the photo.
abstract Long getSize()
The size of the photo in bytes.
abstract List<String> getStreamIds()
Stream ids can be used to specify additional information about where a photo came from, or where it is being used.
abstract Date getTimestamp()
The time the photo was taken.
abstract Integer getTotalStars()
The number of users who starred this photo.
abstract Long getVersion()
The version of the image.
abstract String getVideoStatus()
The video status in case the photo entry is a video.
abstract Long getViewCount()
abstract Long getWidth()
The width of the photo in pixels.
abstract Boolean isStarred()
If this photo is starred by current user.
abstract void setAlbumAccess(String access)
Set the access for the album that contains this photo.
abstract void setAlbumId(String albumId)
Set the albumId of the photo as a string, the album the photo is in.
abstract void setAlbumId(Long albumId)
Sets the id of the album the photo is in.
abstract void setChecksum(String checksum)
Set the checksum of the photo.
abstract void setClient(String client)
Set the client string on the photo.
abstract void setCommentCount(Integer commentCount)
Set the number of comments on the photo.
abstract void setCommentsEnabled(Boolean commentsEnabled)
Sets whether comments can be made on the photo.
abstract void setExifTags(ExifTags tags)
Sets the exif tags for the photo.
abstract void setFeaturedDate(Date featuredDate)
Sets the date that the photo was featured.
abstract void setHeight(Long height)
Set the height of the photo.
abstract void setPosition(Float position)
Set the position of the photo.
abstract void setRotation(Integer rotation)
Set the rotation in degrees of the photo.
abstract void setSize(Long size)
Set the size of the photo.
abstract void setStarred(Boolean starred)
Sets if this photo is starred by current user.
abstract void setTimestamp(Date timestamp)
Set the timestamp on the photo.
abstract void setTotalStars(Integer totalStars)
Sets the number of users who starred this photo.
abstract void setVersion(Long version)
Set the version of the photo.
abstract void setVideoStatus(String videoStatus)
Set the video status of the photo entry.
abstract void setViewCount(Long viewCount)
Sets the view count for this photo.
abstract void setWidth(Long width)
Set the width of the photo.
[Expand]
Inherited Methods
From interface com.google.gdata.data.geo.BoxData
From interface com.google.gdata.data.geo.PointData
From interface com.google.gdata.data.photos.Extensible
From interface com.google.gdata.data.photos.GphotoData
From interface com.google.gdata.data.photos.MediaData

Constants

public static final String KIND

The unqualified kind for a photo.

Constant Value: "photo"

public static final String PHOTO_KIND

The fully qualified kind term for photos.

Constant Value: "http://schemas.google.com/photos/2007#photo"

Fields

public static final Category PHOTO_CATEGORY

A category object for photos. All photo objects will have this set.

Public Methods

public abstract 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 abstract String getAlbumAccess ()

Returns
  • the access of the album that contains this photo.

public abstract String getAlbumId ()

The id of the album the photo is on.

Returns
  • the gphoto:albumId of the photo.

public abstract 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 abstract 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 abstract Integer getCommentCount ()

The number of comments on this photo.

Returns
  • the comment count on the photo.

public abstract 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 abstract 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 abstract Date getFeaturedDate ()

Returns
  • date that the photo was featured.

public abstract 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 abstract 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 abstract 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 abstract Long getSize ()

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

Returns
  • the gphoto:size of the photo.

public abstract 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 abstract Date getTimestamp ()

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

Returns
  • the gphoto:timestamp of the photo.

public abstract Integer getTotalStars ()

The number of users who starred this photo.

Returns
  • the number of users who starred this photo.

public abstract 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 abstract String getVideoStatus ()

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

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

public abstract Long getViewCount ()

Returns
  • the number of views for this photo.

public abstract 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 abstract Boolean isStarred ()

If this photo is starred by current user.

Returns
  • if this photo is starred by current user.

public abstract void setAlbumAccess (String access)

Set the access for the album that contains this photo.

Parameters
access The access of the album.

public abstract void setAlbumId (String albumId)

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

Parameters
albumId

public abstract 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 abstract 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 abstract void setClient (String client)

Set the client string on the photo.

Parameters
client The client that created the photo.

public abstract 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 abstract 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 abstract 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 abstract void setFeaturedDate (Date featuredDate)

Sets the date that the photo was featured.

Parameters
featuredDate The date that the photo was featured.

public abstract 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 abstract 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 abstract 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 abstract 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 abstract void setStarred (Boolean starred)

Sets if this photo is starred by current user.

Parameters
starred If this photo is starred by current user.

public abstract 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 abstract void setTotalStars (Integer totalStars)

Sets the number of users who starred this photo.

Parameters
totalStars The number of users who starred this photo.

public abstract 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 abstract void setVideoStatus (String videoStatus)

Set the video status of the photo entry.

Parameters
videoStatus

public abstract void setViewCount (Long viewCount)

Sets the view count for this photo.

Parameters
viewCount The number of views for this photo.

public abstract 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.