SageTV Platform
V7.0

sage.api
Class ShowAPI

java.lang.Object
  extended by sage.api.ShowAPI

public class ShowAPI
extends java.lang.Object

Show represents detailed information about content. This is where the actual metadata information is stored. Show is separated from Airing because there can be multiple Airings of the same Show.

SageTV will automatically convert the following types to Show if used for a parameter that requires the Show type:

Airing - every Airing corresponds to a single Show which describes the Airing's content in more detail, so the Airing's Show is used

MediaFile - this is resolved to an Airing by the 1:1 relationship between MediaFiles and Airings, and then the Airing is resolved to a Show


Method Summary
 sage.Show AddShow(java.lang.String Title, boolean IsFirstRun, java.lang.String Episode, java.lang.String Description, long Duration, java.lang.String Category, java.lang.String SubCategory, java.lang.String[] PeopleList, java.lang.String[] RolesListForPeopleList, java.lang.String Rated, java.lang.String[] ExpandedRatingsList, java.lang.String Year, java.lang.String ParentalRating, java.lang.String[] MiscList, java.lang.String ExternalID, java.lang.String Language, long OriginalAirDate)
          Adds a new Show to the database.
 sage.Airing[] GetAiringsForShow(sage.Show Show, long StartingAfterTime)
          Returns a list of all of the Airings for the specified Show starting after the specified time.
 long GetOriginalAiringDate(sage.Show Show)
          Gets the date that this Show was originally aired at.
 java.lang.String GetPeopleAndCharacterInShowInRole(sage.Show Show, java.lang.String Role)
          Gets the people in the specified Show in the specified Role.
 java.lang.String GetPeopleAndCharacterInShowInRoles(sage.Show Show, java.lang.String[] RoleList)
          Gets the people in the specified Show in the specified Roles.
 java.lang.String[] GetPeopleAndCharacterListInShow(sage.Show Show)
          Gets a list of all of the people involved in this Show and the character each of them plays if known.
 java.lang.String[] GetPeopleAndCharacterListInShowInRole(sage.Show Show, java.lang.String Role)
          Gets the people in the specified Show in the specified Role.
 java.lang.String[] GetPeopleAndCharacterListInShowInRoles(sage.Show Show, java.lang.String[] RoleList)
          Gets the people in the specified Show in the specified Roles.
 java.lang.String GetPeopleInShow(sage.Show Show)
          Gets a list of all of the people involved in this Show.
 java.lang.String GetPeopleInShowInRole(sage.Show Show, java.lang.String Role)
          Gets the people in the specified Show in the specified Role.
 java.lang.String GetPeopleInShowInRoles(sage.Show Show, java.lang.String[] RoleList)
          Gets the people in the specified Show in the specified Roles.
 java.lang.String[] GetPeopleListInShow(sage.Show Show)
          Gets a list of all of the people involved in this Show.
 java.lang.String[] GetPeopleListInShowInRole(sage.Show Show, java.lang.String Role)
          Gets the people in the specified Show in the specified Role.
 java.lang.String[] GetPeopleListInShowInRoles(sage.Show Show, java.lang.String[] RoleList)
          Gets the people in the specified Show in the specified Roles.
 java.lang.String[] GetRolesInShow(sage.Show Show)
          Gets a list of the roles for each of the people in the specified Show.
 java.lang.String[] GetRoleTypes()
          Gets a list of all of the valid roles that people can have in a Show
 java.lang.String GetShowCategory(sage.Show Show)
          Returns the category for the specified Show.
 java.lang.String GetShowDescription(sage.Show Show)
          Returns the description for the specified Show
 long GetShowDuration(sage.Show Show)
          Returns the duration of the specified Show.
 java.lang.String GetShowEpisode(sage.Show Show)
          Returns the episode name for the specified Show.
 java.lang.String GetShowExpandedRatings(sage.Show Show)
          Returns the epxanded ratings information for the specified Show.
 java.lang.String GetShowExternalID(sage.Show Show)
          Gets the global unique ID which is used to identify Shows.
 sage.Show GetShowForExternalID(java.lang.String ExternalID)
          Gets a Show based on the global unique ID which is used to identify Shows.
 java.lang.String GetShowLanguage(sage.Show Show)
          Returns the language that the specified Show is in.
 java.lang.String GetShowMisc(sage.Show Show)
          Returns the miscellaneous metadata for this Show.
 java.lang.String GetShowParentalRating(sage.Show Show)
          Deprecated.  
 java.lang.String GetShowRated(sage.Show Show)
          Returns the MPAA rating for the specified Show (only used for movies).
 sage.SeriesInfo GetShowSeriesInfo(sage.Show Show)
          Gets the SeriesInfo object for a specified Show if that Show is for a television series and there is information on that series.
 java.lang.String GetShowSubCategory(sage.Show Show)
          Returns the subcategory for the specified Show
 java.lang.String GetShowTitle(sage.Show Show)
          Returns the title of the specified Show.
 java.lang.String GetShowYear(sage.Show Show)
          Gets the year of the specified Show.
 boolean IsShowEPGDataUnique(sage.Show Show)
          If this is true, then two Airings that both represent this Show will contain the same content.
 boolean IsShowFirstRun(sage.Airing Airing)
          Returns true if the specified Airing represents the first run of the Show content.
 boolean IsShowObject(java.lang.Object Show)
          Returns true if the passed in argument is a Show object.
 boolean IsShowReRun(sage.Airing Airing)
          Returns true if the specified Airing represents a rerun of the Show content.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

IsShowEPGDataUnique

public boolean IsShowEPGDataUnique(sage.Show Show)
If this is true, then two Airings that both represent this Show will contain the same content. If this is false then it means the EPG metadata for the content is 'generic' two different Airings each with this Show for its metadata may actually represent different content

Parameters:
Show - the Show object
Returns:
true if all Airings of this Show represent the same content, false otherwise

GetShowMisc

public java.lang.String GetShowMisc(sage.Show Show)
Returns the miscellaneous metadata for this Show. This includes things such as the star rating for a movie, the studio a movie was produced at, etc.

Parameters:
Show - the Show object
Returns:
the miscellaneous metadata for this Show

GetShowCategory

public java.lang.String GetShowCategory(sage.Show Show)
Returns the category for the specified Show. For music files, this will be the genre.

Parameters:
Show - the Show object
Returns:
the category for the Show

GetShowSubCategory

public java.lang.String GetShowSubCategory(sage.Show Show)
Returns the subcategory for the specified Show

Parameters:
Show - the Show object
Returns:
the subcategory for the Show

GetShowDescription

public java.lang.String GetShowDescription(sage.Show Show)
Returns the description for the specified Show

Parameters:
Show - the Show object
Returns:
the desccription for the Show

GetShowEpisode

public java.lang.String GetShowEpisode(sage.Show Show)
Returns the episode name for the specified Show. For music files, this will be the name of the song.

Parameters:
Show - the Show object
Returns:
the episode name for the specified Show. For music files, this will be the name of the song. For imported videos, this will be the title of the file

GetShowExpandedRatings

public java.lang.String GetShowExpandedRatings(sage.Show Show)
Returns the epxanded ratings information for the specified Show. This includes thigs like Violence, Nudity, Adult Language, etc.

Parameters:
Show - the Show object
Returns:
the expanded ratings for the Show

GetShowParentalRating

public java.lang.String GetShowParentalRating(sage.Show Show)
Deprecated. 

Returns the parental rating for this show. The parental rating field in Airing is used instead of this in the standard implementation.

Parameters:
Show - the Show object
Returns:
the parental rating info for this show

GetShowRated

public java.lang.String GetShowRated(sage.Show Show)
Returns the MPAA rating for the specified Show (only used for movies).

Parameters:
Show - the Show object
Returns:
the MPAA rating for this Show, will be one of: G, PG, R, PG-13, etc.

GetShowDuration

public long GetShowDuration(sage.Show Show)
Returns the duration of the specified Show. Most Shows do not contain duration information, with the exception of movies whose show duration indicates the runing time of the movie.

Parameters:
Show - the Show object
Returns:
the duration in milliseconds of the specified Show, 0 if it is not set

GetShowTitle

public java.lang.String GetShowTitle(sage.Show Show)
Returns the title of the specified Show. For music this will correspond to the Album name. For imported videos, For imported videos, this will be the title of the file with the relative import path as it's prefix.

Parameters:
Show - the Show object
Returns:
the title of the specified Show

GetShowYear

public java.lang.String GetShowYear(sage.Show Show)
Gets the year of the specified Show. This is usually only valid for movies.

Parameters:
Show - the Show object
Returns:
the year the specified Show was produced in

GetShowExternalID

public java.lang.String GetShowExternalID(sage.Show Show)
Gets the global unique ID which is used to identify Shows. This ID is common among all SageTV users.

Parameters:
Show - the Show object
Returns:
the global unique ID which represents this Show

GetOriginalAiringDate

public long GetOriginalAiringDate(sage.Show Show)
Gets the date that this Show was originally aired at.

Parameters:
Show - the Show object
Returns:
the date that this Show was originally aired at, same units as java.lang.System.currentTimeMillis()

GetRoleTypes

public java.lang.String[] GetRoleTypes()
Gets a list of all of the valid roles that people can have in a Show

Returns:
a list of all of the valid roles that people can have in a Show

GetPeopleInShow

public java.lang.String GetPeopleInShow(sage.Show Show)
Gets a list of all of the people involved in this Show. The order of the returned list will correlate with the values returned from GetRolesInShow.

Parameters:
Show - the Show object
Returns:
a list of all of the people involved in this Show as a comma separated list

GetPeopleListInShow

public java.lang.String[] GetPeopleListInShow(sage.Show Show)
Gets a list of all of the people involved in this Show. The order of the returned list will correlate with the values returned from GetRolesInShow.

Parameters:
Show - the Show object
Returns:
a list of all of the people involved in this Show as a String array
Since:
5.1

GetPeopleAndCharacterListInShow

public java.lang.String[] GetPeopleAndCharacterListInShow(sage.Show Show)
Gets a list of all of the people involved in this Show and the character each of them plays if known. The order of the returned list will correlate with the values returned from GetRolesInShow.

Parameters:
Show - the Show object
Returns:
a list of all of the people involved in this Show with the characters they play as a String array
Since:
7.0

GetRolesInShow

public java.lang.String[] GetRolesInShow(sage.Show Show)
Gets a list of the roles for each of the people in the specified Show. The order of the returned list will correlate with the values returned from GetPeopleInShow

Parameters:
Show - the Show object
Returns:
a list of the roles for each of the people in the specified Show

GetPeopleInShowInRole

public java.lang.String GetPeopleInShowInRole(sage.Show Show,
                                              java.lang.String Role)
Gets the people in the specified Show in the specified Role. Returned as a comma separated list.

Parameters:
Show - the Show object
Role - the role to get the people for
Returns:
the people in the specified Show in the specified Role

GetPeopleInShowInRoles

public java.lang.String GetPeopleInShowInRoles(sage.Show Show,
                                               java.lang.String[] RoleList)
Gets the people in the specified Show in the specified Roles. Returned as a comma separated list.

Parameters:
Show - the Show object
RoleList - the roles to get the people for
Returns:
the people in the specified Show in the specified Roles

GetPeopleAndCharacterInShowInRole

public java.lang.String GetPeopleAndCharacterInShowInRole(sage.Show Show,
                                                          java.lang.String Role)
Gets the people in the specified Show in the specified Role. Returned as a comma separated list. Each name will also append the character they play if known; using the localized format "Actor as Character".

Parameters:
Show - the Show object
Role - the role to get the people for
Returns:
the people in the specified Show in the specified Role
Since:
7.0

GetPeopleAndCharacterInShowInRoles

public java.lang.String GetPeopleAndCharacterInShowInRoles(sage.Show Show,
                                                           java.lang.String[] RoleList)
Gets the people in the specified Show in the specified Roles. Returned as a comma separated list. Each name will also append the character they play if known; using the localized format "Actor as Character".

Parameters:
Show - the Show object
RoleList - the roles to get the people for
Returns:
the people in the specified Show in the specified Roles
Since:
7.0

GetPeopleListInShowInRole

public java.lang.String[] GetPeopleListInShowInRole(sage.Show Show,
                                                    java.lang.String Role)
Gets the people in the specified Show in the specified Role. Returned as a String array.

Parameters:
Show - the Show object
Role - the role to get the people for
Returns:
the people in the specified Show in the specified Role as a String array
Since:
5.1

GetPeopleListInShowInRoles

public java.lang.String[] GetPeopleListInShowInRoles(sage.Show Show,
                                                     java.lang.String[] RoleList)
Gets the people in the specified Show in the specified Roles. Returned as a String array.

Parameters:
Show - the Show object
RoleList - the roles to get the people for
Returns:
the people in the specified Show in the specified Roles as a String array
Since:
5.1

GetPeopleAndCharacterListInShowInRole

public java.lang.String[] GetPeopleAndCharacterListInShowInRole(sage.Show Show,
                                                                java.lang.String Role)
Gets the people in the specified Show in the specified Role. Returned as a String array. Each string will also indicate the character they play if known; using the localized format "Actor as Character".

Parameters:
Show - the Show object
Role - the role to get the people for
Returns:
the people in the specified Show in the specified Role as a String array
Since:
7.0

GetPeopleAndCharacterListInShowInRoles

public java.lang.String[] GetPeopleAndCharacterListInShowInRoles(sage.Show Show,
                                                                 java.lang.String[] RoleList)
Gets the people in the specified Show in the specified Roles. Returned as a String array. Each string will also indicate the character they play if known; using the localized format "Actor as Character".

Parameters:
Show - the Show object
RoleList - the roles to get the people for
Returns:
the people in the specified Show in the specified Roles as a String array
Since:
7.0

IsShowObject

public boolean IsShowObject(java.lang.Object Show)
Returns true if the passed in argument is a Show object. No automatic type conversion will be done on the argument.

Parameters:
Show - the object to test to see if its a Show
Returns:
true if the passed in argument is a Show object, false otherwise

IsShowFirstRun

public boolean IsShowFirstRun(sage.Airing Airing)
Returns true if the specified Airing represents the first run of the Show content.

Parameters:
Airing - the Airing object
Returns:
true if the specified Airing represents the first run of its Show content, false otherwise

IsShowReRun

public boolean IsShowReRun(sage.Airing Airing)
Returns true if the specified Airing represents a rerun of the Show content.

Parameters:
Airing - the Airing object
Returns:
true if the specified Airing represents a rerun of its Show content, false otherwise

GetShowLanguage

public java.lang.String GetShowLanguage(sage.Show Show)
Returns the language that the specified Show is in.

Parameters:
Show - the Show object
Returns:
the language that the specified Show is in

AddShow

public sage.Show AddShow(java.lang.String Title,
                         boolean IsFirstRun,
                         java.lang.String Episode,
                         java.lang.String Description,
                         long Duration,
                         java.lang.String Category,
                         java.lang.String SubCategory,
                         java.lang.String[] PeopleList,
                         java.lang.String[] RolesListForPeopleList,
                         java.lang.String Rated,
                         java.lang.String[] ExpandedRatingsList,
                         java.lang.String Year,
                         java.lang.String ParentalRating,
                         java.lang.String[] MiscList,
                         java.lang.String ExternalID,
                         java.lang.String Language,
                         long OriginalAirDate)
Adds a new Show to the database. Null or the empty string ("") can be passed in for any unneeded fields.

Parameters:
Title - the title of the Show (for music this should be album name)
IsFirstRun - true if this Show is a first run, false otherwise (this parameter has no effect anymore since Airings determine first/rerun status)
Episode - the episode name for this Show (for music this should be the song title)
Description - the description of the Show
Duration - the duration of the Show, not necessary and can be zero; this is only used for indicating differences between Airing duration and the actual content duration
Category - the category of the Show (should be genre for music)
SubCategory - the subcategory of the Show
PeopleList - a list of all of the people in the Show, the roles of the people should correspond to the RolesListForPeopleList argument
RolesListForPeopleList - a list of the roles for the people in the Show, this should correspond to the PeopleList argument
Rated - the rating for the Show see GetShowRated()
ExpandedRatingsList - the expanded ratings list for the show, see GetShowExpandedRatings()
Year - the year of the Show
ParentalRating - the parental rating for the Show (this is no longer used since Airing contains the parental rating)
MiscList - miscellaneous metadata for the Show
ExternalID - the global ID which should be used to uniquely identify this Show
Language - the language for the Show
OriginalAirDate - the original airing date of the Show
Returns:
the newly created Show object

GetAiringsForShow

public sage.Airing[] GetAiringsForShow(sage.Show Show,
                                       long StartingAfterTime)
Returns a list of all of the Airings for the specified Show starting after the specified time.

Parameters:
Show - the Show object
StartingAfterTime - the time that all returned Airings should start after
Returns:
a list of all of the Airings for the specified Show starting after the specified time

GetShowForExternalID

public sage.Show GetShowForExternalID(java.lang.String ExternalID)
Gets a Show based on the global unique ID which is used to identify Shows. This ID is common among all SageTV users. This value can be obtained from GetShowExternalID()

Parameters:
ExternalID - the external ID to find the corresponding Show for
Returns:
the Show which corresponds to the specified externalID, or null if it isn't found in the database

GetShowSeriesInfo

public sage.SeriesInfo GetShowSeriesInfo(sage.Show Show)
Gets the SeriesInfo object for a specified Show if that Show is for a television series and there is information on that series.

Parameters:
Show - the Show object
Returns:
the SeriesInfo for the specified Show, or null if the Show has no SeriesInfo
Since:
5.1

SageTV Platform
V7.0

SageTV is a trademark or registered trademark of SageTV, LLC in the US and other countries.
Copyright 2000-2010 SageTV, LLC. 9800 S. La Cienega Blvd., Suite 905
Inglewood, CA, 90301, U.S.A. All Rights Reserved.