# Google Data APIs Client Library (1.43.0)

## com.google.gdata.data.photos
Class AlbumFeed

    java.lang.Object
      com.google.gdata.data.AbstractExtension
          com.google.gdata.data.ExtensionPoint
              com.google.gdata.data.Source
                  com.google.gdata.data.BaseFeed<F,E>
                      com.google.gdata.data.media.MediaFeed<F,GphotoEntry>
                          com.google.gdata.data.photos.GphotoFeed<AlbumFeed>
                              com.google.gdata.data.photos.AlbumFeed

All Implemented Interfaces:
  Extension, BoxData, PointData, IAtom, IFeed, Kind.Adaptable, Kind.Adaptor, AlbumData, AtomData, Extensible, GphotoData, MediaData

    public class AlbumFeed

extends GphotoFeed<AlbumFeed>
implements AlbumData, AtomData

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.

Nested Class Summary

Nested classes/interfaces inherited from class com.google.gdata.data.BaseFeed
`BaseFeed.FeedHandler, BaseFeed.FeedState`

Nested classes/interfaces inherited from class com.google.gdata.data.Source
`Source.SourceHandler, Source.SourceState`

Nested classes/interfaces inherited from class com.google.gdata.data.ExtensionPoint
`ExtensionPoint.CumulativeBlobHandler, ExtensionPoint.ExtensionHandler`

Nested classes/interfaces inherited from class com.google.gdata.data.AbstractExtension
`AbstractExtension.AttributesHandler`

Field Summary

Fields inherited from class com.google.gdata.data.BaseFeed
`entries, entryClass, feedState`

Fields inherited from class com.google.gdata.data.Source
`srcState`

Fields inherited from class com.google.gdata.data.ExtensionPoint
`xmlBlob`

Fields inherited from class com.google.gdata.data.AbstractExtension
`localName, namespace`

Fields inherited from interface com.google.gdata.data.photos.AlbumData
`ALBUM_CATEGORY, ALBUM_KIND, KIND`

Constructor Summary
`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.

Method Summary
`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.
`java.lang.String` `getAccess()` The access level of the album, either private, protected, or public.
`java.lang.Long` `getBytesUsed()` The number of bytes that are used by photos in this album.
`java.lang.Integer` `getCommentCount()` The number of comments on the album.
`java.lang.Boolean` `getCommentsEnabled()` Whether or not commenting is allowed on this album.
`java.util.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.
`java.lang.String` `getLocation()` The location of the album is a string representing where the photos in the album where taken.
`java.util.List<MediaCategory>` `getMediaCategories()` Retrieve the list of media:category elements inside the media:group on this element.
`java.util.List<MediaContent>` `getMediaContents()` Retrieve the list of media:content elements inside the media:group on this element.
`java.util.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.
`java.util.List<MediaThumbnail>` `getMediaThumbnails()` Retrieve the list of media:thumbnail elements inside the media:group on this element.
`java.lang.String` `getName()` The name of the album is its canonicalized title.
`java.lang.String` `getNickname()` The nickname of the user who owns the album.
`java.util.List<PhotoEntry>` `getPhotoEntries()` Get a list of entries of the `PhotoEntry` kind.
`java.lang.Integer` `getPhotosLeft()` The number of spaces for photos that are available in the album.
`java.lang.Integer` `getPhotosUsed()` The number of photos that are contained in this album.
`java.util.List<TagEntry>` `getTagEntries()` Get a list of entries of the `TagEntry` kind.
`java.lang.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(java.lang.String access)` Set the access for the album this data object represents.
`void` `setBytesUsed(java.lang.Long bytesUsed)` Set the number of bytes used in the album this data object represents.
`void` `setCommentCount(java.lang.Integer commentCount)` Set the number of comments on the album.
`void` `setCommentsEnabled(java.lang.Boolean commentsEnabled)` Set the whether comments are enabled in the album.
`void` `setDate(java.util.Date date)` Set the date of the album.
`void` `setGeoBoundingBox(Box boundingBox)` Sets the bounding box for this entity based on a `Box` extension.
`void` `setGeoBoundingBox(Point lowerLeft, Point upperRight)` Sets the bounding box based on two `Point` objects.
`void` `setGeoLocation(java.lang.Double lat, java.lang.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(java.lang.String location)` Set the location string for where the photos in the album were taken.
`void` `setName(java.lang.String name)` Set the canonical name of the album.
`void` `setNickname(java.lang.String nickname)` Set the nickname for the owner of the album this data object represents.
`void` `setPhotosLeft(java.lang.Integer photosLeft)` Set the number of photos remaining that can be uploaded to this album.
`void` `setPhotosUsed(java.lang.Integer photosUsed)` Set the number of photos used on the album this data object represents.
`void` `setUsername(java.lang.String username)` Set the username for the owner of the album this data object represents.

Methods inherited from class com.google.gdata.data.photos.GphotoFeed
`generateRss, getDescription, getGphotoId, setDescription, setGphotoId, setGphotoId`

Methods inherited from class com.google.gdata.data.media.MediaFeed
`insert, insert, setService`

Methods inherited from class com.google.gdata.data.BaseFeed

`addAdaptor, createEntry, generate, generateAtom, generateFeedEnd, generateFeedStart, getAdaptedFeed, getAdaptor, getAdaptors, getCanPost, getEntries, getEntries, getEntryPostLink, getEtag, getFeedBatchLink, getHandler, getItemsPerPage, getKind, getNextLink, getPreviousLink, getSelectedFields, getSelf, getSelfLink, getService, getStartIndex, getTotalResults, getVersionId, insert, parseAtom, parseAtom, parseAtom, readFeed, readFeed, setCanPost, setEntries, setEtag, setItemsPerPage, setKind, setSelectedFields, setStartIndex, setTotalResults, setVersionId, visitChildren`

Methods inherited from class com.google.gdata.data.Source
`addHtmlLink, addLink, addLink, generateInnerAtom, getAuthors, getCategories, getContributors, getGenerator, getHtmlLink, getIcon, getId, getLink, getLinks, getLinks, getLogo, getRights, getSubtitle, getTitle, getUpdated, removeLinks, removeLinks, setGenerator, setGenerator, setIcon, setId, setLogo, setRights, setSubtitle, setTitle, setUpdated`

Methods inherited from class com.google.gdata.data.ExtensionPoint

`addExtension, addExtension, addRepeatingExtension, addRepeatingExtension, checkRequiredExtensions, createExtensionInstance, generate, generateCumulativeXmlBlob, generateExtensions, generateStartElement, getExtension, getExtensionDescription, getExtensionHandler, getExtensions, getManifest, getRepeatingExtension, getRepeatingExtensions, getXmlBlob, hasExtension, hasRepeatingExtension, initializeArbitraryXml, parseCumulativeXmlBlob, removeExtension, removeExtension, removeRepeatingExtension, setExtension, setXmlBlob, visit, visitChild`

Methods inherited from class com.google.gdata.data.AbstractExtension
`consumeAttributes, disableStrictValidation, enableStrictValidation, eq, generateAttributes, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, putAttributes, sameClassAs, setImmutable, throwExceptionForMissingAttribute, throwExceptionIfImmutable, validate`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

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

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

Methods inherited from interface com.google.gdata.data.photos.AtomData
`getAuthors, getCategories, getContributors, getDescription, getId, getLinks, getRights, getTitle, getUpdated, setDescription, setId, setRights, setTitle, setUpdated`

Methods inherited from interface com.google.gdata.data.IFeed
`getGenerator, getLogo, getSubtitle, setGenerator, setLogo`

Methods inherited from interface com.google.gdata.data.IAtom
`addLink, getAuthors, getCategories, getId, getLink, getLinks, getTitle, getUpdated, removeLinks, removeLinks, setId, setUpdated`

Constructor Detail

### AlbumFeed

    public AlbumFeed()

  Constructs a new empty album feed.

### AlbumFeed

    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.

Method Detail

### declareExtensions

    public void declareExtensions(ExtensionProfile extProfile)

  Description copied from class: `BaseFeed`
  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.

  Specified by:
    `declareExtensions` in interface `Kind.Adaptor`
  Specified by:
    `declareExtensions` in interface `Extensible`
  Overrides:
    `declareExtensions` in class `GphotoFeed<AlbumFeed>`
  Parameters:
    `extProfile` - the ExtensionProfile to initialize.
  See Also:
    `ExtensionProfile.addDeclarations(Kind.Adaptor)`

### insertPhoto

    public PhotoEntry insertPhoto(MediaSource photoSource)
                           throws ServiceException,
                                  java.io.IOException

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

  Throws:
    `ServiceException`
    `java.io.IOException`

### getPhotoEntries

    public java.util.List<PhotoEntry> getPhotoEntries()

  Get a list of entries of the `PhotoEntry` kind.

### getTagEntries

    public java.util.List<TagEntry> getTagEntries()

  Get a list of entries of the `TagEntry` kind.

### getAccess

    public java.lang.String getAccess()

  Description copied from interface: `AlbumData`
  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.

  Specified by:
    `getAccess` in interface `AlbumData`
  Returns:
    the access of the album.

### getBytesUsed

    public java.lang.Long getBytesUsed()
                                throws ServiceException

  Description copied from interface: `AlbumData`
  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.

  Specified by:
    `getBytesUsed` in interface `AlbumData`
  Returns:
    the number of bytes used in the album.
  Throws:
    `ServiceException`

### getCommentCount

    public java.lang.Integer getCommentCount()
                                      throws ServiceException

  Description copied from interface: `AlbumData`
  The number of comments on the album. This is calculated based on the comments stored on the server.

  Specified by:
    `getCommentCount` in interface `AlbumData`
  Returns:
    the comment count on the album.
  Throws:
    `ServiceException`

### getCommentsEnabled

    public java.lang.Boolean getCommentsEnabled()
                                         throws ServiceException

  Description copied from interface: `AlbumData`
  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.

  Specified by:
    `getCommentsEnabled` in interface `AlbumData`
  Returns:
    true if comments are enabled in this album the feed represents.
  Throws:
    `ServiceException`

### getDate

    public java.util.Date getDate()
                           throws ServiceException

  Description copied from interface: `AlbumData`
  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.

  Specified by:
    `getDate` in interface `AlbumData`
  Returns:
    the date on the album, set by the user.
  Throws:
    `ServiceException`

### getLocation

    public java.lang.String getLocation()

  Description copied from interface: `AlbumData`
  The location of the album is a string representing where the photos in the album where taken.

  Specified by:
    `getLocation` in interface `AlbumData`
  Returns:
    the location of the album.

### getName

    public java.lang.String getName()

  Description copied from interface: `AlbumData`
  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.

  Specified by:
    `getName` in interface `AlbumData`
  Returns:
    the (canonical) name of the album.

### getNickname

    public java.lang.String getNickname()

  Description copied from interface: `AlbumData`
  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.

  Specified by:
    `getNickname` in interface `AlbumData`
  Returns:
    the nickname of the owner of the album.

### getPhotosLeft

    public java.lang.Integer getPhotosLeft()
                                    throws ServiceException

  Description copied from interface: `AlbumData`
  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.

  Specified by:
    `getPhotosLeft` in interface `AlbumData`
  Returns:
    the number of photos remaining in the album.
  Throws:
    `ServiceException`

### getPhotosUsed

    public java.lang.Integer getPhotosUsed()
                                    throws ServiceException

  Description copied from interface: `AlbumData`
  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.

  Specified by:
    `getPhotosUsed` in interface `AlbumData`
  Returns:
    the number of photos used in the album.
  Throws:
    `ServiceException`

### getUsername

    public java.lang.String getUsername()

  Description copied from interface: `AlbumData`
  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.

  Specified by:
    `getUsername` in interface `AlbumData`
  Returns:
    the username of the owner of the album.

### setAccess

    public void setAccess(java.lang.String access)

  Description copied from interface: `AlbumData`
  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.

  Specified by:
    `setAccess` in interface `AlbumData`
  Parameters:
    `access` - the access level of the album.

### setBytesUsed

    public void setBytesUsed(java.lang.Long bytesUsed)

  Description copied from interface: `AlbumData`
  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.

  Specified by:
    `setBytesUsed` in interface `AlbumData`
  Parameters:
    `bytesUsed` - the number of bytes used.

### setCommentCount

    public void setCommentCount(java.lang.Integer commentCount)

  Description copied from interface: `AlbumData`
  Set the number of comments on the album. Used by the server, this has no effect on the client.

  Specified by:
    `setCommentCount` in interface `AlbumData`
  Parameters:
    `commentCount` - the number of comments on the album.

### setCommentsEnabled

    public void setCommentsEnabled(java.lang.Boolean commentsEnabled)

  Description copied from interface: `AlbumData`
  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.

  Specified by:
    `setCommentsEnabled` in interface `AlbumData`
  Parameters:
    `commentsEnabled` - true if comments are enabled in the album.

### setDate

    public void setDate(java.util.Date date)

  Description copied from interface: `AlbumData`
  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.

  Specified by:
    `setDate` in interface `AlbumData`
  Parameters:
    `date` - the date the album represents.

### setLocation

    public void setLocation(java.lang.String location)

  Description copied from interface: `AlbumData`
  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.

  Specified by:
    `setLocation` in interface `AlbumData`
  Parameters:
    `location` - the location of the album.

### setName

    public void setName(java.lang.String name)

  Description copied from interface: `AlbumData`
  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 `AtomData.setTitle(com.google.gdata.data.TextConstruct)`.

  Specified by:
    `setName` in interface `AlbumData`
  Parameters:
    `name` - the canonical name of the album.

### setNickname

    public void setNickname(java.lang.String nickname)

  Description copied from interface: `AlbumData`
  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.

  Specified by:
    `setNickname` in interface `AlbumData`
  Parameters:
    `nickname` - the nickname of the owner.

### setPhotosLeft

    public void setPhotosLeft(java.lang.Integer photosLeft)

  Description copied from interface: `AlbumData`
  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.

  Specified by:
    `setPhotosLeft` in interface `AlbumData`
  Parameters:
    `photosLeft` - the number of photos left.

### setPhotosUsed

    public void setPhotosUsed(java.lang.Integer photosUsed)

  Description copied from interface: `AlbumData`
  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.

  Specified by:
    `setPhotosUsed` in interface `AlbumData`
  Parameters:
    `photosUsed` - the number of photos used.

### setUsername

    public void setUsername(java.lang.String username)

  Description copied from interface: `AlbumData`
  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.

  Specified by:
    `setUsername` in interface `AlbumData`
  Parameters:
    `username` - the username of the owner.

### setGeoLocation

    public void setGeoLocation(java.lang.Double lat,
                               java.lang.Double lon)
                        throws java.lang.IllegalArgumentException

  Description copied from interface: `PointData`
  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.

  Specified by:
    `setGeoLocation` in interface `PointData`
  Parameters:
    `lat` - The latitude coordinate, between -90 and 90 degrees.
    `lon` - The longitude coordinate, between -180 and 180 degrees.
  Throws:
    `java.lang.IllegalArgumentException` - if the latitude and longitude coordinates are invalid.

### setGeoLocation

    public void setGeoLocation(Point point)

  Description copied from interface: `PointData`
  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.

  Specified by:
    `setGeoLocation` in interface `PointData`
  Parameters:
    `point` - A point containing the latitude and longitude coordinates.

### getGeoLocation

    public Point getGeoLocation()

  Description copied from interface: `PointData`
  Gets the geo-location of the entity.

  Specified by:
    `getGeoLocation` in interface `PointData`
  Returns:
    a Point that contains the geo-coordinates (latitude and longitude).

### clearPoint

    public void clearPoint()

  Description copied from interface: `PointData`
  Clears the point data and removes the extension point.

  Specified by:
    `clearPoint` in interface `PointData`

### clearGeoBoundingBox

    public void clearGeoBoundingBox()

  Description copied from interface: `BoxData`
  Clears the bounding box and removes the extension point.

  Specified by:
    `clearGeoBoundingBox` in interface `BoxData`

### getGeoBoundingBox

    public Box getGeoBoundingBox()

  Description copied from interface: `BoxData`
  Gets the bounding box of this entity.

  Specified by:
    `getGeoBoundingBox` in interface `BoxData`
  Returns:
    a Box that contains the boundary for the content of this entity.

### setGeoBoundingBox

    public void setGeoBoundingBox(Point lowerLeft,
                                  Point upperRight)

  Description copied from interface: `BoxData`
  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.

  Specified by:
    `setGeoBoundingBox` in interface `BoxData`
  Parameters:
    `lowerLeft` - the lower left coordinate of the box.
    `upperRight` - the upper right coordinate of the box.

### setGeoBoundingBox

    public void setGeoBoundingBox(Box boundingBox)

  Description copied from interface: `BoxData`
  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.

  Specified by:
    `setGeoBoundingBox` in interface `BoxData`
  Parameters:
    `boundingBox` - the box that bounds this entity.

### getMediaGroup

    public MediaGroup getMediaGroup()

  Description copied from interface: `MediaData`
  Retrieve the media:group element on this element. This will return null if there was no media:group element set.

  Specified by:
    `getMediaGroup` in interface `MediaData`
  Returns:
    the media:group element on the element.

### getMediaContents

    public java.util.List<MediaContent> getMediaContents()

  Description copied from interface: `MediaData`
  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.

  Specified by:
    `getMediaContents` in interface `MediaData`
  Returns:
    a list of media:content elements found on the element.

### getMediaCategories

    public java.util.List<MediaCategory> getMediaCategories()

  Description copied from interface: `MediaData`
  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.

  Specified by:
    `getMediaCategories` in interface `MediaData`
  Returns:
    a list of media:category elements found on the element.

### getMediaCredits

    public java.util.List<MediaCredit> getMediaCredits()

  Description copied from interface: `MediaData`
  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.

  Specified by:
    `getMediaCredits` in interface `MediaData`
  Returns:
    a list of media:credit elements found on this element.

### getMediaThumbnails

    public java.util.List<MediaThumbnail> getMediaThumbnails()

  Description copied from interface: `MediaData`
  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.

  Specified by:
    `getMediaThumbnails` in interface `MediaData`
  Returns:
    a list of media:thumbnail elements found on the element.

### getMediaKeywords

    public MediaKeywords getMediaKeywords()

  Description copied from interface: `MediaData`
  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.

  Specified by:
    `getMediaKeywords` in interface `MediaData`
  Returns:
    the media:keywords elements found on the element, or `null`.

### setKeywords

    public void setKeywords(MediaKeywords keywords)

  Description copied from interface: `MediaData`
  Set the media keywords on this element to the given keywords. Will create the media:group element as needed.

  Specified by:
    `setKeywords` in interface `MediaData`