bbc.rd.tvanytime
Class Title

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

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

Title: Represents a title object

Version:
1.0 Modified 26/4/04 T.Ferne: Added language attribute.
Author:
Tim Sargeant, BBC Research & Development, April 2002

Field Summary
static int ALBUMTITLE
           
static int ALTERNATIVE
           
static int EPISODETITLE
           
static int MAIN
           
static int OPUSNUMBER
           
static int ORIGINAL
           
static int POPULAR
           
static int SECONDARY
           
static int SERIESTITLE
           
static int SONGTITLE
           
 
Constructor Summary
Title()
          Constructor for objects of type Title
Title(java.lang.String text)
          Constructor for objects of type Title with required fields
 
Method Summary
 java.lang.Object clone()
          Clones itself.
 java.lang.String getLanguage()
          Get the title language,
 java.lang.String getText()
          Get the text of the title.
 int getType()
          Get the type of the title (MAIN, POPULAR, EPISODETITLE, etc.)
 void setLanguage(java.lang.String language)
          Set the title language
 void setText(java.lang.String text)
          Set the title text.
 void setType(int titleType)
          Sets the title type
 java.lang.String toString()
          Return a string representation of this object.
 java.lang.String toString(int indent)
          Return a string representation of this object.
 java.lang.String toXML()
          Return a XML representation of this object.
 java.lang.String toXML(int indent)
          Return a XML representation of this object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MAIN

public static final int MAIN
See Also:
Constant Field Values

SECONDARY

public static final int SECONDARY
See Also:
Constant Field Values

ALTERNATIVE

public static final int ALTERNATIVE
See Also:
Constant Field Values

ORIGINAL

public static final int ORIGINAL
See Also:
Constant Field Values

POPULAR

public static final int POPULAR
See Also:
Constant Field Values

OPUSNUMBER

public static final int OPUSNUMBER
See Also:
Constant Field Values

SONGTITLE

public static final int SONGTITLE
See Also:
Constant Field Values

ALBUMTITLE

public static final int ALBUMTITLE
See Also:
Constant Field Values

SERIESTITLE

public static final int SERIESTITLE
See Also:
Constant Field Values

EPISODETITLE

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

Title

public Title()
Constructor for objects of type Title


Title

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

Parameters:
text - the title text
Method Detail

getText

public java.lang.String getText()
Get the text of the title.

Returns:
the String representation of the Title or null if text is undefined

getLanguage

public java.lang.String getLanguage()
Get the title language,

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

getType

public int getType()
Get the type of the title (MAIN, POPULAR, EPISODETITLE, etc.)

Returns:
the Title type (MAIN as default)

setText

public void setText(java.lang.String text)
Set the title text.

Parameters:
text - the String representation of the Title

setLanguage

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

Parameters:
language - The String representation of the Title language

setType

public void setType(int titleType)
             throws TVAnytimeException
Sets the title type

Parameters:
titleType - the Title type
Throws:
TVAnytimeException - thrown when the title type is not valid

toXML

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

Returns:
XML representation of this object.

toXML

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

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

toString

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

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

toString

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

Parameters:
indent - number of tabs to put before the string.
Returns:
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.