public class

PhotoDataImpl

extends GphotoDataImpl
implements PhotoData
java.lang.Object
   ↳ com.google.gdata.data.photos.impl.GphotoDataImpl
     ↳ com.google.gdata.data.photos.impl.PhotoDataImpl

Class Overview

Implementation class for photo data objects. This class takes an ExtensionPoint and uses it to provide all of the methods that PhotoData specifies. These methods are handled by using extension classes to retrieve or set extensions of the appropriate type.

Summary

[Expand]
Inherited Constants
From interface com.google.gdata.data.photos.PhotoData
Fields
private final BoxDataImpl boundingBoxData
private final MediaDataImpl mediaData
private final PointDataImpl pointData
[Expand]
Inherited Fields
From class com.google.gdata.data.photos.impl.GphotoDataImpl
From interface com.google.gdata.data.photos.PhotoData
Public Constructors
PhotoDataImpl(ExtensionPoint extensionPoint)
Construct a new implementation of PhotoGphotoData with the given extension point as the backing storage for data.
Public Methods
void addStreamId(String streamId)
Add the streamId to the list of stream ids.
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 Extensible within the target extension profile.
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.
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()
Get a list of stream ids on this element.
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)
Sets the album the photo is in.
void setAlbumId(Long albumId)
Sets the album the photo is in.
void setChecksum(String checksum)
Set the checksum of the photo this item is about.
void setClient(String client)
Set the client of the photo this item is about.
void setCommentCount(Integer commentCount)
Set the number of comments on the photo this item represents.
void setCommentsEnabled(Boolean commentsEnabled)
Set the whether comments are enabled in the photo this item represents.
void setExifTags(ExifTags tags)
Set the exif tags on the photo this item is about.
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 the item is about.
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 this item is about.
void setRotation(Integer rotation)
Set the rotation in degrees of the photo.
void setSize(Long size)
Set the size of the photo this item is about.
void setStarred(Boolean starred)
Sets if this photo is starred by current user.
void setTimestamp(Date timestamp)
Set the timestamp on the photo this item is about.
void setTotalStars(Integer totalStars)
Sets the number of users who starred this photo.
void setVersion(Long version)
Set the version of the photo this item is about.
void setVideoStatus(String videoStatus)
Sets the video status of the video/photo entry.
void setViewCount(Long viewCount)
Sets the view count for this photo.
void setWidth(Long width)
Set the width of the photo this item is about.
[Expand]
Inherited Methods
From class com.google.gdata.data.photos.impl.GphotoDataImpl
From class java.lang.Object
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
From interface com.google.gdata.data.photos.PhotoData

Fields

private final BoxDataImpl boundingBoxData

private final MediaDataImpl mediaData

private final PointDataImpl pointData

Public Constructors

public PhotoDataImpl (ExtensionPoint extensionPoint)

Construct a new implementation of PhotoGphotoData with the given extension point as the backing storage for data.

Parameters
extensionPoint

Public Methods

public void addStreamId (String streamId)

Add the streamId to the list of stream ids.

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 Extensible within the target extension profile. Forwards to declareExtensions(ExtensionProfile).

Parameters
extProfile The ExtensionProfile to initialize.

public String getAlbumAccess ()

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

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 this item represents.

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 in the photo the item represents.

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 ExifTags for the photo.

public Date getFeaturedDate ()

Returns
  • date that the photo was featured.

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 ()

Get a list of stream ids on this element.

Returns
  • a list of streamIds associated with this photo.

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 item.

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 ()

Returns
  • the number of views for this photo.

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)

Sets the album the photo is in.

Parameters
albumId

public void setAlbumId (Long albumId)

Sets the album the photo is in.

Parameters
albumId

public void setChecksum (String checksum)

Set the checksum of the photo this item is about.

Parameters
checksum The checksum on the photo.

public void setClient (String client)

Set the client of the photo this item is about.

Parameters
client The client that created the photo.

public void setCommentCount (Integer commentCount)

Set the number of comments on the photo this item represents.

Parameters
commentCount The number of comments on the photo.

public void setCommentsEnabled (Boolean commentsEnabled)

Set the whether comments are enabled in the photo this item represents.

Parameters
commentsEnabled True if comments are enabled in the photo.

public void setExifTags (ExifTags tags)

Set the exif tags on the photo this item is about.

Parameters
tags The exif tags for the photo.

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.

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 the item is about.

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 item is about. This is the photo's position in the album it is in (in the context of the feed).

Parameters
position The position of the photo in the album.

public void setRotation (Integer rotation)

Set the rotation in degrees of the photo.

Parameters
rotation The rotation of the photo.

public void setSize (Long size)

Set the size of the photo this item is about.

Parameters
size The size of the photo.

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 item is about.

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 this item is about.

Parameters
version The version of the photo.

public void setVideoStatus (String videoStatus)

Sets the video status of the video/photo entry.

Parameters
videoStatus

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 this item is about.

Parameters
width The width of the photo.