public class

AlbumFeed

extends GphotoFeed<F extends GphotoFeed>
implements AlbumData AtomData
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.AlbumFeed

Class Overview

Feed for an Album in our google photos api. This feed represents an album as the container for other objects. An Album feed contains entries of PhotoEntry or TagEntry kind. The album feed itself also contains all of the metadata available as part of an AlbumData object.

Summary

[Expand]
Inherited Constants
From interface com.google.gdata.data.photos.AlbumData
Fields
private final AlbumData 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.AlbumData
Public Constructors
AlbumFeed()
Constructs a new empty album feed.
AlbumFeed(BaseFeed<?, ?> sourceFeed)
Constructs a new album feed from a shallow copy of the data in the source feed.
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 ExtensionPoint within the target extension profile.

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

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()
The date the album was taken.
Box getGeoBoundingBox()
Gets the bounding box of this entity.
Point getGeoLocation()
Gets the geo-location of the entity.
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.
List<PhotoEntry> getPhotoEntries()
Get a list of entries of the PhotoEntry kind.
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.
List<TagEntry> getTagEntries()
Get a list of entries of the TagEntry kind.
String getUsername()
The username of the owner of the album.
PhotoEntry insertPhoto(MediaSource photoSource)
Insert a photo into this album by inserting a MediaSource containing the photo data.
void setAccess(String access)
Set the access for the album this data object represents.
void setBytesUsed(Long bytesUsed)
Set the number of bytes used in the album this data object represents.
void setCommentCount(Integer commentCount)
Set the number of comments on the album.
void setCommentsEnabled(Boolean commentsEnabled)
Set the whether comments are enabled in the album.
void setDate(Date date)
Set the date of the album.
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 setKeywords(MediaKeywords keywords)
Set the media keywords on this element to the given keywords.
void setLocation(String location)
Set the location string for where the photos in the album were taken.
void setName(String name)
Set the canonical name of the album.
void setNickname(String nickname)
Set the nickname for the owner of the album this data object represents.
void setPhotosLeft(Integer photosLeft)
Set the number of photos remaining that can be uploaded to this album.
void setPhotosUsed(Integer photosUsed)
Set the number of photos used on the album this data object represents.
void setUsername(String username)
Set the username for the owner of the album this data object represents.
[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.AlbumData
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

Fields

private final AlbumData delegate

Public Constructors

public AlbumFeed ()

Constructs a new empty album feed.

public AlbumFeed (BaseFeed<?, ?> sourceFeed)

Constructs a new album 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 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 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.

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.

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.

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 feed represents.

public Date getDate ()

The date the album was taken. Date ranges are not currently allowed. This is typically set to the date the earliest photo in the album was taken.

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

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

Returns
  • the location of the album.

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.

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.

public List<PhotoEntry> getPhotoEntries ()

Get a list of entries of the PhotoEntry kind.

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.

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.

public List<TagEntry> getTagEntries ()

Get a list of entries of the TagEntry kind.

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.

public PhotoEntry insertPhoto (MediaSource photoSource)

Insert a photo into this album by inserting a MediaSource containing the photo data.

Parameters
photoSource
Throws
IOException
ServiceException

public void setAccess (String access)

Set the access for the album this data object represents. Valid values are "private" or "public". Anything other than "public" will be set as "private", which is the default.

Parameters
access The access level of the album.

public void setBytesUsed (Long bytesUsed)

Set the number of bytes used in the album this data object represents. This method is used by the server, setting this on the client will have no effect.

Parameters
bytesUsed The number of bytes used.

public void setCommentCount (Integer commentCount)

Set the number of comments on the album. Used by the server, this has no effect on the client.

Parameters
commentCount The number of comments on the album.

public void setCommentsEnabled (Boolean commentsEnabled)

Set the whether comments are enabled in the album. This will change the setting on the server if set by the owner of the album and updated.

Parameters
commentsEnabled True if comments are enabled in the album.

public void setDate (Date date)

Set the date of the album. Dates that are too early will be truncated by the server, where too early currently means anything before 1970.

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.
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 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 string for where the photos in the album were taken. This string may be geocoded by the server to provide coordinates based on the location.

Parameters
location The location of the album.

public void setName (String name)

Set the canonical name of the album. This is used on the server. If you wish to change the title of the album you should instead use setTitle(com.google.gdata.data.TextConstruct).

Parameters
name The canonical name of the album.

public void setNickname (String nickname)

Set the nickname for the owner of the album this data object represents. This is used by the server and has no effect on the client.

Parameters
nickname The nickname of the owner.

public void setPhotosLeft (Integer photosLeft)

Set the number of photos remaining that can be uploaded to this album. This is used by the server, changing this value on the client will have no effect.

Parameters
photosLeft The number of photos left.

public void setPhotosUsed (Integer photosUsed)

Set the number of photos used on the album this data object represents. This is used by the server, changing this value on the client will have no effect.

Parameters
photosUsed The number of photos used.

public void setUsername (String username)

Set the username for the owner of the album this data object represents. This is used by the server, setting it on the client will have no effect. We currently do not support moving albums between users.

Parameters
username The username of the owner.