Lizzy v1.1.1

christophedelory.rss.media
Class Thumbnail

java.lang.Object
  extended by christophedelory.rss.media.Thumbnail

public class Thumbnail
extends Object

Image to represent the media. Allows particular images to be used as representative images for the media object. If multiple thumbnails are included, and time coding is not at play, it is assumed that the images are in order of importance. It is possible to use an optional "time" attribute to change the image as the media plays.
Example:

 <media:thumbnail url="http://www.foo.com/keyframe.jpg" width="75" height="50" time="12:05:01.123"/>
 

Version:
$Revision: 92 $
Author:
Christophe Delory

Constructor Summary
Thumbnail()
           
 
Method Summary
 Integer getHeight()
          Returns the integer representing the value in pixels for the height of the thumbnail.
 String getTime()
          Returns the time offset in relation to the media object.
 URI getURL()
          Returns the URL of the thumbnail.
 String getURLString()
          Returns the URL of the thumbnail as a string.
 Integer getWidth()
          Returns the integer representing the value in pixels for the width of the thumbnail.
 void setHeight(int height)
          Initializes the integer representing the value in pixels for the height of the thumbnail.
 void setHeight(Integer height)
          Initializes the integer representing the value in pixels for the height of the thumbnail.
 void setTime(String time)
          Initializes the time offset in relation to the media object.
 void setURL(URI url)
          Initializes the URL of the thumbnail.
 void setURLString(String url)
          Initializes the URL of the thumbnail as a string.
 void setWidth(int width)
          Initializes the integer representing the value in pixels for the width of the thumbnail.
 void setWidth(Integer width)
          Initializes the integer representing the value in pixels for the width of the thumbnail.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Thumbnail

public Thumbnail()
Method Detail

setURLString

public void setURLString(String url)
                  throws URISyntaxException
Initializes the URL of the thumbnail as a string.

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 URL of the thumbnail as a string. No default value.

Returns:
an URL as a string. Shall not be null.
Throws:
NullPointerException - if no URL is defined in this thumbnail.
See Also:
setURLString(java.lang.String), getURL()

setURL

public void setURL(URI url)
Initializes the URL of the thumbnail.

Parameters:
url - an URL. Shall not be null.
Throws:
NullPointerException - if url is null.
See Also:
getURL(), setURLString(java.lang.String)

getURL

public URI getURL()
Returns the URL of the thumbnail.

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

setWidth

public void setWidth(int width)
Initializes the integer representing the value in pixels for the width of the thumbnail.

Parameters:
width - a thumbnail width.
See Also:
getWidth(), setWidth(Integer)

setWidth

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

Parameters:
width - a thumbnail width. May be null.
See Also:
getWidth(), setWidth(int)

getWidth

public Integer getWidth()
Returns the integer representing the value in pixels for the width of the thumbnail. No default value.

Returns:
a thumbnail width. May be null.
See Also:
setWidth(int)

setHeight

public void setHeight(int height)
Initializes the integer representing the value in pixels for the height of the thumbnail.

Parameters:
height - a thumbnail height.
See Also:
setHeight(Integer), getHeight()

setHeight

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

Parameters:
height - a thumbnail height. May be null.
See Also:
getHeight(), setHeight(int)

getHeight

public Integer getHeight()
Returns the integer representing the value in pixels for the height of the thumbnail. No default value.

Returns:
a thumbnail height. May be null.
See Also:
setHeight(int)

getTime

public String getTime()
Returns the time offset in relation to the media object. Typically this is used when creating multiple keyframes within a single video. The format for this attribute should be in the DSM-CC's Normal Play Time (NTP) as used in RTSP [RFC 2326 3.6 Normal Play Time].
Notes:
NTP has a second or subsecond resolution. It is specified as H:M:S.h (npt-hhmmss) or S.h (npt-sec), where H=hours, M=minutes, S=second and h=fractions of a second.
A possible alternative to NTP would be SMPTE. It is believed that NTP is simpler and easier to use.

Returns:
a time offset. May be null.
See Also:
setTime(java.lang.String)

setTime

public void setTime(String time)
Initializes the time offset in relation to the media object.

Parameters:
time - a time offset. May be null.
See Also:
getTime()

© 2008-2009 Christophe Delory

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