bbc.rd.tvanytime.segmentInformation
Class SegmentReference

java.lang.Object
  extended by bbc.rd.tvanytime.segmentInformation.SegmentReference

public class SegmentReference
extends java.lang.Object

SegmentReference: Represents a SegmentReference object.

Version:
1.0
Author:
Tristan Ferne, BBC Research & Development, March 2005

Field Summary
static int SEGMENT
          SegmentReference for segment.
static int SEGMENT_GROUP
          SegmentReference for segment group.
 
Constructor Summary
SegmentReference()
          Constructor.
SegmentReference(int segmentType, java.lang.String ref)
          Constructor.
 
Method Summary
 java.lang.Object clone()
          Clones itself.
 java.lang.String getRef()
          Return segment ref.
 int getSegmentType()
          Get segment type - either SegmentReference.SEGMENT or SegmentReference.SEGMENT_GROUP.
 void setRef(java.lang.String ref)
          Set segment ref.
 void setSegmentType(int segmentType)
          Set segment type - either SegmentReference.SEGMENT or SegmentReference.SEGMENT_GROUP.
 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

SEGMENT

public static final int SEGMENT
SegmentReference for segment.

See Also:
Constant Field Values

SEGMENT_GROUP

public static final int SEGMENT_GROUP
SegmentReference for segment group.

See Also:
Constant Field Values
Constructor Detail

SegmentReference

public SegmentReference()
Constructor.


SegmentReference

public SegmentReference(int segmentType,
                        java.lang.String ref)
                 throws TVAnytimeException
Constructor.

Parameters:
segmentType - Segment type
ref - Segment ref
Throws:
TVAnytimeException - if invalid segment type.
Method Detail

setSegmentType

public void setSegmentType(int segmentType)
                    throws TVAnytimeException
Set segment type - either SegmentReference.SEGMENT or SegmentReference.SEGMENT_GROUP.

Parameters:
segmentType - SegmentReference.SEGMENT or SegmentReference.SEGMENT_GROUP
Throws:
TVAnytimeException - if invalid segment type.

getSegmentType

public int getSegmentType()
Get segment type - either SegmentReference.SEGMENT or SegmentReference.SEGMENT_GROUP.

Returns:
segment type.

setRef

public void setRef(java.lang.String ref)
Set segment ref. Either a segmentId or a groupId.

Parameters:
ref - Segment ref.

getRef

public java.lang.String getRef()
Return segment ref. Either a segmentId or a groupId.

Returns:
Segment ref

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.