Lizzy v1.1.1

christophedelory.rss.media
Class Text

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

public class Text
extends Object

Allows the inclusion of a text transcript, closed captioning, or lyrics of the media content. Many of these elements are permitted to provide a time series of text. In such cases, it is encouraged, but not required, that the elements be grouped by language and appear in time sequence order based on the start time. Elements can have overlapping start and end times.
Examples:

 <media:text type="plain" lang="en" start="00:00:03.000" end="00:00:10.000"> Oh, say, can you see</media:text>
 <media:text type="plain" lang="en" start="00:00:10.000" end="00:00:17.000">By the dawn's early light</media:text>
 

Version:
$Revision: 92 $
Author:
Christophe Delory

Constructor Summary
Text()
           
 
Method Summary
 String getEnd()
          Returns the end time that the text is relevant.
 String getLang()
          Returns the primary language encapsulated in the media object.
 String getStart()
          Returns the start time offset that the text starts being relevant to the media object.
 String getType()
          Returns the type of text embedded.
 String getValue()
          Returns the text itself.
 void setEnd(String end)
          Initializes the end time that the text is relevant.
 void setLang(String lang)
          Initializes the primary language encapsulated in the media object.
 void setStart(String start)
          Initializes the start time offset that the text starts being relevant to the media object.
 void setType(String type)
          Initializes the type of text embedded.
 void setValue(String value)
          Initializes the text itself.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Text

public Text()
Method Detail

getValue

public String getValue()
Returns the text itself. All html must be entity-encoded.

Returns:
the text. May be null if not yet initialized.
See Also:
setValue(java.lang.String)

setValue

public void setValue(String value)
Initializes the text itself.

Parameters:
value - the text. Shall not be null.
Throws:
NullPointerException - if value is null.
See Also:
getValue()

getType

public String getType()
Returns the type of text embedded. Possible values are either 'plain' or 'html'. Default value is 'plain'.

Returns:
the type of text. May be null.
See Also:
setType(java.lang.String)

setType

public void setType(String type)
Initializes the type of text embedded.

Parameters:
type - the type of text. May be null.
See Also:
getType()

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()

getStart

public String getStart()
Returns the start time offset that the text starts being relevant to the media object. An example of this would be for closed captioning. It uses the NTP time code format (see the time attribute used in media thumbnail: Thumbnail.getTime()).

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

setStart

public void setStart(String start)
Initializes the start time offset that the text starts being relevant to the media object.

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

getEnd

public String getEnd()
Returns the end time that the text is relevant. If this attribute is not provided, and a start time is used, it is expected that the end time is either the end of the clip or the start of the next media text element.

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

setEnd

public void setEnd(String end)
Initializes the end time that the text is relevant.

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

© 2008-2009 Christophe Delory

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