Google Data APIs Client Library (1.41.1)



com.google.gdata.data.photos.impl
Class AlbumDataImpl

java.lang.Object
  extended by com.google.gdata.data.photos.impl.GphotoDataImpl
      extended by com.google.gdata.data.photos.impl.AlbumDataImpl
All Implemented Interfaces:
BoxData, PointData, AlbumData, Extensible, GphotoData, MediaData

public class AlbumDataImpl
extends GphotoDataImpl
implements AlbumData

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.


Field Summary
 
Fields inherited from interface com.google.gdata.data.photos.AlbumData
ALBUM_CATEGORY, ALBUM_KIND, KIND
 
Constructor Summary
AlbumDataImpl(ExtensionPoint extensionPoint)
          Construct a new implementation of AlbumGphotoData with the given extension point as the backing storage for data.
 
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 Extensible 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()
          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.
 java.lang.String getImageUrl()
          Deprecated. use the media:content element to get the image source.
 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.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.lang.String getThumbnail()
          Deprecated. use the media:thumbnail element to get thumbnails.
 java.lang.String getUsername()
          The username of the owner of the album.
 void setAccess(java.lang.String access)
          Set the access for the album this entry represents.
 void setBytesUsed(java.lang.Long bytesUsed)
          Set the number of bytes used in the album this entry represents.
 void setCommentCount(java.lang.Integer commentCount)
          Set the number of comments on the album this entry represents.
 void setCommentsEnabled(java.lang.Boolean commentsEnabled)
          Set the whether comments are enabled in the album this entry represents.
 void setDate(java.util.Date date)
          Sets the date on the album, this is the user-defined date.
 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 setImageUrl(java.lang.String imageUrl)
          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(java.lang.String location)
          Set the location for the album this entry represents.
 void setName(java.lang.String name)
          Set the name for the album this entry represents.
 void setNickname(java.lang.String nickname)
          Set the nickname for the owner of the album this entry represents.
 void setPhotosLeft(java.lang.Integer photosLeft)
          Set the number of photos remaining in the album this entry represents.
 void setPhotosUsed(java.lang.Integer photosUsed)
          Set the number of photos used on the album this entry represents.
 void setThumbnail(java.lang.String thumbUrl)
          Deprecated. use the media:thumbnail element to set thumbnails.
 void setUsername(java.lang.String username)
          Set the username for the owner of the album this entry represents.
 
Methods inherited from class com.google.gdata.data.photos.impl.GphotoDataImpl
addExtension, addRepeatingExtension, declare, getExtension, getGphotoId, getRepeatingExtension, getSimpleValue, removeExtension, removeExtension, removeRepeatingExtension, setExtension, setGphotoId, setGphotoId
 
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
 

Constructor Detail

AlbumDataImpl

public AlbumDataImpl(ExtensionPoint extensionPoint)
Construct a new implementation of AlbumGphotoData with the given extension point as the backing storage for data.

Method Detail

declareExtensions

public void declareExtensions(ExtensionProfile extProfile)
Description copied from interface: Extensible
Declares the set of expected Extension types for an Extensible within the target extension profile. Forwards to ExtensionPoint.declareExtensions(ExtensionProfile).

Specified by:
declareExtensions in interface Extensible
Overrides:
declareExtensions in class GphotoDataImpl
Parameters:
extProfile - the ExtensionProfile to initialize.

getThumbnail

@Deprecated
public java.lang.String getThumbnail()
Deprecated. use the media:thumbnail element to get thumbnails.

Returns the photo:thumbnail element for the album.

Returns:
the photo:thumbnail on the entry.

setThumbnail

@Deprecated
public void setThumbnail(java.lang.String thumbUrl)
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.

getImageUrl

@Deprecated
public java.lang.String getImageUrl()
Deprecated. use the media:content element to get the image source.

Returns:
the photo:imgsrc on the entry.

setImageUrl

@Deprecated
public void setImageUrl(java.lang.String imageUrl)
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.

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

setName

public void setName(java.lang.String name)
Set the name for the album this entry represents.

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

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

setLocation

public void setLocation(java.lang.String location)
Set the location for the album this entry represents.

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

getDate

public java.util.Date getDate()
Gets the date on the album, this is the date set by the user.

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

setDate

public void setDate(java.util.Date date)
Sets the date on the album, this is the user-defined date.

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

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

setAccess

public void setAccess(java.lang.String access)
Set the access for the album this entry represents.

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

getPhotosUsed

public java.lang.Integer getPhotosUsed()
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 this entry represents.

setPhotosUsed

public void setPhotosUsed(java.lang.Integer photosUsed)
Set the number of photos used on the album this entry represents.

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

getPhotosLeft

public java.lang.Integer getPhotosLeft()
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 this entry represents.

setPhotosLeft

public void setPhotosLeft(java.lang.Integer photosLeft)
Set the number of photos remaining in the album this entry represents.

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

getBytesUsed

public java.lang.Long getBytesUsed()
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 this entry represents.

setBytesUsed

public void setBytesUsed(java.lang.Long bytesUsed)
Set the number of bytes used in the album this entry represents.

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

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

setUsername

public void setUsername(java.lang.String username)
Set the username for the owner of the album this entry represents.

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

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

setNickname

public void setNickname(java.lang.String nickname)
Set the nickname for the owner of the album this entry represents.

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

getCommentsEnabled

public java.lang.Boolean getCommentsEnabled()
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 entry represents.

setCommentsEnabled

public void setCommentsEnabled(java.lang.Boolean commentsEnabled)
Set the whether comments are enabled in the album this entry represents.

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

getCommentCount

public java.lang.Integer getCommentCount()
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 this entry represents.

setCommentCount

public void setCommentCount(java.lang.Integer commentCount)
Set the number of comments on the album this entry represents.

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

setGeoLocation

public void setGeoLocation(java.lang.Double lat,
                           java.lang.Double lon)
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.

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

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.

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

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