Lizzy v1.1.1

christophedelory.rss.media
Class BaseMedia

java.lang.Object
  extended by christophedelory.rss.media.BaseMedia
Direct Known Subclasses:
Channel, Content, Group, Item

public class BaseMedia
extends Object

The base media description in Media RSS. The following elements are optional and may appear as sub-elements of channel, item, media content and/or media:group. When an element appears at a shallow level, such as channel or item, it means that the element should be applied to every media object within its scope. Duplicated elements appearing at deeper levels of the document tree have higher priority over other levels. For example, media content level elements are favored over item level elements. The priority level is listed from strongest to weakest: media content, media group, item, channel.

Version:
$Revision: 92 $
Author:
Christophe Delory

Constructor Summary
BaseMedia()
           
 
Method Summary
 void addMediaCategory(Category mediaCategory)
          Includes this media object in the specified category.
 void addMediaCredit(Credit mediaCredit)
          Adds a credit.
 void addMediaHash(Hash mediaHash)
          Adds a hash to this media object.
 void addMediaRating(Rating mediaRating)
          Adds a rating to this media object.
 void addMediaRestriction(Restriction mediaRestriction)
          Adds a restriction.
 void addMediaText(Text mediaText)
          Adds a text.
 void addMediaThumbnail(Thumbnail mediaThumbnail)
          Adds a thumbnail.
 Boolean getMediaAdult()
          Specifies if this media object is rated "adult" or not.
 List<Category> getMediaCategories()
          Returns a list of media object categories.
 Copyright getMediaCopyright()
          Returns copyright information for media object.
 List<Credit> getMediaCredits()
          Returns a list of credits.
 Description getMediaDescription()
          Returns the description of the media object.
 List<Hash> getMediaHashes()
          Returns a list of media object hashes.
 String getMediaKeywords()
          Returns highly relevant keywords describing the media object with typically a maximum of ten words.
 Player getMediaPlayer()
          Returns the player definition, if any.
 List<Rating> getMediaRatings()
          Returns a list of media object ratings.
 List<Restriction> getMediaRestrictions()
          Returns a list of restrictions.
 List<Text> getMediaTexts()
          Returns a list of texts.
 List<Thumbnail> getMediaThumbnails()
          Returns the list of thumbnails.
 Title getMediaTitle()
          Returns the title of the media object.
 boolean isMediaAdult()
          Specifies if this media object is rated "adult" or not.
 void setMediaAdult(boolean mediaAdult)
          Specifies if this media object is rated "adult" or not.
 void setMediaAdult(Boolean mediaAdult)
          Specifies if this media object is rated "adult" or not.
 void setMediaCopyright(Copyright mediaCopyright)
          Initializes copyright information for media object.
 void setMediaDescription(Description mediaDescription)
          Initializes the description of the media object.
 void setMediaKeywords(String mediaKeywords)
          Initializes highly relevant keywords describing the media object with typically a maximum of ten words.
 void setMediaPlayer(Player mediaPlayer)
          Initializes the player definition.
 void setMediaTitle(Title mediaTitle)
          Initializes the title of the media object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseMedia

public BaseMedia()
Method Detail

setMediaPlayer

public void setMediaPlayer(Player mediaPlayer)
Initializes the player definition.

Parameters:
mediaPlayer - a player definition. May be null.
See Also:
getMediaPlayer()

getMediaPlayer

public Player getMediaPlayer()
Returns the player definition, if any.

Returns:
a player definition. May be null.
See Also:
setMediaPlayer(christophedelory.rss.media.Player)

addMediaThumbnail

public void addMediaThumbnail(Thumbnail mediaThumbnail)
Adds a thumbnail.

Parameters:
mediaThumbnail - a thumbnail. Shall not be null.
Throws:
NullPointerException - if mediaThumbnail is null.
See Also:
getMediaThumbnails()

getMediaThumbnails

public List<Thumbnail> getMediaThumbnails()
Returns the list of thumbnails.

Returns:
a list of thumbnails. May be empty but not null.
See Also:
addMediaThumbnail(christophedelory.rss.media.Thumbnail)

setMediaTitle

public void setMediaTitle(Title mediaTitle)
Initializes the title of the media object.

Parameters:
mediaTitle - a title. May be null.
See Also:
getMediaTitle()

getMediaTitle

public Title getMediaTitle()
Returns the title of the media object.

Returns:
a title. May be null.
See Also:
setMediaTitle(christophedelory.rss.media.Title)

getMediaDescription

public Description getMediaDescription()
Returns the description of the media object.

Returns:
a description. May be null.
See Also:
setMediaDescription(christophedelory.rss.media.Description)

setMediaDescription

public void setMediaDescription(Description mediaDescription)
Initializes the description of the media object.

Parameters:
mediaDescription - a description. May be null.
See Also:
getMediaDescription()

isMediaAdult

public boolean isMediaAdult()
Specifies if this media object is rated "adult" or not.

Returns:
an adult rating indicator.
See Also:
setMediaAdult(boolean), getMediaAdult()

setMediaAdult

public void setMediaAdult(boolean mediaAdult)
Specifies if this media object is rated "adult" or not.

Parameters:
mediaAdult - an adult rating indicator.
See Also:
isMediaAdult(), setMediaAdult(boolean)

getMediaAdult

public Boolean getMediaAdult()
Specifies if this media object is rated "adult" or not. This is deprecated, and has been replaced with the more flexible media rating. If not specified, defaults to false.

Returns:
an adult rating indicator. May be null.
See Also:
setMediaAdult(boolean), isMediaAdult()

setMediaAdult

public void setMediaAdult(Boolean mediaAdult)
Specifies if this media object is rated "adult" or not.

Parameters:
mediaAdult - an adult rating indicator. May be null.
See Also:
getMediaAdult(), setMediaAdult(boolean)

getMediaCategories

public List<Category> getMediaCategories()
Returns a list of media object categories. You may include as many category elements as you need to, for different schemes, and to have a content cross-referenced in different parts of the same scheme.

Returns:
a list of media object categories. May be empty but not null.
Since:
0.92
See Also:
addMediaCategory(christophedelory.rss.media.Category)

addMediaCategory

public void addMediaCategory(Category mediaCategory)
Includes this media object in the specified category.

Parameters:
mediaCategory - a category. Shall not be null.
Throws:
NullPointerException - if category is null.
See Also:
getMediaCategories()

getMediaRatings

public List<Rating> getMediaRatings()
Returns a list of media object ratings.

Returns:
a list of media object ratings. May be empty but not null.
See Also:
addMediaRating(christophedelory.rss.media.Rating)

addMediaRating

public void addMediaRating(Rating mediaRating)
Adds a rating to this media object.

Parameters:
mediaRating - a rating. Shall not be null.
Throws:
NullPointerException - if mediaRating is null.
See Also:
getMediaRatings()

getMediaKeywords

public String getMediaKeywords()
Returns highly relevant keywords describing the media object with typically a maximum of ten words. The keywords and phrases should be comma delimited. Example:
 <media:keywords>kitty, cat, big dog, yarn, fluffy</media:keywords>
 

Returns:
some keywords. May be null
See Also:
setMediaKeywords(java.lang.String)

setMediaKeywords

public void setMediaKeywords(String mediaKeywords)
Initializes highly relevant keywords describing the media object with typically a maximum of ten words.

Parameters:
mediaKeywords - some keywords. May be null
See Also:
setMediaKeywords(java.lang.String)

getMediaHashes

public List<Hash> getMediaHashes()
Returns a list of media object hashes.

Returns:
a list of media object hashes. May be empty but not null.
See Also:
addMediaHash(christophedelory.rss.media.Hash)

addMediaHash

public void addMediaHash(Hash mediaHash)
Adds a hash to this media object.

Parameters:
mediaHash - a hash. Shall not be null.
Throws:
NullPointerException - if mediaHash is null.
See Also:
getMediaHashes()

getMediaCredits

public List<Credit> getMediaCredits()
Returns a list of credits.

Returns:
a list of credits. May be empty but not null.
See Also:
addMediaCredit(christophedelory.rss.media.Credit)

addMediaCredit

public void addMediaCredit(Credit mediaCredit)
Adds a credit.

Parameters:
mediaCredit - a credit. Shall not be null.
Throws:
NullPointerException - if mediaCredit is null.
See Also:
getMediaCredits()

getMediaCopyright

public Copyright getMediaCopyright()
Returns copyright information for media object.

Returns:
a copyright element. May be null
See Also:
setMediaCopyright(christophedelory.rss.media.Copyright)

setMediaCopyright

public void setMediaCopyright(Copyright mediaCopyright)
Initializes copyright information for media object.

Parameters:
mediaCopyright - a copyright element. May be null
See Also:
setMediaCopyright(christophedelory.rss.media.Copyright)

getMediaTexts

public List<Text> getMediaTexts()
Returns a list of texts.

Returns:
a list of texts. May be empty but not null.
See Also:
addMediaText(christophedelory.rss.media.Text)

addMediaText

public void addMediaText(Text mediaText)
Adds a text.

Parameters:
mediaText - a text. Shall not be null.
Throws:
NullPointerException - if mediaText is null.
See Also:
getMediaTexts()

getMediaRestrictions

public List<Restriction> getMediaRestrictions()
Returns a list of restrictions.

Returns:
a list of restrictions. May be empty but not null.
See Also:
addMediaRestriction(christophedelory.rss.media.Restriction)

addMediaRestriction

public void addMediaRestriction(Restriction mediaRestriction)
Adds a restriction.

Parameters:
mediaRestriction - a restriction. Shall not be null.
Throws:
NullPointerException - if mediaRestriction is null.
See Also:
getMediaRestrictions()

© 2008-2009 Christophe Delory

Copyright © 2008-2009 Christophe Delory. All Rights Reserved.