public class

MediaRestriction

extends AbstractExtension
java.lang.Object
   ↳ com.google.gdata.data.AbstractExtension
     ↳ com.google.gdata.data.media.mediarss.MediaRestriction

Class Overview

<media:category>. See description on http://search.yahoo.com/mrss.

Summary

Nested Classes
enum MediaRestriction.Relationship Values for the relationship attribute. 
enum MediaRestriction.Type Values for the type attribute. 
Fields
private MediaRestriction.Relationship relationship
private MediaRestriction.Type type
[Expand]
Inherited Fields
From class com.google.gdata.data.AbstractExtension
Public Constructors
MediaRestriction()
Public Methods
String getContent()
List<String> getContentAsCountryCodeList()
Gets the content as a space-separated list of country codes.
MediaRestriction.Relationship getRelationship()
MediaRestriction.Type getType()
void setContent(String content)
void setContentAsCountryCodeList(List<String> codes)
Sets the content as a space-separated list of country codes.
void setRelationship(MediaRestriction.Relationship relationship)
void setType(MediaRestriction.Type type)
Protected Methods
void consumeAttributes(AttributeHelper attrsHelper)
Consumes attributes from the attribute helper.
void putAttributes(AttributeGenerator generator)
Puts attributes into the attribute generator.
[Expand]
Inherited Methods
From class com.google.gdata.data.AbstractExtension
From class java.lang.Object
From interface com.google.gdata.data.Extension

Fields

private MediaRestriction.Relationship relationship

private MediaRestriction.Type type

Public Constructors

public MediaRestriction ()

Public Methods

public String getContent ()

public List<String> getContentAsCountryCodeList ()

Gets the content as a space-separated list of country codes. Check the type before calling this method.

Returns
  • a list of strings

public MediaRestriction.Relationship getRelationship ()

public MediaRestriction.Type getType ()

public void setContent (String content)

Parameters
content

public void setContentAsCountryCodeList (List<String> codes)

Sets the content as a space-separated list of country codes.

Parameters
codes A list of country codes

public void setRelationship (MediaRestriction.Relationship relationship)

Parameters
relationship

public void setType (MediaRestriction.Type type)

Parameters
type

Protected Methods

protected void consumeAttributes (AttributeHelper attrsHelper)

Consumes attributes from the attribute helper. May also use consumeContent(boolean) to consume the element's text content. Called from getHandler(ExtensionProfile, String, String, Attributes). Default implementation does nothing, though generally this is discouraged unless there really are no attributes.

Parameters
attrsHelper Attribute helper

protected void putAttributes (AttributeGenerator generator)

Puts attributes into the attribute generator. Called from generate(XmlWriter, ExtensionProfile). Default implementation does nothing, though generally this is discouraged unless there really are no attributes.

Parameters
generator Attribute generator