org.jmythapi.protocol.response.impl
Class AProgramInfo<E extends Enum<E>>

java.lang.Object
  extended by org.jmythapi.impl.AData<E>
      extended by org.jmythapi.protocol.response.impl.AMythResponse<E>
          extended by org.jmythapi.protocol.response.impl.AProgramInfo<E>
All Implemented Interfaces:
Cloneable, IBasicChannelInfo, IPropertyAware<E>, IVersionable, ISendable, IBasicProgramInfo, IMythResponse<E>
Direct Known Subclasses:
ARecorderProgramInfo, ProgramInfo

public abstract class AProgramInfo<E extends Enum<E>>
extends AMythResponse<E>
implements IBasicChannelInfo, IBasicProgramInfo


Field Summary
 
Fields inherited from class org.jmythapi.impl.AData
logger, propsClass, protoVersion, respArgs
 
Constructor Summary
AProgramInfo(Class<E> propsClass, IMythPacket packet)
           
AProgramInfo(ProtocolVersion protoVersion, Class<E> propsClass)
           
AProgramInfo(ProtocolVersion protoVersion, Class<E> propsClass, List<String> responseArgs)
           
 
Method Summary
abstract  String getCategory()
          Gets the category of the program.
abstract  Integer getChannelID()
          Gets the MythTV internal channel ID.
abstract  String getChannelNumber()
          Gets the user defined channel number.
abstract  String getChannelSign()
          Gets the station abbreviation.
abstract  String getDescription()
          Gets the program description.
 int getDuration()
          Gets the duration for the program in minutes.
abstract  Date getEndDateTime()
          Gets the scheduled end of the program.
 String getFullTitle()
          Gets the full title of the program.
 int getMinutesAfterMidnight()
          Gets the the start time of the program in minutes after midnight.
abstract  String getProgramID()
          Get the program ID.
abstract  String getSeriesID()
          Gets the series ID of the program.
abstract  Date getStartDateTime()
          Gets the scheduled start of the program.
abstract  String getSubtitle()
          Gets the program subtitle.
abstract  String getTitle()
          Gets the program title.
 String getUniqueProgramId()
          Generates a unique id for this program-info.
 boolean isValid()
          Checks if the program object contains valid data.
 
Methods inherited from class org.jmythapi.protocol.response.impl.AMythResponse
checkSize, decodeProperty, encodeProperty, getExpectedSize, getPacket, getProperties, getProperty, getPropertyIndex
 
Methods inherited from class org.jmythapi.impl.AData
clone, equals, getPropertyClass, getPropertyCount, getPropertyMap, getPropertyValue, getPropertyValue, getPropertyValueObject, getPropertyValueObject, getPropertyValues, getVersionNr, hashCode, init, postProcessArguments, setPropertyValue, setPropertyValue, setPropertyValueObject, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jmythapi.IVersionable
getVersionNr
 
Methods inherited from interface org.jmythapi.IPropertyAware
getPropertyClass, getPropertyCount, getPropertyMap, getPropertyValue, getPropertyValue, getPropertyValueObject, getPropertyValues, setPropertyValue, setPropertyValue, setPropertyValueObject
 

Constructor Detail

AProgramInfo

public AProgramInfo(Class<E> propsClass,
                    IMythPacket packet)

AProgramInfo

public AProgramInfo(ProtocolVersion protoVersion,
                    Class<E> propsClass)

AProgramInfo

public AProgramInfo(ProtocolVersion protoVersion,
                    Class<E> propsClass,
                    List<String> responseArgs)
Method Detail

getTitle

public abstract String getTitle()
Description copied from interface: IBasicProgramInfo
Gets the program title.

Specified by:
getTitle in interface IBasicProgramInfo
Returns:
the title of the program

getSubtitle

public abstract String getSubtitle()
Description copied from interface: IBasicProgramInfo
Gets the program subtitle.

Specified by:
getSubtitle in interface IBasicProgramInfo
Returns:
the subtitle of the program

getDescription

public abstract String getDescription()
Description copied from interface: IBasicProgramInfo
Gets the program description.

Specified by:
getDescription in interface IBasicProgramInfo
Returns:
the program description

getCategory

public abstract String getCategory()
Description copied from interface: IBasicProgramInfo
Gets the category of the program.

Specified by:
getCategory in interface IBasicProgramInfo
Returns:
the program category, e.g. Comedy

getStartDateTime

public abstract Date getStartDateTime()
Description copied from interface: IBasicProgramInfo
Gets the scheduled start of the program.

Specified by:
getStartDateTime in interface IBasicProgramInfo
Returns:
the scheduled start time.

getEndDateTime

public abstract Date getEndDateTime()
Description copied from interface: IBasicProgramInfo
Gets the scheduled end of the program.

Specified by:
getEndDateTime in interface IBasicProgramInfo
Returns:
the scheduled end time.

getSeriesID

public abstract String getSeriesID()
Description copied from interface: IBasicProgramInfo
Gets the series ID of the program.

Specified by:
getSeriesID in interface IBasicProgramInfo
Returns:
the series ID.

getProgramID

public abstract String getProgramID()
Description copied from interface: IBasicProgramInfo
Get the program ID.

Specified by:
getProgramID in interface IBasicProgramInfo
Returns:
the program ID.

getChannelSign

public abstract String getChannelSign()
Description copied from interface: IBasicChannelInfo
Gets the station abbreviation.

Specified by:
getChannelSign in interface IBasicChannelInfo
Returns:
the channel abbreviation, e.g. PULS 4

getChannelNumber

public abstract String getChannelNumber()
Description copied from interface: IBasicChannelInfo
Gets the user defined channel number.

Specified by:
getChannelNumber in interface IBasicChannelInfo
Returns:
the user defined number. This could contain '-', '_' or '.'
See Also:
IRecorderChannelInfo.Props.CHANNEL_NUMBER

getChannelID

public abstract Integer getChannelID()
Description copied from interface: IBasicChannelInfo
Gets the MythTV internal channel ID.

Specified by:
getChannelID in interface IBasicChannelInfo
Returns:
the ID of the channel, e.g. 11123

getFullTitle

public String getFullTitle()
Description copied from interface: IBasicProgramInfo
Gets the full title of the program.

If a program has no subtitle, than this function is the same as getTitle(), otherwise the returned full title is in the format "title - subtitle"

Specified by:
getFullTitle in interface IBasicProgramInfo
Returns:
the full title of the program

getUniqueProgramId

public String getUniqueProgramId()
Description copied from interface: IBasicProgramInfo
Generates a unique id for this program-info.

This id has the format: [channel-id]_[program-start-time]

Specified by:
getUniqueProgramId in interface IBasicProgramInfo
Returns:
a unique id, e.g. 1000_20110719162900

getDuration

public int getDuration()
Description copied from interface: IBasicProgramInfo
Gets the duration for the program in minutes.

Specified by:
getDuration in interface IBasicProgramInfo
Returns:
the duration of the program in minutes or -1 if unknown.

getMinutesAfterMidnight

public int getMinutesAfterMidnight()
Description copied from interface: IBasicProgramInfo
Gets the the start time of the program in minutes after midnight.

Specified by:
getMinutesAfterMidnight in interface IBasicProgramInfo
Returns:
the start time in minutes after midnight

isValid

public boolean isValid()
Description copied from interface: IBasicProgramInfo
Checks if the program object contains valid data.

Specified by:
isValid in interface IBasicProgramInfo
Returns:
true if the program contains valid data.


Copyright © 2008-2013. All Rights Reserved.