bbc.rd.tvanytime.segmentInformation
Class SegmentGroupInformation

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

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

SegmentGroupInformation: Represents segment group information object.

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

Constructor Summary
SegmentGroupInformation()
          Constructor for objects of class SegmentGroupInformation.
SegmentGroupInformation(java.lang.String groupID, SegmentGroupType groupType, ContentReference programRef, BasicSegmentDescription description)
          Constructor for objects of class SegmentGroupInformation with required fields.
 
Method Summary
 void addDescription(BasicSegmentDescription description)
          Adds a BasicSegmentDescription object.
 void addGroupType(SegmentGroupType groupType)
          Adds a groupType.
 java.lang.Object clone()
          Clones itself.
 BasicSegmentDescription getDescription(int index)
          Gets the BasicSegmentDescription object specified by index.
 java.lang.String getGroupID()
          Gets the SegmentGroupInformation groupID.
 java.lang.String getGroupRefList()
          Gets the GroupRefList.
 java.util.Vector getGroupRefListAsVector()
          Gets the GroupRefList as a vector of Group refs.
 SegmentGroupType getGroupType(int index)
          Gets the groupType specified by index.
 int getNumDescriptions()
          Get the number of BasicSegmentDescription objects belonging to this SegmentGroupInformation object.
 int getNumGroupTypes()
          Get the number of GroupTypes belonging to this SegmentGroupInformation object.
 ContentReference getProgramRef()
          Gets the SegmentGroupInformation ProgramRef.
 java.lang.String getSegmentRefList()
          Gets the SegmentRefList as a String.
 java.util.Vector getSegmentRefListAsVector()
          Gets the SegmentRefList as a vector of Segment refs.
 boolean isOrdered()
          Is the group ordered?
 void removeAll()
          Removes all Description objects and groupTypes.
 void setGroupID(java.lang.String groupID)
          Set the SegmentGroupInformation groupID.
 void setGroupRefList(java.lang.String groupRefList)
          Sets the GroupRefList.
 void setOrdered(boolean ordered)
          Set the group ordered flag.
 void setProgramRef(ContentReference programRef)
          Sets the SegmentGroupInformation ProgramRef.
 void setSegmentRefList(java.lang.String segmentRefList)
          Sets the SegmentRefList.
 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 table.
 java.lang.String toXML(int indent)
          Returns XML representation of this table.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SegmentGroupInformation

public SegmentGroupInformation()
Constructor for objects of class SegmentGroupInformation.


SegmentGroupInformation

public SegmentGroupInformation(java.lang.String groupID,
                               SegmentGroupType groupType,
                               ContentReference programRef,
                               BasicSegmentDescription description)
Constructor for objects of class SegmentGroupInformation with required fields.

Parameters:
groupID - the group ID
groupType - the group type (SHOTS, OTHER, BOOKMARKS, THEME_GROUP, etc)
programRef - the program ref (a ContentReference object)
description - the description
Method Detail

getSegmentRefList

public java.lang.String getSegmentRefList()
Gets the SegmentRefList as a String. (e.g. "seg1 seg2 seg3")

Returns:
the segmentRefList

getSegmentRefListAsVector

public java.util.Vector getSegmentRefListAsVector()
Gets the SegmentRefList as a vector of Segment refs. (e.g. elementAt(0)=seg1, elementAt(1)=seg2, elementAt(2)=seg3)

Returns:
the segmentRefList as a Vector (of strings)

getGroupRefList

public java.lang.String getGroupRefList()
Gets the GroupRefList.

Returns:
the groupRefList

getGroupRefListAsVector

public java.util.Vector getGroupRefListAsVector()
Gets the GroupRefList as a vector of Group refs. (e.g. elementAt(0)=group1, elementAt(1)=group2, elementAt(2)=group3)

Returns:
the groupRefList as a Vector (of strings)

getProgramRef

public ContentReference getProgramRef()
Gets the SegmentGroupInformation ProgramRef.

Returns:
the programRef

isOrdered

public boolean isOrdered()
Is the group ordered?

Returns:
the SegmentGroupInformation ordered flag

getGroupID

public java.lang.String getGroupID()
Gets the SegmentGroupInformation groupID.

Returns:
the groupID

setSegmentRefList

public void setSegmentRefList(java.lang.String segmentRefList)
Sets the SegmentRefList. Since groupRefList and segmentRefList are a choice (ie. they cannot exist together, this method sets groupRefList to null.

Parameters:
segmentRefList - the segmentRefList

setGroupRefList

public void setGroupRefList(java.lang.String groupRefList)
Sets the GroupRefList. Since groupRefList and segmentRefList are a choice (ie. they cannot exist together, this method sets segmentRefList to null.

Parameters:
groupRefList - the groupRefList

setProgramRef

public void setProgramRef(ContentReference programRef)
Sets the SegmentGroupInformation ProgramRef.

Parameters:
programRef - the programRef

setOrdered

public void setOrdered(boolean ordered)
Set the group ordered flag.

Parameters:
ordered - the SegmentGroupInformation ordered flag

setGroupID

public void setGroupID(java.lang.String groupID)
Set the SegmentGroupInformation groupID.

Parameters:
groupID - the groupID

getNumDescriptions

public int getNumDescriptions()
Get the number of BasicSegmentDescription objects belonging to this SegmentGroupInformation object.

Returns:
the number of BasicSegmentDescription objects in this SegmentGroupInformation

getNumGroupTypes

public int getNumGroupTypes()
Get the number of GroupTypes belonging to this SegmentGroupInformation object.

Returns:
the number of groupTypes in this SegmentGroupInformation

getGroupType

public SegmentGroupType getGroupType(int index)
Gets the groupType specified by index.

Parameters:
index - the index to the groupType
Returns:
the groupType (-1 is returned if the groupType at index has not been defined)

addGroupType

public void addGroupType(SegmentGroupType groupType)
Adds a groupType.

Parameters:
groupType - the groupType object

getDescription

public BasicSegmentDescription getDescription(int index)
Gets the BasicSegmentDescription object specified by index.

Parameters:
index - the index to the Description object
Returns:
the BasicSegmentDescription object

addDescription

public void addDescription(BasicSegmentDescription description)
Adds a BasicSegmentDescription object.

Parameters:
description - the BasicSegmentDescription object

removeAll

public void removeAll()
Removes all Description objects and groupTypes.


toXML

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

Returns:
XML representation of this table.

toXML

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

Parameters:
indent - Number of tabs with which to indent the string.
Returns:
XML representation of the table.

toString

public java.lang.String toString()
Returns 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)
Returns 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.