- java.lang.Object
-
- com.rometools.modules.mediarss.types.Text
-
- All Implemented Interfaces:
Serializable
public class Text extends Object implements 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.
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
Time
getEnd()
End time of the textTime
getStart()
Start time of the textString
getType()
type of the textString
getValue()
Value of the textint
hashCode()
String
toString()
-
-
-
Constructor Detail
-
Text
public Text(String value)
Creates a text object.- Parameters:
value
- value of the text
-
-
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 String getType()
type of the text- Returns:
- type of the text
-
getValue
public String getValue()
Value of the text- Returns:
- type of the text
-
-