com.sun.syndication.feed.module.mediarss.types
Class Text

java.lang.Object
  extended by com.sun.syndication.feed.module.mediarss.types.Text
All Implemented Interfaces:
java.io.Serializable

public class Text
extends java.lang.Object
implements java.io.Serializable

<media:text>

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. It has 4 optional attributes.

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

type specifies the type of text embedded. Possible values are either 'plain' or 'html'. Default value is 'plain'. All html must be entity-encoded. 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.

start specifies 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>). It is an optional attribute.

end specifies 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.

Author:
cooper
See Also:
Serialized Form

Constructor Summary
Text(java.lang.String value)
          Creates a text object.
Text(java.lang.String type, java.lang.String value)
          Creates a new instance of Text
Text(java.lang.String type, java.lang.String value, Time start, Time end)
          Creates a text object with start and end times
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 Time getEnd()
          End time of the text
 Time getStart()
          Start time of the text
 java.lang.String getType()
          type of the text
 java.lang.String getValue()
          Value of the text
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Text

public Text(java.lang.String value)
Creates a text object.

Parameters:
value - value of the text

Text

public Text(java.lang.String type,
            java.lang.String value)
Creates a new instance of Text

Parameters:
type - type of text
value - value of text

Text

public Text(java.lang.String type,
            java.lang.String value,
            Time start,
            Time end)
Creates a text object with start and end times

Parameters:
type - type of text
value - value of text
start - start time
end - end time
Method Detail

getEnd

public Time getEnd()
End time of the text

Returns:
End time of the text

getStart

public Time getStart()
Start time of the text

Returns:
Start time of the text

getType

public java.lang.String getType()
type of the text

Returns:
type of the text

getValue

public java.lang.String getValue()
Value of the text

Returns:
type of the text

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2006-2009. All Rights Reserved.