public class MediaContent
extends java.lang.Object
implements java.io.Serializable
<media:content> is a sub-element of either <item> or <media:group>. Media objects that are not the same content should not be included in the same <media:group> element. The sequence of these items implies the order of presentation. While many of the attributes appear to be audio/video specific, this element can be used to publish any type of media. It contains 14 attributes, most of which are optional.
<media:content url="http://www.foo.com/movie.mov" fileSize="12216320" type="video/quicktime" medium="video" isDefault="true" expression="full" bitrate="128" framerate="25" samplingrate="44.1" channels="2" duration="185" height="200" width="300" lang="en" />
url should specify the direct url to the media object. If not included, a <media:player> element must be specified.
fileSize is the number of bytes of the media object. It is an optional attribute.
type is the standard MIME type of the object. It is an optional attribute.
medium is the type of object (image | audio | video | document | executable). While this attribute can at times seem redundant if type is supplied, it is included because it simplifies decision making on the reader side, as well as flushes out any ambiguities between MIME type and object type. It is an optional attribute.
isDefault determines if this is the default object that should be used for the <media:group>. There should only be one default object per <media:group>. It is an optional attribute.
expression determines if the object is a sample or the full version of the object, or even if it is a continuous stream (sample | full | nonstop). Default value is 'full'. It is an optional attribute.
bitrate is the kilobits per second rate of media. It is an optional attribute.
framerate is the number of frames per second for the media object. It is an optional attribute.
samplingrate is the number of samples per second taken to create the media object. It is expressed in thousands of samples per second (kHz). It is an optional attribute.
channels is number of audio channels in the media object. It is an optional attribute.
duration is the number of seconds the media object plays. It is an optional attribute.
height is the height of the media object. It is an optional attribute.
width is the width of the media object. It is an optional attribute.
lang is the primary language encapsulated in the media object. Language codes possible are detailed in RFC 3066. This attribute is used similar to the xml:lang attribute detailed in the XML 1.0 Specification (Third Edition). It is an optional attribute.
These optional attributes, along with the optional elements below, contain the primary metadata entries needed to index and organize media content. Additional supported attributes for describing images, audio, and video may be added in future revisions of this document.
MediaContent corresponds to theModifier and Type | Field and Description |
---|---|
private java.lang.Integer |
audioChannels |
private java.lang.Float |
bitrate |
private boolean |
defaultContent |
private java.lang.Long |
duration |
private Expression |
expression |
private java.lang.Long |
fileSize |
private java.lang.Float |
framerate |
private java.lang.Integer |
height |
private java.lang.String |
language |
private java.lang.String |
medium |
private Metadata |
metadata |
private PlayerReference |
player |
private Reference |
reference |
private java.lang.Float |
samplingrate |
private static long |
serialVersionUID |
private java.lang.String |
type |
private java.lang.Integer |
width |
Constructor and Description |
---|
MediaContent(Reference reference) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.Integer |
getAudioChannels()
channels is number of audio channels in the media object.
|
java.lang.Float |
getBitrate()
bitrate is the kilobits per second rate of media.
|
java.lang.Long |
getDuration()
duration is the number of seconds the media object plays.
|
Expression |
getExpression()
expression determines if the object is a sample or the full version of the object, or even if
it is a continuous stream (sample | full | nonstop).
|
java.lang.Long |
getFileSize()
fileSize is the number of bytes of the media object.
|
java.lang.Float |
getFramerate()
framerate is the number of frames per second for the media object.
|
java.lang.Integer |
getHeight()
height is the height of the media object.
|
java.lang.String |
getLanguage()
lang is the primary language encapsulated in the media object.
|
java.lang.String |
getMedium()
Get the value of medium
|
Metadata |
getMetadata()
The metadata for the item
|
PlayerReference |
getPlayer()
<media:player>
|
Reference |
getReference()
The player or URL reference for the item
|
java.lang.Float |
getSamplingrate()
samplingrate is the number of samples per second taken to create the media object.
|
java.lang.String |
getType()
type is the standard MIME type of the object.
|
java.lang.Integer |
getWidth()
width is the width of the media object.
|
int |
hashCode() |
boolean |
isDefaultContent()
isDefault determines if this is the default object that should be used for the
|
void |
setAudioChannels(java.lang.Integer audioChannels)
channels is number of audio channels in the media object.
|
void |
setBitrate(java.lang.Float bitrate)
bitrate is the kilobits per second rate of media.
|
void |
setDefaultContent(boolean defaultContent)
isDefault determines if this is the default object that should be used for the
|
void |
setDuration(java.lang.Long duration)
duration is the number of seconds the media object plays.
|
void |
setExpression(Expression expression)
expression determines if the object is a sample or the full version of the object, or even if
it is a continuous stream (sample | full | nonstop).
|
void |
setFileSize(java.lang.Long fileSize)
fileSize is the number of bytes of the media object.
|
void |
setFramerate(java.lang.Float framerate)
framerate is the number of frames per second for the media object.
|
void |
setHeight(java.lang.Integer height)
height is the height of the media object.
|
void |
setLanguage(java.lang.String language)
lang is the primary language encapsulated in the media object.
|
void |
setMedium(java.lang.String newmedium)
Set the value of medium
|
void |
setMetadata(Metadata metadata)
The metadata for the item
|
void |
setPlayer(PlayerReference player)
<media:player>
|
void |
setReference(Reference reference)
The player or URL reference for the item
|
void |
setSamplingrate(java.lang.Float samplingrate)
samplingrate is the number of samples per second taken to create the media object.
|
void |
setType(java.lang.String type)
type is the standard MIME type of the object.
|
void |
setWidth(java.lang.Integer width)
width is the width of the media object.
|
java.lang.String |
toString() |
private static final long serialVersionUID
private Expression expression
private java.lang.Float bitrate
private java.lang.Float framerate
private java.lang.Float samplingrate
private java.lang.Integer audioChannels
private java.lang.Integer height
private java.lang.Integer width
private java.lang.Long duration
private java.lang.Long fileSize
private Metadata metadata
private PlayerReference player
private Reference reference
private java.lang.String language
private java.lang.String medium
private java.lang.String type
private boolean defaultContent
public MediaContent(Reference reference)
reference
- UrlReference or Player reference for the item.public void setAudioChannels(java.lang.Integer audioChannels)
audioChannels
- channels is number of audio channels in the media object. It is an
optional attribute.public java.lang.Integer getAudioChannels()
public void setBitrate(java.lang.Float bitrate)
bitrate
- bitrate is the kilobits per second rate of media. It is an optional attribute.public java.lang.Float getBitrate()
public void setDefaultContent(boolean defaultContent)
defaultContent
- isDefault determines if this is the default object that should be used
for the public boolean isDefaultContent()
public void setDuration(java.lang.Long duration)
duration
- duration is the number of seconds the media object plays. It is an optional
attribute.public java.lang.Long getDuration()
public void setExpression(Expression expression)
expression
- expression determines if the object is a sample or the full version of the
object, or even if it is a continuous stream (sample | full | nonstop). Default
value is 'full'. It is an optional attribute.public Expression getExpression()
public void setFileSize(java.lang.Long fileSize)
fileSize
- The fileSize to set.public java.lang.Long getFileSize()
public void setFramerate(java.lang.Float framerate)
framerate
- framerate is the number of frames per second for the media object. It is an
optional attribute.public java.lang.Float getFramerate()
public void setHeight(java.lang.Integer height)
height
- height is the height of the media object. It is an optional attribute.public java.lang.Integer getHeight()
public void setLanguage(java.lang.String language)
language
- lang is the primary language encapsulated in the media object. Language codes
possible are detailed in RFC 3066. This attribute is used similar to the xml:lang
attribute detailed in the XML 1.0 Specification (Third Edition). It is an optional
attribute.public java.lang.String getLanguage()
public void setMedium(java.lang.String newmedium)
newmedium
- new value of mediumpublic java.lang.String getMedium()
public void setMetadata(Metadata metadata)
metadata
- The metadata for the itempublic Metadata getMetadata()
public void setPlayer(PlayerReference player)
Allows the media object to be accessed through a web browser media player console. This element is required only if a direct media url attribute is not specified in the <media:content> element. It has 1 required attribute, and 2 optional attributes.
<media:player url="http://www.foo.com/player?id=1111" height="200" width="400" />
url is the url of the player console that plays the media. It is a required attribute.
height is the height of the browser window that the url should be opened in. It is an optional attribute.
width is the width of the browser window that the url should be opened in. It is an optional attribute.
player
- PlayerReference for the item.public PlayerReference getPlayer()
Allows the media object to be accessed through a web browser media player console. This element is required only if a direct media url attribute is not specified in the <media:content> element. It has 1 required attribute, and 2 optional attributes.
<media:player url="http://www.foo.com/player?id=1111" height="200" width="400" />
url is the url of the player console that plays the media. It is a required attribute.
height is the height of the browser window that the url should be opened in. It is an optional attribute.
width is the width of the browser window that the url should be opened in. It is an optional attribute.
public void setReference(Reference reference)
reference
- The player or URL reference for the itempublic Reference getReference()
public void setSamplingrate(java.lang.Float samplingrate)
samplingrate
- samplingrate is the number of samples per second taken to create the
media object. It is expressed in thousands of samples per second (kHz). It is an
optional attribute.public java.lang.Float getSamplingrate()
public void setType(java.lang.String type)
type
- The type to set.public java.lang.String getType()
public void setWidth(java.lang.Integer width)
width
- width is the width of the media object. It is an optional attribute.public java.lang.Integer getWidth()
public java.lang.Object clone()
clone
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object