bbc.rd.tvanytime.creditsInformation
Class CreditsItem

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

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

Represents a TV-Anytime CreditsItem object.

Version:
1.0
Author:
Tristan Ferne, BBC Research & Development, April 2003

Field Summary
static java.lang.String[] roles
           
static java.lang.String[] roleStrings
          Some useful values for role.
 
Constructor Summary
CreditsItem()
          Constructor.
 
Method Summary
 void addCharacter(Character character)
          Adds a character object to add to the listt
 void addOrganizationName(OrganizationName organizationName)
          Adds a OrganizationName object to add to the listt
 void addPersonName(PersonName personName)
          Adds a PersonName object to add to the listt
 java.lang.Object clone()
          Clones itself.
 boolean equals(CreditsItem creditsItem)
          Tests for equality between CreditsItems.
 Character getCharacter(int index)
          Gets the character at the specified index
 int getNumCharacters()
          Return number of characters in list.
 int getNumOrganizationNames()
          Return number of OrganizationNames in list.
 int getNumPersonNames()
          Return number of PersonNames in list.
 OrganizationName getOrganizationName(int index)
          Gets the OrganizationName at the specified index
 PersonName getPersonName(int index)
          Gets the PersonName object at the specified index
 java.lang.String getRole()
          Get role for this CreditsItem.
 void removeAll()
          removeAll - removes all CreditsItems.
 void removeCharacter(int index)
          Removes a character from the list
 void removeOrganizationName(int index)
          Removes an OrganizationName from the list
 void removePersonName(int index)
          Removes a PersonName object from the list
 void setRole(java.lang.String role)
          Sets the role for this CreditsItem.
 java.lang.String toString()
          toString - returns a String representation of this object with the specified number of tab indentations
 java.lang.String toString(int indent)
          toString - returns a String representation of this object with the specified number of tab indentations
 java.lang.String toXML()
          Returns a XML representation of this object with the specified number of tab indentations
 java.lang.String toXML(int indent)
          Returns a XML representation of this object with the specified number of tab indentations
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

roleStrings

public static java.lang.String[] roleStrings
Some useful values for role.


roles

public static java.lang.String[] roles
Constructor Detail

CreditsItem

public CreditsItem()
Constructor.

Method Detail

setRole

public void setRole(java.lang.String role)
             throws TVAnytimeException
Sets the role for this CreditsItem. Note: must have prefix of "urn:tva:metadata:cs:TVARoleCS:2002:" or "urn:mpeg:mpeg7:cs:MPEG7RoleCS:" to be valid.

Parameters:
role - the role required for this CreditsItem
Throws:
TVAnytimeException - if the role string has the wrong format

getRole

public java.lang.String getRole()
Get role for this CreditsItem.

Returns:
Role string.

getNumPersonNames

public int getNumPersonNames()
Return number of PersonNames in list.

Returns:
Number of PersonNames in list.

getPersonName

public PersonName getPersonName(int index)
Gets the PersonName object at the specified index

Parameters:
index - the index of the required PersonName object
Returns:
the PersonName object at the specified index

addPersonName

public void addPersonName(PersonName personName)
Adds a PersonName object to add to the listt

Parameters:
personName - the PersonName object

removePersonName

public void removePersonName(int index)
Removes a PersonName object from the list

Parameters:
index - The index of the object to remove.

getNumCharacters

public int getNumCharacters()
Return number of characters in list.

Returns:
Number of characters in list.

getCharacter

public Character getCharacter(int index)
Gets the character at the specified index

Parameters:
index - the index of the required characters
Returns:
the characters at the specified index

addCharacter

public void addCharacter(Character character)
Adds a character object to add to the listt

Parameters:
character - the character

removeCharacter

public void removeCharacter(int index)
Removes a character from the list

Parameters:
index - The index of the object to remove.

getNumOrganizationNames

public int getNumOrganizationNames()
Return number of OrganizationNames in list.

Returns:
Number of OrganizationNames in list.

getOrganizationName

public OrganizationName getOrganizationName(int index)
Gets the OrganizationName at the specified index

Parameters:
index - the index of the required OrganizationName
Returns:
the OrganizationName at the specified index

addOrganizationName

public void addOrganizationName(OrganizationName organizationName)
Adds a OrganizationName object to add to the listt

Parameters:
organizationName - the OrganizationName

removeOrganizationName

public void removeOrganizationName(int index)
Removes an OrganizationName from the list

Parameters:
index - The index of the object to remove.

removeAll

public void removeAll()
removeAll - removes all CreditsItems.


toXML

public java.lang.String toXML(int indent)
Returns a XML representation of this object with the specified number of tab indentations

Returns:
the XML representation of the object

toXML

public java.lang.String toXML()
Returns a XML representation of this object with the specified number of tab indentations

Returns:
the XML representation of the object

toString

public java.lang.String toString(int indent)
toString - returns a String representation of this object with the specified number of tab indentations

Returns:
the String representation of the object

toString

public java.lang.String toString()
toString - returns a String representation of this object with the specified number of tab indentations

Overrides:
toString in class java.lang.Object
Returns:
the String representation of the object

clone

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

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

equals

public boolean equals(CreditsItem creditsItem)
Tests for equality between CreditsItems.

Parameters:
creditsItem - Item to test.
Returns:
True if equal.