# Google Data APIs Client Library (1.43.0)

## com.google.gdata.data.photos
Interface PhotoData

All Superinterfaces:
  BoxData, Extensible, GphotoData, MediaData, PointData

All Known Implementing Classes:
  PhotoDataImpl, PhotoEntry, PhotoFeed

    public interface PhotoData

extends GphotoData, PointData, BoxData, MediaData

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.

Field Summary
`static java.lang.String` `KIND` The unqualified kind for a photo.
`static Category` `PHOTO_CATEGORY` A category object for photos.
`static java.lang.String` `PHOTO_KIND` The fully qualified kind term for photos.

Method Summary
`void` `addStreamId(java.lang.String streamId)` Add an individual streamId to the photo.
`java.lang.String` `getAlbumAccess()`
`java.lang.String` `getAlbumId()` The id of the album the photo is on.
`java.lang.String` `getChecksum()` The checksum on the photo.
`java.lang.String` `getClient()` The client string stored on the photo.
`java.lang.Integer` `getCommentCount()` The number of comments on this photo.
`java.lang.Boolean` `getCommentsEnabled()` Gets the status of the commenting preference on the photo.
`ExifTags` `getExifTags()` The exif information on the photo.
`java.util.Date` `getFeaturedDate()`
`java.lang.Long` `getHeight()` The height of the photo in pixels.
`java.lang.Float` `getPosition()` The position of the photo in the album.
`java.lang.Integer` `getRotation()` The rotation of the photo.
`java.lang.Long` `getSize()` The size of the photo in bytes.
`java.util.List<java.lang.String>` `getStreamIds()` Stream ids can be used to specify additional information about where a photo came from, or where it is being used.
`java.util.Date` `getTimestamp()` The time the photo was taken.
`java.lang.Integer` `getTotalStars()` The number of users who starred this photo.
`java.lang.Long` `getVersion()` The version of the image.
`java.lang.String` `getVideoStatus()` The video status in case the photo entry is a video.
`java.lang.Long` `getViewCount()`
`java.lang.Long` `getWidth()` The width of the photo in pixels.
`java.lang.Boolean` `isStarred()` If this photo is starred by current user.
`void` `setAlbumAccess(java.lang.String access)` Set the access for the album that contains this photo.
`void` `setAlbumId(java.lang.Long albumId)` Sets the id of the album the photo is in.
`void` `setAlbumId(java.lang.String albumId)` Set the albumId of the photo as a string, the album the photo is in.
`void` `setChecksum(java.lang.String checksum)` Set the checksum of the photo.
`void` `setClient(java.lang.String client)` Set the client string on the photo.
`void` `setCommentCount(java.lang.Integer commentCount)` Set the number of comments on the photo.
`void` `setCommentsEnabled(java.lang.Boolean commentsEnabled)` Sets whether comments can be made on the photo.
`void` `setExifTags(ExifTags tags)` Sets the exif tags for the photo.
`void` `setFeaturedDate(java.util.Date featuredDate)` Sets the date that the photo was featured.
`void` `setHeight(java.lang.Long height)` Set the height of the photo.
`void` `setPosition(java.lang.Float position)` Set the position of the photo.
`void` `setRotation(java.lang.Integer rotation)` Set the rotation in degrees of the photo.
`void` `setSize(java.lang.Long size)` Set the size of the photo.
`void` `setStarred(java.lang.Boolean starred)` Sets if this photo is starred by current user.
`void` `setTimestamp(java.util.Date timestamp)` Set the timestamp on the photo.
`void` `setTotalStars(java.lang.Integer totalStars)` Sets the number of users who starred this photo.
`void` `setVersion(java.lang.Long version)` Set the version of the photo.
`void` `setVideoStatus(java.lang.String videoStatus)` Set the video status of the photo entry.
`void` `setViewCount(java.lang.Long viewCount)` Sets the view count for this photo.
`void` `setWidth(java.lang.Long width)` Set the width of the photo.

Methods inherited from interface com.google.gdata.data.photos.GphotoData
`getGphotoId, setGphotoId, setGphotoId`

Methods inherited from interface com.google.gdata.data.geo.PointData
`clearPoint, getGeoLocation, setGeoLocation, setGeoLocation`

Methods inherited from interface com.google.gdata.data.geo.BoxData
`clearGeoBoundingBox, getGeoBoundingBox, setGeoBoundingBox, setGeoBoundingBox`

Methods inherited from interface com.google.gdata.data.photos.MediaData
`getMediaCategories, getMediaContents, getMediaCredits, getMediaGroup, getMediaKeywords, getMediaThumbnails, setKeywords`

Methods inherited from interface com.google.gdata.data.photos.Extensible
`addExtension, addRepeatingExtension, declareExtensions, removeExtension, removeExtension, removeRepeatingExtension, setExtension`

Field Detail

### KIND

    static final java.lang.String KIND

  The unqualified kind for a photo.

  See Also:
    Constant Field Values

### PHOTO_KIND

    static final java.lang.String PHOTO_KIND

  The fully qualified kind term for photos.

  See Also:
    Constant Field Values

### PHOTO_CATEGORY

    static final Category PHOTO_CATEGORY

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

Method Detail

### getVersion

    java.lang.Long getVersion()
                              throws ServiceException

  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.
  Throws:
    `ServiceException`

### setVersion

    void setVersion(java.lang.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.

### getPosition

    java.lang.Float getPosition()
                                throws ServiceException

  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.
  Throws:
    `ServiceException`

### setPosition

    void setPosition(java.lang.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.

### getAlbumId

    java.lang.String getAlbumId()

  The id of the album the photo is on.

  Returns:
    the gphoto:albumId of the photo.

### getAlbumAccess

    java.lang.String getAlbumAccess()

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

### setAlbumAccess

    void setAlbumAccess(java.lang.String access)

  Set the access for the album that contains this photo.

  Parameters:
    `access` - the access of the album.

### setAlbumId

    void setAlbumId(java.lang.String albumId)

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

### setAlbumId

    void setAlbumId(java.lang.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.

### getVideoStatus

    java.lang.String getVideoStatus()

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

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

### setVideoStatus

    void setVideoStatus(java.lang.String videoStatus)

  Set the video status of the photo entry.

### getWidth

    java.lang.Long getWidth()
                            throws ServiceException

  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.
  Throws:
    `ServiceException`

### setWidth

    void setWidth(java.lang.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.

### getHeight

    java.lang.Long getHeight()
                             throws ServiceException

  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.
  Throws:
    `ServiceException`

### setHeight

    void setHeight(java.lang.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.

### getRotation

    java.lang.Integer getRotation()
                                  throws ServiceException

  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.
  Throws:
    `ServiceException`

### setRotation

    void setRotation(java.lang.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.

### getSize

    java.lang.Long getSize()
                           throws ServiceException

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

  Returns:
    the gphoto:size of the photo.
  Throws:
    `ServiceException`

### setSize

    void setSize(java.lang.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.

### getClient

    java.lang.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.

### setClient

    void setClient(java.lang.String client)

  Set the client string on the photo.

  Parameters:
    `client` - the client that created the photo.

### getChecksum

    java.lang.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.

### setChecksum

    void setChecksum(java.lang.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.

### getTimestamp

    java.util.Date getTimestamp()
                                throws ServiceException

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

  Returns:
    the gphoto:timestamp of the photo.
  Throws:
    `ServiceException`

### setTimestamp

    void setTimestamp(java.util.Date timestamp)

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

  Parameters:
    `timestamp` - the timestamp on the photo.

### getExifTags

    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.

### setExifTags

    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.

### getCommentsEnabled

    java.lang.Boolean getCommentsEnabled()
                                         throws ServiceException

  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.
  Throws:
    `ServiceException`

### setCommentsEnabled

    void setCommentsEnabled(java.lang.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.

### getCommentCount

    java.lang.Integer getCommentCount()
                                      throws ServiceException

  The number of comments on this photo.

  Returns:
    the comment count on the photo.
  Throws:
    `ServiceException`

### setCommentCount

    void setCommentCount(java.lang.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.

### getViewCount

    java.lang.Long getViewCount()

  Returns:
    the number of views for this photo.

### setViewCount

    void setViewCount(java.lang.Long viewCount)

  Sets the view count for this photo.

  Parameters:
    `viewCount` - the number of views for this photo.

### getFeaturedDate

    java.util.Date getFeaturedDate()

  Returns:
    date that the photo was featured.

### setFeaturedDate

    void setFeaturedDate(java.util.Date featuredDate)

  Sets the date that the photo was featured.

  Parameters:
    `featuredDate` - the date that the photo was featured.

### getStreamIds

    java.util.List<java.lang.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.

### addStreamId

    void addStreamId(java.lang.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.

### isStarred

    java.lang.Boolean isStarred()

  If this photo is starred by current user.

  Returns:
    if this photo is starred by current user.

### setStarred

    void setStarred(java.lang.Boolean starred)

  Sets if this photo is starred by current user.

  Parameters:
    `starred` - If this photo is starred by current user.

### getTotalStars

    java.lang.Integer getTotalStars()

  The number of users who starred this photo.

  Returns:
    the number of users who starred this photo.

### setTotalStars

    void setTotalStars(java.lang.Integer totalStars)

  Sets the number of users who starred this photo.

  Parameters:
    `totalStars` - the number of users who starred this photo.