# Google Data APIs Client Library (1.43.0)

## com.google.gdata.data.photos
Interface MediaData

All Superinterfaces:
  Extensible

All Known Subinterfaces:
  AlbumData, PhotoData

All Known Implementing Classes:
  AlbumDataImpl, AlbumEntry, AlbumFeed, MediaDataImpl, PhotoDataImpl, PhotoEntry, PhotoFeed

    public interface MediaData

extends Extensible

An interface for anything that supports mediarss content to implement, provides helpful get and set methods for getting and setting mediarss elements. This takes some of the pain out of sticking data into the media group nested element. This interface is currently supported by the album and photo data interfaces.

Method Summary
`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.
`void` `setKeywords(MediaKeywords keywords)` Set the media keywords on this element to the given keywords.

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

Method Detail

### getMediaGroup

    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.

### getMediaContents

    java.util.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.

### getMediaCategories

    java.util.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.

### getMediaCredits

    java.util.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.

### getMediaThumbnails

    java.util.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.

### getMediaKeywords

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

### setKeywords

    void setKeywords(MediaKeywords keywords)

  Set the media keywords on this element to the given keywords. Will create the media:group element as needed.