Lizzy v1.1.1

christophedelory.rss.media
Class Content

java.lang.Object
  extended by christophedelory.rss.media.BaseMedia
      extended by christophedelory.rss.media.Content

public class Content
extends BaseMedia

Used to specify the enclosed media content. The sequence of these items implies the order of presentation. Contains 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. While many of the attributes appear to be audio/video specific, this element can be used to publish any type of media.
Example:

 <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"/>
 

Version:
$Revision: 92 $
Author:
Christophe Delory

Constructor Summary
Content()
           
 
Method Summary
 Integer getBitrate()
          Returns the integer representing the kilobits per second rate of media.
 Integer getChannels()
          Returns the number of audio channels in the media object.
 Integer getDuration()
          Returns the integer which represents the runtime of the video in seconds.
 String getExpression()
          Specifies whether you're linking to a short sample of a longer video ("sample"), or if you're linking to the full thing ("full"), or if you're linking to a live stream ("nonstop").
 Long getFileSize()
          Returns the long integer representing the number of bytes of the media object.
 Integer getFramerate()
          Returns the integer that specifies the number of frames per second of the media object.
 Integer getHeight()
          Returns the integer representing the value in pixels for the height of the media object.
 Boolean getIsDefault()
          Specifies if this is the default object that should be used for the media group.
 String getLang()
          Returns the primary language encapsulated in the media object.
 String getMedium()
          Returns the type of the media object.
 Float getSamplingrate()
          Returns the number of samples per second taken to create the media object.
 String getType()
          Returns the string containing the standard MIME type of the media object.
 URI getURL()
          Returns the direct URL to the media object.
 String getURLString()
          Returns the direct URL to the media object, and is required unless the media player tag is used.
 Integer getWidth()
          Returns the integer representing the value in pixels for the width of the media object.
 boolean isDefault()
          Specifies if this is the default object that should be used for the media group.
 void setBitrate(Integer bitrate)
          Initializes the integer representing the kilobits per second rate of media.
 void setChannels(Integer channels)
          Initializes the number of audio channels in the media object.
 void setDefault(boolean isDefault)
          Specifies if this is the default object that should be used for the media group.
 void setDuration(int duration)
          Initializes the integer which represents the runtime of the video in seconds.
 void setDuration(Integer duration)
          Initializes the integer which represents the runtime of the video in seconds.
 void setExpression(String expression)
          Specifies whether you're linking to a short sample of a longer video ("sample"), or if you're linking to the full thing ("full"), or if you're linking to a live stream ("nonstop").
 void setFileSize(Long fileSize)
          Initializes the long integer representing the number of bytes of the media object.
 void setFramerate(Integer framerate)
          Initializes the integer that specifies the number of frames per second of the media object.
 void setHeight(Integer height)
          Initializes the integer representing the value in pixels for the height of the media object.
 void setIsDefault(Boolean isDefault)
          Specifies if this is the default object that should be used for the media group.
 void setLang(String lang)
          Initializes the primary language encapsulated in the media object.
 void setMedium(String medium)
          Initializes the type of the media object.
 void setSamplingrate(Float samplingrate)
          Initializes the number of samples per second taken to create the media object.
 void setType(String type)
          Initializes the string containing the standard MIME type of the media object.
 void setURL(URI url)
          Initializes the direct URL to the media object.
 void setURLString(String url)
          Initializes the direct URL to the media object.
 void setWidth(Integer width)
          Initializes the integer representing the value in pixels for the width of the media object.
 
Methods inherited from class christophedelory.rss.media.BaseMedia
addMediaCategory, addMediaCredit, addMediaHash, addMediaRating, addMediaRestriction, addMediaText, addMediaThumbnail, getMediaAdult, getMediaCategories, getMediaCopyright, getMediaCredits, getMediaDescription, getMediaHashes, getMediaKeywords, getMediaPlayer, getMediaRatings, getMediaRestrictions, getMediaTexts, getMediaThumbnails, getMediaTitle, isMediaAdult, setMediaAdult, setMediaAdult, setMediaCopyright, setMediaDescription, setMediaKeywords, setMediaPlayer, setMediaTitle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Content

public Content()
Method Detail

setURLString

public void setURLString(String url)
                  throws URISyntaxException
Initializes the direct URL to the media object.

Parameters:
url - an URL as a string. Shall not be null.
Throws:
NullPointerException - if url is null.
URISyntaxException - if the given string violates RFC 2396, as augmented by the URI deviations.
See Also:
getURLString(), setURL(java.net.URI)

getURLString

public String getURLString()
Returns the direct URL to the media object, and is required unless the media player tag is used. This is the URL that is passed to a media player so it can play the video. Example: "rtsp://www.hosthame.com/video.rm".

Returns:
an URL as a string. May be null.
See Also:
setURLString(java.lang.String), getURL()

setURL

public void setURL(URI url)
Initializes the direct URL to the media object.

Parameters:
url - an URL. May be null.
See Also:
getURL(), setURLString(java.lang.String)

getURL

public URI getURL()
Returns the direct URL to the media object.

Returns:
an URL. May be null.
See Also:
setURL(java.net.URI), getURLString()

setDuration

public void setDuration(int duration)
Initializes the integer which represents the runtime of the video in seconds.

Parameters:
duration - a duration.
See Also:
getDuration(), setDuration(Integer)

setDuration

public void setDuration(Integer duration)
Initializes the integer which represents the runtime of the video in seconds.

Parameters:
duration - a duration. May be null.
See Also:
getDuration(), setDuration(int)

getDuration

public Integer getDuration()
Returns the integer which represents the runtime of the video in seconds. The number of seconds the media object plays.

Returns:
a duration. May be null.
See Also:
setDuration(int)

setBitrate

public void setBitrate(Integer bitrate)
Initializes the integer representing the kilobits per second rate of media.

Parameters:
bitrate - a bitrate. May be null.
See Also:
getBitrate()

getBitrate

public Integer getBitrate()
Returns the integer representing the kilobits per second rate of media.

Returns:
a bitrate. May be null.
See Also:
setBitrate(java.lang.Integer)

setFramerate

public void setFramerate(Integer framerate)
Initializes the integer that specifies the number of frames per second of the media object.

Parameters:
framerate - a frame rate. May be null.
See Also:
getFramerate()

getFramerate

public Integer getFramerate()
Returns the integer that specifies the number of frames per second of the media object.

Returns:
a frame rate. May be null.
See Also:
setFramerate(java.lang.Integer)

setSamplingrate

public void setSamplingrate(Float samplingrate)
Initializes the number of samples per second taken to create the media object. It is expressed in thousands of samples per second (kHz).

Parameters:
samplingrate - a sampling rate. May be null.
See Also:
getSamplingrate()

getSamplingrate

public Float getSamplingrate()
Returns the number of samples per second taken to create the media object. It is expressed in thousands of samples per second (kHz).

Returns:
a sampling rate. May be null.
See Also:
setSamplingrate(java.lang.Float)

setWidth

public void setWidth(Integer width)
Initializes the integer representing the value in pixels for the width of the media object.

Parameters:
width - a width. May be null.
See Also:
getWidth()

getWidth

public Integer getWidth()
Returns the integer representing the value in pixels for the width of the media object.

Returns:
a width. May be null.
See Also:
setWidth(java.lang.Integer)

setHeight

public void setHeight(Integer height)
Initializes the integer representing the value in pixels for the height of the media object.

Parameters:
height - a height. May be null.
See Also:
getHeight()

getHeight

public Integer getHeight()
Returns the integer representing the value in pixels for the height of the media object.

Returns:
a height. May be null.
See Also:
setHeight(java.lang.Integer)

setChannels

public void setChannels(Integer channels)
Initializes the number of audio channels in the media object.

Parameters:
channels - a number of audio channels. May be null.
See Also:
getChannels()

getChannels

public Integer getChannels()
Returns the number of audio channels in the media object.

Returns:
a number of audio channels. May be null.
See Also:
setChannels(java.lang.Integer)

setFileSize

public void setFileSize(Long fileSize)
Initializes the long integer representing the number of bytes of the media object.

Parameters:
fileSize - a file size. May be null.
See Also:
getFileSize()

getFileSize

public Long getFileSize()
Returns the long integer representing the number of bytes of the media object.

Returns:
a file size. May be null.
See Also:
setFileSize(java.lang.Long)

getType

public String getType()
Returns the string containing the standard MIME type of the media object.

Returns:
a MIME type. May be null.
See Also:
setType(java.lang.String)

setType

public void setType(String type)
Initializes the string containing the standard MIME type of the media object.

Parameters:
type - a MIME type. May be null.
See Also:
getType()

getMedium

public String getMedium()
Returns the type of the media object. 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. Values you can use for this are "image", "audio", "video", "document", or "executable".

Returns:
a media object type. May be null.
See Also:
setMedium(java.lang.String)

setMedium

public void setMedium(String medium)
Initializes the type of the media object.

Parameters:
medium - a media object type. May be null.
See Also:
getMedium()

getExpression

public String getExpression()
Specifies whether you're linking to a short sample of a longer video ("sample"), or if you're linking to the full thing ("full"), or if you're linking to a live stream ("nonstop"). 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".

Returns:
a media object expression. May be null.
See Also:
setExpression(java.lang.String)

setExpression

public void setExpression(String expression)
Specifies whether you're linking to a short sample of a longer video ("sample"), or if you're linking to the full thing ("full"), or if you're linking to a live stream ("nonstop").

Parameters:
expression - a media object expression. May be null.
See Also:
getExpression()

getLang

public String getLang()
Returns 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).

Returns:
a language code. May be null.
See Also:
setLang(java.lang.String)

setLang

public void setLang(String lang)
Initializes the primary language encapsulated in the media object.

Parameters:
lang - a language code. May be null.
See Also:
getLang()

isDefault

public boolean isDefault()
Specifies if this is the default object that should be used for the media group.

Returns:
the associated indicator.
See Also:
setDefault(boolean), getIsDefault()

setDefault

public void setDefault(boolean isDefault)
Specifies if this is the default object that should be used for the media group.

Parameters:
isDefault - the associated indicator.
See Also:
isDefault(), setIsDefault(java.lang.Boolean)

getIsDefault

public Boolean getIsDefault()
Specifies if this is the default object that should be used for the media group. There should only be one default object per media group. If not specified, defaults to false (FIXME).

Returns:
the associated indicator. May be null.
See Also:
setIsDefault(java.lang.Boolean), isDefault()

setIsDefault

public void setIsDefault(Boolean isDefault)
Specifies if this is the default object that should be used for the media group.

Parameters:
isDefault - the associated indicator. May be null.
See Also:
getIsDefault(), setDefault(boolean)

© 2008-2009 Christophe Delory

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