bbc.rd.tvanytime
Class Synopsis

java.lang.Object
  extended by bbc.rd.tvanytime.Synopsis
All Implemented Interfaces:
java.lang.Cloneable

public class Synopsis
extends java.lang.Object
implements java.lang.Cloneable

Synopsis: Represents a Synopsis object

Version:
1.0
Author:
Tim Sargeant, BBC Research & Development, April 2002

Field Summary
static int LONG
           
static int MEDIUM
           
static int SHORT
           
static int UNDEFINED
           
 
Constructor Summary
Synopsis()
          Constructor for objects of type Synopsis
Synopsis(java.lang.String text)
          Constructor for objects of type Synopsis with required fields
 
Method Summary
 java.lang.Object clone()
          Clones itself.
 java.lang.String getLanguage()
          Get the synopsis language
 int getLength()
          Get the synopsis length
 java.lang.String getText()
          Get the textual synopsis
 void setLanguage(java.lang.String language)
          Set the synopsis language
 void setLength(int length)
          Set the synopsis length.
 void setText(java.lang.String text)
          Sets the textual synopsis
 java.lang.String toString()
          Returns string representation of this object.
 java.lang.String toString(int indent)
          Returns string representation of this object.
 java.lang.String toXML()
          Returns XML representation of this object.
 java.lang.String toXML(int indent)
          Returns XML representation of this object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNDEFINED

public static final int UNDEFINED
See Also:
Constant Field Values

SHORT

public static final int SHORT
See Also:
Constant Field Values

MEDIUM

public static final int MEDIUM
See Also:
Constant Field Values

LONG

public static final int LONG
See Also:
Constant Field Values
Constructor Detail

Synopsis

public Synopsis()
Constructor for objects of type Synopsis


Synopsis

public Synopsis(java.lang.String text)
Constructor for objects of type Synopsis with required fields

Parameters:
text - the synopsis text
Method Detail

getLanguage

public java.lang.String getLanguage()
Get the synopsis language

Returns:
the String representation of the Synopsis language or null if language is undefined

getLength

public int getLength()
Get the synopsis length

Returns:
the length (SHORT, MEDIUM, LONG or UNDEFINED)

getText

public java.lang.String getText()
Get the textual synopsis

Returns:
the String representation of the Synopsis or null if undefined

setLanguage

public void setLanguage(java.lang.String language)
Set the synopsis language

Parameters:
language - the String representation of the Synopsis language

setLength

public void setLength(int length)
               throws TVAnytimeException
Set the synopsis length. Throws a TVAnytimeException if the length is invalid.

Parameters:
length - SHORT, MEDIUM or LONG. UNDEFINED if not set.
Throws:
TVAnytimeException - thrown when the synopsis length is invalid

setText

public void setText(java.lang.String text)
Sets the textual synopsis

Parameters:
text - the String representation of the Synopsis

toXML

public java.lang.String toXML()
Returns XML representation of this object.

Returns:
a XML representation of this object.

toXML

public java.lang.String toXML(int indent)
Returns XML representation of this object.

Parameters:
indent - the number of tabs to put before the string.
Returns:
a XML representation of this object.

toString

public java.lang.String toString()
Returns string representation of this object.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of this object.

toString

public java.lang.String toString(int indent)
Returns string representation of this object.

Parameters:
indent - the number of tabs to put before the string.
Returns:
a string representation of this object.

clone

public java.lang.Object clone()
Clones itself.

Overrides:
clone in class java.lang.Object
Returns:
A copy of itself.