# Google Data APIs Client Library (1.43.0)

## com.google.gdata.data.photos.impl
Class MediaDataImpl

    java.lang.Object
      com.google.gdata.data.photos.impl.MediaDataImpl

All Implemented Interfaces:
  Extensible, MediaData

    public class MediaDataImpl

extends java.lang.Object
implements MediaData

Implementation of the MediaData interface. This currently only supports mediarss content inside of a media:group element, it doesn't handle inlined media:content or media:thumbnail elements. This class uses a passed in `ExtensionPoint` to pull extensions from.

Constructor Summary
`MediaDataImpl(ExtensionPoint extensionPoint)` Construct a new implementation of MediaData with the given extension point as the backing storage for data.

Method Summary
`void` `addExtension(Extension extension)` Adds an extension object.
`void` `addRepeatingExtension(Extension extension)` Adds a repeating extension object.
`void` `declareExtensions(ExtensionProfile extProfile)` Declares the set of expected Extension types for an Extensible within the target extension profile.
`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` `removeExtension(java.lang.Class<? extends Extension> extensionClass)` Removes an extension object based on its class.
`void` `removeExtension(Extension extension)` Removes an extension object.
`void` `removeRepeatingExtension(Extension extension)` Removes a repeating extension object.
`void` `setExtension(Extension extension)` Sets an extension object.
`void` `setKeywords(MediaKeywords keywords)` Set the media keywords on this element to the given keywords.

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

Constructor Detail

### MediaDataImpl

    public MediaDataImpl(ExtensionPoint extensionPoint)

  Construct a new implementation of MediaData 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`
  Parameters:
    `extProfile` - the ExtensionProfile to initialize.

### 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:
    the list of media:content elements on the extension point.

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

### addExtension

    public void addExtension(Extension extension)

  Description copied from interface: `Extensible`
  Adds an extension object. Forwards to `ExtensionPoint.addExtension(Extension)`.

  Specified by:
    `addExtension` in interface `Extensible`

### setExtension

    public void setExtension(Extension extension)

  Description copied from interface: `Extensible`
  Sets an extension object. If one exists of this type, it's replaced. Forwards to `ExtensionPoint.setExtension(Extension)`.

  Specified by:
    `setExtension` in interface `Extensible`

### addRepeatingExtension

    public void addRepeatingExtension(Extension extension)

  Description copied from interface: `Extensible`
  Adds a repeating extension object. Forwards to `ExtensionPoint.addRepeatingExtension(Extension)`.

  Specified by:
    `addRepeatingExtension` in interface `Extensible`

### removeExtension

    public void removeExtension(java.lang.Class<? extends Extension> extensionClass)

  Description copied from interface: `Extensible`
  Removes an extension object based on its class. Forwards to `ExtensionPoint.removeExtension(Class)`.

  Specified by:
    `removeExtension` in interface `Extensible`

### removeExtension

    public void removeExtension(Extension extension)

  Description copied from interface: `Extensible`
  Removes an extension object. Forwards to `ExtensionPoint.removeExtension(Extension)`.

  Specified by:
    `removeExtension` in interface `Extensible`

### removeRepeatingExtension

    public void removeRepeatingExtension(Extension extension)

  Description copied from interface: `Extensible`
  Removes a repeating extension object. Forwards to `ExtensionPoint.removeRepeatingExtension(Extension)`.

  Specified by:
    `removeRepeatingExtension` in interface `Extensible`