public class YouTubeMediaGroup extends MediaGroup
<media:group>
.
See description on
http://search.yahoo.com/mrss.ExtensionPoint.CumulativeBlobHandler, ExtensionPoint.ExtensionHandler
Constructor and Description |
---|
YouTubeMediaGroup() |
Modifier and Type | Method and Description |
---|---|
void |
addContent(MediaContent content)
Adds a new
MediaContent . |
void |
addContent(YouTubeMediaContent content)
Adds a
media:content tag. |
void |
addCredit(MediaCredit credit)
Adds a new
MediaCredit . |
void |
addCredit(YouTubeMediaCredit credit)
Adds a
media:credit tag. |
void |
addRating(MediaRating rating)
Adds a new
MediaRating . |
void |
addRating(YouTubeMediaRating rating)
Adds a
media:rating tag. |
void |
clearContents()
Clears the list of
media:content tags. |
void |
clearCredits()
Clears the list of
media:credit tags. |
void |
clearRatings()
Clears the list of
media:rating tags. |
void |
declareExtensions(ExtensionProfile extProfile)
Declare extensions available in media:group on youtube feeds.
|
YtAspectRatio |
getAspectRatio() |
java.util.List<MediaContent> |
getContents()
Gets a read-only list of
MediaContent . |
java.util.List<MediaCredit> |
getCredits()
Gets a read-only list of
MediaCredit . |
java.lang.Long |
getDuration()
Gets the duration, in seconds, of the youtube video.
|
java.util.List<MediaRating> |
getRatings()
Gets a read-only list of
MediaRating . |
DateTime |
getUploaded()
Returns the time the video was uploaded at.
|
java.lang.String |
getUploader()
Gets the YouTube user who uploaded the video.
|
YouTubeMediaCredit.Type |
getUploaderType()
Checks whether the uploader is a partner.
|
java.lang.String |
getVideoId()
Gets the YouTube ID of the video.
|
MediaCategory |
getYouTubeCategory()
A YouTube media group can have only one YouTube category defined by this
scheme:
YouTubeNamespace.CATEGORY_SCHEME and this method is a
helper for retrieving it. |
java.util.List<YouTubeMediaContent> |
getYouTubeContents()
Gets a modifiable list of
YouTubeMediaContent . |
java.util.List<YouTubeMediaCredit> |
getYouTubeCredits()
Gets a modifiable list of
YouTubeMediaCredit . |
java.util.List<YouTubeMediaRating> |
getYouTubeRatings()
Gets a modifiable list of
YouTubeMediaRating . |
boolean |
isPrivate()
Checks the yt:private flag.
|
void |
setAspectRatio(YtAspectRatio aspectRatio) |
void |
setDuration(java.lang.Long seconds)
Sets the duration, in seconds, of the youtube video.
|
void |
setPrivate(boolean makePrivate)
Sets the yt:private flag.
|
void |
setUploaded(DateTime dateTime)
Sets or unsets the time the video was uploaded at.
|
void |
setUploader(java.lang.String uploader)
Sets the YouTube user who uploaded the video.
|
void |
setVideoId(java.lang.String videoId)
Sets the YouTube video ID of the video.
|
void |
setYouTubeCategory(java.lang.String name)
Sets or changes the previously set YouTube category.
|
addCategory, addRestriction, addText, addThumbnail, clearCategories, clearRestrictions, clearTexts, clearThumbnails, getCategories, getCategoriesWithScheme, getCopyright, getDefaultDescription, getDescription, getHash, getKeywords, getPlayer, getRestrictions, getTexts, getThumbnails, getTitle, setCopyright, setDescription, setHash, setKeywords, setPlayer, setTitle
addExtension, addRepeatingExtension, generateCumulativeXmlBlob, getExtension, getExtensions, getHandler, getRepeatingExtension, getRepeatingExtensions, getXmlBlob, hasExtension, hasRepeatingExtension, parseCumulativeXmlBlob, removeExtension, removeExtension, removeRepeatingExtension, setExtension, setXmlBlob, visit
disableStrictValidation, enableStrictValidation, generate, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, setImmutable
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
generate, getHandler
public java.lang.String getVideoId()
public void setVideoId(java.lang.String videoId)
public java.lang.Long getDuration()
public void setDuration(java.lang.Long seconds)
public DateTime getUploaded()
public void setUploaded(DateTime dateTime)
public void setUploader(java.lang.String uploader)
uploader
- YouTube user name or null
public java.lang.String getUploader()
null
public YouTubeMediaCredit.Type getUploaderType()
public java.util.List<YouTubeMediaContent> getYouTubeContents()
YouTubeMediaContent
.MediaContent
.public void addContent(MediaContent content)
MediaContent
.
YouTube entries can only contain YouTubeMediaContent
and this
method checks that at runtime. Please use
addContent(YouTubeMediaContent)
instead.addContent
in class MediaGroup
content
- java.lang.IllegalArgumentException
- if content
is not a
YouTubeMediaContent
public java.util.List<MediaContent> getContents()
MediaContent
.
YouTube entries only contain YouTubeMediaContent
. Please use
getYouTubeContents()
instead to make sure you have access to
a modifiable lis.
This collection has been made read-only to make sure only
YouTubeMediaContent
are ever added. Please use
getYouTubeContents()
/addContent(YouTubeMediaContent)
to
modify the list of media:content tags..getContents
in class MediaGroup
MediaContent
public void clearContents()
media:content
tags.clearContents
in class MediaGroup
public void addContent(YouTubeMediaContent content)
media:content
tag.content
- public java.util.List<YouTubeMediaRating> getYouTubeRatings()
YouTubeMediaRating
.MediaRating
.public void addRating(MediaRating rating)
MediaRating
.
YouTube entries can only contain YouTubeMediaRating
and this
method checks that at runtime. Please use
addRating(YouTubeMediaRating)
instead.addRating
in class MediaGroup
rating
- java.lang.IllegalArgumentException
- if rating
is not a
YouTubeMediaRating
public java.util.List<MediaRating> getRatings()
MediaRating
.
YouTube entries only contain YouTubeMediaRating
. Please use
getYouTubeRatings()
instead to make sure you have access to
a modifiable lis.
This collection has been made read-only to make sure only
YouTubeMediaRating
are ever added. Please use
getYouTubeRatings()
/addRating(YouTubeMediaRating)
to
modify the list of media:rating tags..getRatings
in class MediaGroup
MediaRating
public void clearRatings()
media:rating
tags.clearRatings
in class MediaGroup
public void addRating(YouTubeMediaRating rating)
media:rating
tag.rating
- public java.util.List<YouTubeMediaCredit> getYouTubeCredits()
YouTubeMediaCredit
.MediaCredit
.public void addCredit(MediaCredit credit)
MediaCredit
.
YouTube entries can only contain YouTubeMediaCredit
and this
method checks that at runtime. Please use
addCredit(YouTubeMediaCredit)
instead.addCredit
in class MediaGroup
credit
- java.lang.IllegalArgumentException
- if credit
is not a
YouTubeMediaCredit
public java.util.List<MediaCredit> getCredits()
MediaCredit
.
YouTube entries only contain YouTubeMediaCredit
. Please use
getYouTubeCredits()
instead to make sure you have access to
a modifiable lis.
This collection has been made read-only to make sure only
YouTubeMediaCredit
are ever added. Please use
getYouTubeCredits()
/addCredit(YouTubeMediaCredit)
to
modify the list of media:credit tags..getCredits
in class MediaGroup
MediaCredit
public void clearCredits()
media:credit
tags.clearCredits
in class MediaGroup
public void addCredit(YouTubeMediaCredit credit)
media:credit
tag.credit
- public void setAspectRatio(YtAspectRatio aspectRatio)
public YtAspectRatio getAspectRatio()
public boolean isPrivate()
public void setPrivate(boolean makePrivate)
public MediaCategory getYouTubeCategory()
YouTubeNamespace.CATEGORY_SCHEME
and this method is a
helper for retrieving it. See also: MediaGroup.getCategories()
.
If two or more such categories are specified it cannot be determined which is the right one so this method will return null.
public void setYouTubeCategory(java.lang.String name)
name
- the new category name to set.public void declareExtensions(ExtensionProfile extProfile)
declareExtensions
in class MediaGroup
extProfile
- the ExtensionProfile to initialize.