public class

AlbumDataImpl

extends GphotoDataImpl
implements AlbumData
java.lang.Object
   ↳ com.google.gdata.data.photos.impl.GphotoDataImpl
     ↳ com.google.gdata.data.photos.impl.AlbumDataImpl

Class Overview

Implementation class for album data objects. This class takes an ExtensionPoint and uses it to provide all of the methods that AlbumData 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.AlbumData
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.AlbumData
Public Constructors
AlbumDataImpl(ExtensionPoint extensionPoint)
Construct a new implementation of AlbumGphotoData with the given extension point as the backing storage for data.
Public Methods
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 getAccess()
The access level of the album, either private, protected, or public.
Long getBytesUsed()
The number of bytes that are used by photos in this album.
Integer getCommentCount()
The number of comments on the album.
Boolean getCommentsEnabled()
Whether or not commenting is allowed on this album.
Date getDate()
Gets the date on the album, this is the date set by the user.
Box getGeoBoundingBox()
Gets the bounding box of this entity.
Point getGeoLocation()
Gets the geo-location of the entity.
String getImageUrl()
This method is deprecated. use the media:content element to get the image source.
String getLocation()
The location of the album is a string representing where the photos in the album where taken.
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.
String getName()
The name of the album is its canonicalized title.
String getNickname()
The nickname of the user who owns the album.
Integer getPhotosLeft()
The number of spaces for photos that are available in the album.
Integer getPhotosUsed()
The number of photos that are contained in this album.
String getThumbnail()
This method is deprecated. use the media:thumbnail element to get thumbnails.
String getUsername()
The username of the owner of the album.
void setAccess(String access)
Set the access for the album this entry represents.
void setBytesUsed(Long bytesUsed)
Set the number of bytes used in the album this entry represents.
void setCommentCount(Integer commentCount)
Set the number of comments on the album this entry represents.
void setCommentsEnabled(Boolean commentsEnabled)
Set the whether comments are enabled in the album this entry represents.
void setDate(Date date)
Sets the date on the album, this is the user-defined date.
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 setImageUrl(String imageUrl)
This method is deprecated. set the media:content element with the image source.
void setKeywords(MediaKeywords keywords)
Set the media keywords on this element to the given keywords.
void setLocation(String location)
Set the location for the album this entry represents.
void setName(String name)
Set the name for the album this entry represents.
void setNickname(String nickname)
Set the nickname for the owner of the album this entry represents.
void setPhotosLeft(Integer photosLeft)
Set the number of photos remaining in the album this entry represents.
void setPhotosUsed(Integer photosUsed)
Set the number of photos used on the album this entry represents.
void setThumbnail(String thumbUrl)
This method is deprecated. use the media:thumbnail element to set thumbnails.
void setUsername(String username)
Set the username for the owner of the album this entry represents.
[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.AlbumData
From interface com.google.gdata.data.photos.Extensible
From interface com.google.gdata.data.photos.GphotoData
From interface com.google.gdata.data.photos.MediaData

Fields

private final BoxDataImpl boundingBoxData

private final MediaDataImpl mediaData

private final PointDataImpl pointData

Public Constructors

public AlbumDataImpl (ExtensionPoint extensionPoint)

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

Parameters
extensionPoint

Public Methods

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

The access level of the album, either private, protected, or public. This may be null when the access level of the album is not known.

Returns
  • the access of the album this entry represents.

public Long getBytesUsed ()

The number of bytes that are used by photos in this album. Useful to see how much space each album is taking up of the user's quota. This method is calculated by the server so it should be considered read-only by the client.

Returns
  • the number of bytes used in the album this entry represents.

public Integer getCommentCount ()

The number of comments on the album. This is calculated based on the comments stored on the server.

Returns
  • the comment count on the album this entry represents.

public Boolean getCommentsEnabled ()

Whether or not commenting is allowed on this album. If set to true then comments may be added to the album, if set to false then no comments can be made on photos in this album.

Returns
  • true if comments are enabled in this album the entry represents.

public Date getDate ()

Gets the date on the album, this is the date set by the user.

Returns
  • the date on the album, set by the user.

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

This method is deprecated.
use the media:content element to get the image source.

Returns
  • the photo:imgsrc on the entry.

public String getLocation ()

The location of the album is a string representing where the photos in the album where taken.

Returns
  • the location of the album this entry represents.

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

The name of the album is its canonicalized title. This is the name that can be used in urls to access the album by name rather than by id.

Returns
  • the (canonical) name of the album this entry represents.

public String getNickname ()

The nickname of the user who owns the album. This is provided to make it easier to display ownership information about albums. This is a read only field calculated by the server based on the owner of the album.

Returns
  • the nickname of the owner of the album this entry represents.

public Integer getPhotosLeft ()

The number of spaces for photos that are available in the album. This should be treated as a read only field as it is calculated on the server. Once 0 photos are left no more photos can be uploaded to this album until photos have been deleted.

Returns
  • the number of photos remaining in the album this entry represents.

public Integer getPhotosUsed ()

The number of photos that are contained in this album. This should be treated as a read only field, it is calculated on the server.

Returns
  • the number of photos used in the album this entry represents.

public String getThumbnail ()

This method is deprecated.
use the media:thumbnail element to get thumbnails.

Returns the photo:thumbnail element for the album.

Returns
  • the photo:thumbnail on the entry.

public String getUsername ()

The username of the owner of the album. This username can be used to query for the gallery of the owner of the album, for example.

Returns
  • the username of the owner of the album this entry represents.

public void setAccess (String access)

Set the access for the album this entry represents.

Parameters
access The access of the album.

public void setBytesUsed (Long bytesUsed)

Set the number of bytes used in the album this entry represents.

Parameters
bytesUsed The number of bytes used.

public void setCommentCount (Integer commentCount)

Set the number of comments on the album this entry represents.

Parameters
commentCount The number of comments on the album.

public void setCommentsEnabled (Boolean commentsEnabled)

Set the whether comments are enabled in the album this entry represents.

Parameters
commentsEnabled True if comments are enabled in the album.

public void setDate (Date date)

Sets the date on the album, this is the user-defined date.

Parameters
date The date the album represents.

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 setImageUrl (String imageUrl)

This method is deprecated.
set the media:content element with the image source.

Set the full image url for use in the photo:imgsrc element.

Parameters
imageUrl The full url to the image.

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 setLocation (String location)

Set the location for the album this entry represents.

Parameters
location The location of the album.

public void setName (String name)

Set the name for the album this entry represents.

Parameters
name The canonical name of the album.

public void setNickname (String nickname)

Set the nickname for the owner of the album this entry represents.

Parameters
nickname The nickname of the owner.

public void setPhotosLeft (Integer photosLeft)

Set the number of photos remaining in the album this entry represents.

Parameters
photosLeft The number of photos left.

public void setPhotosUsed (Integer photosUsed)

Set the number of photos used on the album this entry represents.

Parameters
photosUsed The number of photos used.

public void setThumbnail (String thumbUrl)

This method is deprecated.
use the media:thumbnail element to set thumbnails.

Set the thumbnail url for use in the photo:thumbnail element.

Parameters
thumbUrl The full url to the thumbnail.

public void setUsername (String username)

Set the username for the owner of the album this entry represents.

Parameters
username The username of the owner.