Package sage.api

Class Database


  • public class Database
    extends java.lang.Object
    Contains methods for manipulating database objects in SageTV as well as doing general database queries NOTE: All of the 'Search' methods will be limited to 1000 results.
    • Constructor Summary

      Constructors 
      Constructor Description
      Database()  
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      java.util.Vector DataIntersection​(java.lang.Object DataSet1, java.lang.Object DataSet2)
      Creates an intersection of two sets of data.
      java.util.Vector DataUnion​(java.lang.Object DataSet1, java.lang.Object DataSet2)
      Creates a Union of one or more sets of data.
      (package private) java.lang.Object FilterByBoolMethod​(java.lang.Object Data, java.lang.String Method, boolean MatchValue)
      Filters data by a boolean method.
      (package private) java.lang.Object FilterByMethod​(java.lang.Object Data, java.lang.String Method, java.lang.Object MatchValue, boolean MatchedPasses)
      Filters data by a method.
      (package private) java.lang.Object FilterByMethodRegex​(java.lang.Object Data, java.lang.String Method, java.util.regex.Pattern RegexPattern, boolean MatchedPasses, boolean CompleteMatch)
      Filters data by a method.
      java.lang.Object FilterByRange​(java.lang.Object Data, java.lang.String Method, java.lang.Comparable LowerBoundInclusive, java.lang.Comparable UpperBoundExclusive, boolean KeepWithinBounds)
      Filters data by a comparable range.
      sage.Airing[] GetAiringsOnChannelAtTime​(sage.Channel Channel, long StartTime, long EndTime, boolean MustStartDuringTime)
      Returns all of the Airing objects in the database that are on the specified channel during the specified time span.
      sage.Airing[] GetAiringsOnViewableChannelsAtTime​(long StartTime, long EndTime, boolean MustStartDuringTime)
      Returns all of the Airing objects in the database on all of the channels that are viewable during the specified time span.
      java.lang.String[] GetAllCategories()
      Gets all of the categories that are in the database.
      java.lang.String[] GetAllCategories​(java.lang.String MediaMask)
      Gets all of the categories that are in the database.
      java.lang.String[] GetAllGroupingCategories()
      Gets all of the categories that are in the database.
      java.lang.String[] GetAllGroupingCategories​(java.lang.String MediaMask)
      Gets all of the categories that are in the database.
      sage.Airing[] GetAllNonMusicWithPerson​(java.lang.String Person)
      Deprecated. 
      sage.Airing[] GetAllNonMusicWithTitle​(java.lang.String Title)
      Deprecated. 
      java.lang.String[] GetAllPeople()
      Gets all of the people that are in the database.
      java.lang.String[] GetAllPeople​(java.lang.String MediaMask)
      Gets all of the people that are in the database.
      java.lang.String[] GetAllTitles()
      Gets all of the titles that are in the database.
      java.lang.String[] GetAllTitles​(java.lang.String MediaMask)
      Gets all of the titles that are in the database.
      sage.Channel[] GetChannelsOnLineup​(java.lang.String Lineup)
      Returns all of the Channel objects in the database that are on the specified Lineup.
      long GetDatabaseLastModifiedTime​(java.lang.String MediaMask)
      Returns the last modification time for objects that match anything in the specified MediaMask.
      java.lang.Object GetFilesWithImportPrefix​(java.lang.Object MediaData, java.lang.String ImportPrefix, boolean IncludeFiles, boolean IncludeFolders, boolean GroupFolders)
      Returns a list of java.io.File objects w/ the specified MediaMask whos import prefix matches that of the argument
      java.lang.Object GetMediaFilesWithImportPrefix​(java.lang.Object MediaData, java.lang.String ImportPrefix, boolean IncludeFiles, boolean IncludeFolders, boolean GroupFolders)
      Returns a list or map of MediaFile objects w/ the specified MediaMask whos import prefix matches that of the argument
      java.lang.String GetMediaMask​(sage.DBObject DBObject)
      Returns a string which represents the different media categories the specified DBObject belongs to.
      java.util.Map GroupByArrayMethod​(java.lang.Object Data, java.lang.String Method)
      Grouping method for data lists/maps.
      java.util.Map GroupByMethod​(java.lang.Object Data, java.lang.String Method)
      Grouping method for data lists/maps.
      boolean HasMediaMask​(sage.DBObject DBObject, java.lang.String MediaMask)
      Tests whether the passed in DBObject matches any of the categories specified in the passed in MediaMask.
      boolean IsDatabaseMemoryMaxed()
      Returns true if the database has maxed out its memory usage and cannot add more content
      sage.Airing[] SearchByPerson​(java.lang.String SearchString)
      Returns all Airings in the database that refer to content that is NOT a music file and includes the specified person in the list of people involved (i.e.
      sage.Airing[] SearchByPerson​(java.lang.String SearchString, java.lang.String MediaMask)
      Returns all Airings in the database that refer to content that includes the specified person in the list of people involved (i.e.
      sage.Airing[] SearchByText​(java.lang.String SearchString)
      Searches the descriptions and episode names of all of the content in the database for the specified search string.
      sage.Airing[] SearchByText​(java.lang.String SearchString, java.lang.String MediaMask)
      Searches the descriptions and episode names of all of the content in the database for the specified search string.
      sage.Airing[] SearchByTitle​(java.lang.String SearchString)
      Returns all Airings in the database that refer to content that is NOT a music file and has the specified title.
      sage.Airing[] SearchByTitle​(java.lang.String SearchString, java.lang.String MediaMask)
      Returns all Airings in the database that refer to content that has the specified title.
      sage.Channel[] SearchForChannel​(java.lang.String SearchString)
      Returns all Channels in the database (disabled or not) that match the SearchString in their channel number, name, callsign or network.
      sage.Channel[] SearchForChannel​(java.lang.String SearchString, java.lang.Boolean IncludeNonViewable)
      Returns all Channels in the database that match the SearchString in their channel number, name, callsign or network.
      sage.Person[] SearchForPeople​(java.lang.String SearchString)
      Returns a list of all of the people in the database that include the search string in their name.
      sage.Person[] SearchForPeople​(java.lang.String SearchString, java.lang.String MediaMask)
      Returns a list of all of the people in the database that include the search string in their name.
      sage.Person[] SearchForPeopleNTE​(java.lang.String NTEString)
      Returns a list of all of the people in the database that match the passed in text, where the Unicode characters u2460-u2468 and u24EA (Unicode Circled Digits) in the text represent the numeric Text Keys 1-9 and 0.
      sage.Person[] SearchForPeopleNTE​(java.lang.String NTEString, java.lang.String MediaMask)
      Returns a list of all of the people in the database that match the passed in text, where the Unicode characters u2460-u2468 and u24EA (Unicode Circled Digits) in the text represent the numeric Text Keys 1-9 and 0.
      sage.Person[] SearchForPeopleRegex​(java.util.regex.Pattern RegexPattern)
      Returns a list of all of the people in the database that match the passed in regular expression.
      sage.Person[] SearchForPeopleRegex​(java.util.regex.Pattern RegexPattern, java.lang.String MediaMask)
      Returns a list of all of the people in the database that match the passed in regular expression.
      java.lang.String[] SearchForTitles​(java.lang.String SearchString)
      Returns a list of all of the titles in the database that include the search string in them.
      java.lang.String[] SearchForTitles​(java.lang.String SearchString, java.lang.String MediaMask)
      Returns a list of all of the titles in the database that include the search string in them.
      java.lang.String[] SearchForTitlesNTE​(java.lang.String NTEString)
      Returns a list of all of the titles in the database that match the passed in text, where the Unicode characters u2460-u2468 and u24EA (Unicode Circled Digits) in the text represent the numeric Text Keys 1-9 and 0.
      java.lang.String[] SearchForTitlesNTE​(java.lang.String NTEString, java.lang.String MediaMask)
      Returns a list of all of the titles in the database that match the passed in text, where the Unicode characters u2460-u2468 and u24EA (Unicode Circled Digits) in the text represent the numeric Text Keys 1-9 and 0.
      java.lang.String[] SearchForTitlesRegex​(java.util.regex.Pattern RegexPattern)
      Returns a list of all of the titles in the database that match the passed in regular expression.
      java.lang.String[] SearchForTitlesRegex​(java.util.regex.Pattern RegexPattern, java.lang.String MediaMask)
      Returns a list of all of the titles in the database that match the passed in regular expression.
      java.util.Vector SearchSelectedExactFields​(java.lang.String SearchString, boolean CaseSensitive, boolean Titles, boolean Episode, boolean Description, boolean People, boolean Category, boolean Rated, boolean ExtendedRatings, boolean Year, boolean Misc)
      Searches the specified fields of all the Airings in the database for the specified search string.
      java.util.Vector SearchSelectedExactFields​(java.lang.String SearchString, boolean CaseSensitive, boolean Titles, boolean Episode, boolean Description, boolean People, boolean Category, boolean Rated, boolean ExtendedRatings, boolean Year, boolean Misc, java.lang.String MediaMask)
      Searches the specified fields of all the Airings in the database for the specified search string.
      java.util.Vector SearchSelectedFields​(java.lang.String SearchString, boolean CaseSensitive, boolean Titles, boolean Episode, boolean Description, boolean People, boolean Category, boolean Rated, boolean ExtendedRatings, boolean Year, boolean Misc)
      Searches the specified fields of all the Airings in the database for the specified search string.
      java.util.Vector SearchSelectedFields​(java.lang.String SearchString, boolean CaseSensitive, boolean Titles, boolean Episode, boolean Description, boolean People, boolean Category, boolean Rated, boolean ExtendedRatings, boolean Year, boolean Misc, java.lang.String MediaMask)
      Searches the specified fields of all the Airings in the database for the specified search string.
      java.util.Vector SearchSelectedFieldsNTE​(java.lang.String NTEString, boolean Titles, boolean Episode, boolean Description, boolean People, boolean Category, boolean Rated, boolean ExtendedRatings, boolean Year, boolean Misc)
      Searches the specified fields of all the Airings in the database and tries to match them against the passed in text, where the Unicode characters u2460-u2468 and u24EA (Unicode Circled Digits) in the text represent the numeric Text Keys 1-9 and 0.
      java.util.Vector SearchSelectedFieldsNTE​(java.lang.String NTEString, boolean Titles, boolean Episode, boolean Description, boolean People, boolean Category, boolean Rated, boolean ExtendedRatings, boolean Year, boolean Misc, java.lang.String MediaMask)
      Searches the specified fields of all the Airings in the database and tries to match them against the passed in text where the Unicode characters u2460-u2468 and u24EA (Unicode Circled Digits) in the text represent the numeric Text Keys 1-9 and 0.
      java.util.Vector SearchSelectedFieldsRegex​(java.util.regex.Pattern RegexPattern, boolean Titles, boolean Episode, boolean Description, boolean People, boolean Category, boolean Rated, boolean ExtendedRatings, boolean Year, boolean Misc)
      Searches the specified fields of all the Airings in the database and tries to match them against the passed in regular expression.
      java.util.Vector SearchSelectedFieldsRegex​(java.util.regex.Pattern RegexPattern, boolean Titles, boolean Episode, boolean Description, boolean People, boolean Category, boolean Rated, boolean ExtendedRatings, boolean Year, boolean Misc, java.lang.String MediaMask)
      Searches the specified fields of all the Airings in the database and tries to match them against the passed in regular expression.
      java.lang.Object Sort​(java.lang.Object Data, boolean Descending, java.lang.Object SortTechnique)
      Sorts a list of data according to the specified sorting technique.
      java.lang.Object SortLexical​(java.lang.Object Data, boolean Descending, java.lang.String SortByMethod)
      Sorts a list of data based on the result of calling the "SortByMethod" on each item and using toString on the return value of that method.
      java.lang.String StripLeadingArticles​(java.lang.String Text)
      Strips any leading 'a, an or the' prefixes from the passed in string and returns the resulting string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Database

        public Database()
    • Method Detail

      • FilterByBoolMethod

        java.lang.Object FilterByBoolMethod​(java.lang.Object Data,
                                            java.lang.String Method,
                                            boolean MatchValue)
        Filters data by a boolean method. Each element in the 'Data' has the 'Method' executed on it. If the result is the same as the 'MatchValue' parameter then that element will be in the returned data. For Maps & Collections this is done in place. For Arrays a new Array is created. NOTE: If you pass more than 3 arguments to this function then the extra arguments will be passed along to the Method that should be executed.
        Parameters:
        Data - the data that is to be filtered; this can be a java.util.Collection, java.util.Map or an Array. For Maps & Collections the filtering is done IN-PLACE.
        Method - This is what is evaluated with an element as the only argument. This can be a list of methods to test against separated by the '|' character.
        MatchValue - the Method must return this value to be in the returned data
        Returns:
        The elements that passed the filter. The type is the same type as the passed in Data.
      • FilterByMethod

        java.lang.Object FilterByMethod​(java.lang.Object Data,
                                        java.lang.String Method,
                                        java.lang.Object MatchValue,
                                        boolean MatchedPasses)
        Filters data by a method. Each element in the 'Data' has the 'Method' executed on it. If the result is the same as the 'MatchValue' parameter then that element will be in the returned data if MatchedPasses is true. If MatchedPasses is false then non-matching elements will be in the returned data. For Maps & Collections this is done in place. For Arrays a new Array is created. NOTE: If you pass more than 4 arguments to this function then the extra arguments will be passed along to the Method that should be executed.
        Parameters:
        Data - the data that is to be filtered; this can be a java.util.Collection, java.util.Map or an Array. For Maps & Collections the filtering is done IN-PLACE. For Maps the keys are used for the filtering.
        Method - This is what is evaluated with an element as the only argument. This can be a list of methods to test against separated by the '|' character. There is also a special 'UserCategories' option which will check the ManualRecord, Favorite and MediaFile "UserCategory" property as well as the Show Category & SubCategory for any matches against a comma-delimited list in the MatchValue parameter.
        MatchValue - the value to test the return value of Method against
        MatchedPasses - if true then matches are included in the return data, if false then everything that doesn't match is returned
        Returns:
        The elements that passed the filter. The type is the same type as the passed in Data.
      • FilterByMethodRegex

        java.lang.Object FilterByMethodRegex​(java.lang.Object Data,
                                             java.lang.String Method,
                                             java.util.regex.Pattern RegexPattern,
                                             boolean MatchedPasses,
                                             boolean CompleteMatch)
        Filters data by a method. Each element in the 'Data' has the 'Method' executed on it. The result is then converted to a String and RegexPattern is applied to it. If the regular expression matches the String value and MatchedPasses is true, then the element will be in the returned data. If MatchedPasses is false then non-matching elements will be in the returned data. For Maps & Collections this is done in place. For Arrays a new Array is created. NOTE: If you pass more than 5 arguments to this function then the extra arguments will be passed along to the Method that should be executed.
        Parameters:
        Data - the data that is to be filtered; this can be a java.util.Collection, java.util.Map or an Array. For Maps & Collections the filtering is done IN-PLACE.
        Method - This is what is evaluated with an element as the only argument (and additional arguments if passed in).
        RegexPattern - The compiled regular expression used for matching (if it's not compiled, then it will be converted to a compiled regular expression)
        MatchedPasses - if true then matches are included in the return data, if false then everything that doesn't match is returned
        CompleteMatch - if true then the entire string must match the regular expression, if false then the regular expression only needs to match a substring of it
        Returns:
        The elements that passed the filter. The type is the same type as the passed in Data.
        Since:
        5.1
      • FilterByRange

        public java.lang.Object FilterByRange​(java.lang.Object Data,
                                              java.lang.String Method,
                                              java.lang.Comparable LowerBoundInclusive,
                                              java.lang.Comparable UpperBoundExclusive,
                                              boolean KeepWithinBounds)
        Filters data by a comparable range. Each element in the 'Data' has the 'Method' executed on it. If KeepWithinBounds is true, then results that are within the specified range are included in the returned data; otherwise if KeepWithinBounds is false then results that are outside of the specified range are included in the returned data. For Maps & Collections this is done in place. For Arrays a new Array is created.
        Parameters:
        Data - the data that is to be filtered; this can be a java.util.Collection, java.util.Map or an Array. For Maps & Collections the filtering is done IN-PLACE.
        Method - This is what is evaluated with an element as the only argument
        LowerBoundInclusive - a java.lang.Comparable which specifies the INCLUSIVE lower bound for the range
        UpperBoundExclusive - a java.lang.Comparable which specified the EXCLUSIVE upper bound for the range
        KeepWithinBounds - if true then values within the range are returned, if false then values outside the range are returned
        Returns:
        The elements that passed the filter. The type is the same type as the passed in Data.
      • GroupByMethod

        public java.util.Map GroupByMethod​(java.lang.Object Data,
                                           java.lang.String Method)
        Grouping method for data lists/maps. This will return a Map that uses a key->value mapping to group the data. The order of the grouping is stable, which means the order of the elements within a subgroup will be the same order as in the pased in data. Use the GetSubgroup method to get the corresponding value for a key. The key for each data element is determined by calling the specified 'Method' with that data element as the sole parameter. Each value in the map will be a java.util.Vector that contains the elements in the group. There is a special Method called "Categories" which will allow items to fall into possibly more than one group. This will group by Category and also by SubCategory all at the same level (if SubCategory is not defined, then it will not be used for an alternate grouping). "Categories" grouping will also break up any category names that have comma or semicolon delimited lists and put the item into each of those. NOTE: If you pass more than 2 arguments to this function then the extra arguments will be passed along to the Method that should be executed.
        Parameters:
        Data - the data to perform the grouping on, must be a java.util.Collection, java.util.Map or an Array
        Method - the name of the Method to execute on each element to retrieve the key used for grouping, see the note above regarding "Categories" as a special option
        Returns:
        a java.util.Map keyed with the values obtained from executing Method on the Data and with values that are Vectors of elements who's keys match
      • GroupByArrayMethod

        public java.util.Map GroupByArrayMethod​(java.lang.Object Data,
                                                java.lang.String Method)
        Grouping method for data lists/maps. This will return a Map that uses a key->value mapping to group the data. The order of the grouping is stable, which means the order of the elements within a subgroup will be the same order as in the pased in data. Use the GetSubgroup method to get the corresponding value for a key. The keys for each data element is determined by calling the specified 'Method' with that data element as the sole parameter. The Method should return an array or list, each element of which will be a key that the data element will be grouped by. Each value in the map will be a java.util.Vector that contains the elements in the group. NOTE: If you pass more than 2 arguments to this function then the extra arguments will be passed along to the Method that should be executed.
        Parameters:
        Data - the data to perform the grouping on, must be a java.util.Collection, java.util.Map or an Array
        Method - the name of the Method to execute on each element to retrieve the keys used for grouping
        Returns:
        a java.util.Map keyed with the values obtained from executing Method on the Data and with values that are Vectors of elements who's keys match
        Since:
        5.1
      • Sort

        public java.lang.Object Sort​(java.lang.Object Data,
                                     boolean Descending,
                                     java.lang.Object SortTechnique)
        Sorts a list of data according to the specified sorting technique. The order of the sort can be reversed using the Descending parameter. If you use a method name for the SortTechnique, then the data will be sorted by the natural ordering of the values returned from that mehod call. If that data type does not implement java.lang.Comparable then they will be converted to Strings and those Strings will be compared. NOTE: If you pass more than 3 arguments to this function then the extra arguments will be passed along to the SortTechnique if it refers to a Method that should be executed.
        Parameters:
        Data - the data to sort, this must be a java.util.Collection, a java.util.Map, or an array; for Collections all the elements must be the same Class
        Descending - if true then the data will be sorted in descending order, if false then the order will be reversed
        SortTechnique - the technique to sort the data by; this can be a java.util.Comparator which then explicitly controls the sort, or it can be one of the named sorting techniques of: Intelligent, ChannelNumber, CaseInsensitive, FavoritePriority, CaptureDevicePriority, Natural or a method name. If null is passed then the elements "natural" sorting is used.
        Returns:
        the sorted data, for passed in Maps this'll be a sorted Map; for Collections or arrays this will be an Object[] array
      • SortLexical

        public java.lang.Object SortLexical​(java.lang.Object Data,
                                            boolean Descending,
                                            java.lang.String SortByMethod)
        Sorts a list of data based on the result of calling the "SortByMethod" on each item and using toString on the return value of that method. The order of the sort can be reversed using the Descending parameter. There are many cases where this will return the same thing as a call to Sort() SortLexical should be used when sorting text if possible, as it uses more advanced language-specific sorting techniques to determine a proper order. This sort is performed case-insensitive. NOTE: If you pass more than 3 arguments to this function then the extra arguments will be passed along to the SortByMethod.
        Parameters:
        Data - the data to sort, this must be a java.util.Collection, a java.util.Map, or an array; for Collections all the elements must be the same Class
        Descending - if true then the data will be sorted in descending order, if false then the order will be reversed
        SortByMethod - the method to call on each data item to get the value it should be sorted by, if this is null then the data elements are converted to Strings directly and then compared
        Returns:
        the sorted data, for passed in Maps this'll be a sorted Map; for Collections or arrays this will be an Object[] array
        Since:
        5.1
      • GetAiringsOnChannelAtTime

        public sage.Airing[] GetAiringsOnChannelAtTime​(sage.Channel Channel,
                                                       long StartTime,
                                                       long EndTime,
                                                       boolean MustStartDuringTime)
        Returns all of the Airing objects in the database that are on the specified channel during the specified time span.
        Parameters:
        Channel - the Channel that the Airings need to be one
        StartTime - the start of the time window to search for Airings in
        EndTime - the end of the time window to search for Airings in
        MustStartDuringTime - if true, then only Airings that start during the time window will be returned, if false then any Airing that overlaps with the time window will be returned
        Returns:
        the Airings on the specified channel within the specified time window
      • GetAiringsOnViewableChannelsAtTime

        public sage.Airing[] GetAiringsOnViewableChannelsAtTime​(long StartTime,
                                                                long EndTime,
                                                                boolean MustStartDuringTime)
        Returns all of the Airing objects in the database on all of the channels that are viewable during the specified time span.
        Parameters:
        StartTime - the start of the time window to search for Airings in
        EndTime - the end of the time window to search for Airings in
        MustStartDuringTime - if true, then only Airings that start during the time window will be returned, if false then any Airing that overlaps with the time window will be returned
        Returns:
        the Airings on all the viewable channels within the specified time window
      • GetAllNonMusicWithPerson

        public sage.Airing[] GetAllNonMusicWithPerson​(java.lang.String Person)
        Deprecated.
        Returns all Airings in the database that refer to content that is NOT a music file and includes the specified person in the list of people involved (i.e. actors, directors, producers, etc.)
        Parameters:
        Person - the name of the person to search for matching content on
        Returns:
        an array of Airing objects that reference content that includes the specified person, music is not returned
      • GetAllNonMusicWithTitle

        public sage.Airing[] GetAllNonMusicWithTitle​(java.lang.String Title)
        Deprecated.
        Returns all Airings in the database that refer to content that is NOT a music file and has the specified title.
        Parameters:
        Title - the title of the content must match this exactly
        Returns:
        an array of Airing objects that reference content with the specified title, music is not returned
      • SearchByPerson

        public sage.Airing[] SearchByPerson​(java.lang.String SearchString)
        Returns all Airings in the database that refer to content that is NOT a music file and includes the specified person in the list of people involved (i.e. actors, directors, producers, etc.) This is the same as GetAllNonMusicWithPerson()
        Parameters:
        SearchString - the name of the person to search for matching content on
        Returns:
        an array of Airing objects that reference content that includes the specified person, music is not returned
      • SearchByPerson

        public sage.Airing[] SearchByPerson​(java.lang.String SearchString,
                                            java.lang.String MediaMask)
        Returns all Airings in the database that refer to content that includes the specified person in the list of people involved (i.e. actors, directors, producers, etc.). The content must also match one of the media types specified in the MediaMask
        Parameters:
        SearchString - the name of the person to search for matching content on
        MediaMask - string specifying what content types to search (i.e. "TM" for TV & Music, 'T'=TV, 'M'=Music, 'V'=Video, 'D'=DVD, 'P'=Pictures, 'B'=BluRay)
        Returns:
        an array of Airing objects that reference content that includes the specified person and matches the media mask
        Since:
        5.1
      • SearchByText

        public sage.Airing[] SearchByText​(java.lang.String SearchString)
        Searches the descriptions and episode names of all of the content in the database for the specified search string. This search is case insensitive.
        Parameters:
        SearchString - the string to search for
        Returns:
        an array of Airings who's content has the specified search string in its description or episode name
      • SearchByText

        public sage.Airing[] SearchByText​(java.lang.String SearchString,
                                          java.lang.String MediaMask)
        Searches the descriptions and episode names of all of the content in the database for the specified search string. This search is case insensitive. The content must also match one of the media types specified in the MediaMask
        Parameters:
        SearchString - the string to search for
        MediaMask - string specifying what content types to search (i.e. "TM" for TV & Music, 'T'=TV, 'M'=Music, 'V'=Video, 'D'=DVD, 'P'=Pictures, 'B'=BluRay)
        Returns:
        an array of Airings who's content has the specified search string in its description or episode name and matches the media mask
        Since:
        5.1
      • SearchByTitle

        public sage.Airing[] SearchByTitle​(java.lang.String SearchString)
        Returns all Airings in the database that refer to content that is NOT a music file and has the specified title. This is the same as GetAllNonMusicWithTitle()
        Parameters:
        SearchString - the title of the content must match this exactly
        Returns:
        an array of Airing objects that reference content with the specified title, music is not returned
      • SearchByTitle

        public sage.Airing[] SearchByTitle​(java.lang.String SearchString,
                                           java.lang.String MediaMask)
        Returns all Airings in the database that refer to content that has the specified title. The content must also match one of the media types specified in the MediaMask
        Parameters:
        SearchString - the title of the content must match this exactly
        MediaMask - string specifying what content types to search (i.e. "TM" for TV & Music, 'T'=TV, 'M'=Music, 'V'=Video, 'D'=DVD, 'P'=Pictures, 'B'=BluRay)
        Returns:
        an array of Airing objects that reference content with the specified title and matches the media mask
        Since:
        5.1
      • SearchForPeople

        public sage.Person[] SearchForPeople​(java.lang.String SearchString)
        Returns a list of all of the people in the database that include the search string in their name. This search is case insensitive.
        Parameters:
        SearchString - the string to search on
        Returns:
        an array of Persons which represent all of the people in the database that matched the search
      • SearchForPeople

        public sage.Person[] SearchForPeople​(java.lang.String SearchString,
                                             java.lang.String MediaMask)
        Returns a list of all of the people in the database that include the search string in their name. This search is case insensitive. The content it references must also match one of the media types specified in the MediaMask.
        Parameters:
        SearchString - the string to search on
        MediaMask - string specifying what content types to search (i.e. "TM" for TV & Music, 'T'=TV, 'M'=Music, 'V'=Video, 'D'=DVD, 'P'=Pictures, 'B'=BluRay)
        Returns:
        an array of Persons which represent all of the people in the database that matched the search that also have content that matches the MediaMask
        Since:
        5.1
      • SearchForTitles

        public java.lang.String[] SearchForTitles​(java.lang.String SearchString)
        Returns a list of all of the titles in the database that include the search string in them. This search is case insensitive.
        Parameters:
        SearchString - the string to search on
        Returns:
        an array of Strings which represent all of the titles in the database that matched the search
      • SearchForTitles

        public java.lang.String[] SearchForTitles​(java.lang.String SearchString,
                                                  java.lang.String MediaMask)
        Returns a list of all of the titles in the database that include the search string in them. This search is case insensitive. The content it references must also match one of the media types specified in the MediaMask.
        Parameters:
        SearchString - the string to search on
        MediaMask - string specifying what content types to search (i.e. "TM" for TV & Music, 'T'=TV, 'M'=Music, 'V'=Video, 'D'=DVD, 'P'=Pictures, 'B'=BluRay)
        Returns:
        an array of Strings which represent all of the titles in the database that matched the search that also have content that matches the MediaMask
        Since:
        5.1
      • SearchForPeopleRegex

        public sage.Person[] SearchForPeopleRegex​(java.util.regex.Pattern RegexPattern)
        Returns a list of all of the people in the database that match the passed in regular expression.
        Parameters:
        RegexPattern - The compiled regular expression used for matching (if it's not compiled, then it will be converted to a compiled regular expression)
        Returns:
        an array of Persons which represent all of the people in the database that matched the search
        Since:
        5.1
      • SearchForPeopleRegex

        public sage.Person[] SearchForPeopleRegex​(java.util.regex.Pattern RegexPattern,
                                                  java.lang.String MediaMask)
        Returns a list of all of the people in the database that match the passed in regular expression. The content it references must also match one of the media types specified in the MediaMask.
        Parameters:
        RegexPattern - The compiled regular expression used for matching (if it's not compiled, then it will be converted to a compiled regular expression)
        MediaMask - string specifying what content types to search (i.e. "TM" for TV & Music, 'T'=TV, 'M'=Music, 'V'=Video, 'D'=DVD, 'P'=Pictures, 'B'=BluRay)
        Returns:
        an array of Persons which represent all of the people in the database that matched the search that also have content that matches the MediaMask
        Since:
        5.1
      • SearchForPeopleNTE

        public sage.Person[] SearchForPeopleNTE​(java.lang.String NTEString)
        Returns a list of all of the people in the database that match the passed in text, where the Unicode characters u2460-u2468 and u24EA (Unicode Circled Digits) in the text represent the numeric Text Keys 1-9 and 0. This is similar to the predictive text entry input of mobile phones.
        The characters represented by the keys are defined by the client properties "ui/numeric_text_input_<ui/translation_language_code>_<key>_lower
        Parameters:
        NTEString - A string containing a mix of normal and NumericTextKey characters (u2460-2468, u24ae)
        Returns:
        an array of Persons which represent all of the people in the database that matched the search
        Since:
        8.0
      • SearchForPeopleNTE

        public sage.Person[] SearchForPeopleNTE​(java.lang.String NTEString,
                                                java.lang.String MediaMask)
        Returns a list of all of the people in the database that match the passed in text, where the Unicode characters u2460-u2468 and u24EA (Unicode Circled Digits) in the text represent the numeric Text Keys 1-9 and 0. This is similar to the predictive text entry input of mobile phones.
        The characters represented by the keys are defined by the client properties "ui/numeric_text_input_<ui/translation_language_code>_<key>_lower The content it references must also match one of the media types specified in the MediaMask.
        Parameters:
        NTEString - A string containing a mix of normal and NumericTextKey characters (u2460-2468, u24ae)
        MediaMask - string specifying what content types to search (i.e. "TM" for TV & Music, 'T'=TV, 'M'=Music, 'V'=Video, 'D'=DVD, 'P'=Pictures, 'B'=BluRay)
        Returns:
        an array of Persons which represent all of the people in the database that matched the search that also have content that matches the MediaMask
        Since:
        8.0
      • SearchForTitlesRegex

        public java.lang.String[] SearchForTitlesRegex​(java.util.regex.Pattern RegexPattern)
        Returns a list of all of the titles in the database that match the passed in regular expression.
        Parameters:
        RegexPattern - The compiled regular expression used for matching (if it's not compiled, then it will be converted to a compiled regular expression)
        Returns:
        an array of Strings which represent all of the titles in the database that matched the search
        Since:
        5.1
      • SearchForTitlesRegex

        public java.lang.String[] SearchForTitlesRegex​(java.util.regex.Pattern RegexPattern,
                                                       java.lang.String MediaMask)
        Returns a list of all of the titles in the database that match the passed in regular expression. The content it references must also match one of the media types specified in the MediaMask.
        Parameters:
        RegexPattern - The compiled regular expression used for matching (if it's not compiled, then it will be converted to a compiled regular expression)
        MediaMask - string specifying what content types to search (i.e. "TM" for TV & Music, 'T'=TV, 'M'=Music, 'V'=Video, 'D'=DVD, 'P'=Pictures, 'B'=BluRay)
        Returns:
        an array of Strings which represent all of the titles in the database that matched the search that also have content that matches the MediaMask
        Since:
        5.1
      • SearchForTitlesNTE

        public java.lang.String[] SearchForTitlesNTE​(java.lang.String NTEString)
        Returns a list of all of the titles in the database that match the passed in text, where the Unicode characters u2460-u2468 and u24EA (Unicode Circled Digits) in the text represent the numeric Text Keys 1-9 and 0. This is similar to the predictive text entry input of mobile phones.
        The characters represented by the keys are defined by the client properties "ui/numeric_text_input_<ui/translation_language_code>_<key>_lower The content it references must also match one of the media types specified in the MediaMask.
        Parameters:
        NTEString - A string containing a mix of normal and NumericTextKey characters (u2460-2468, u24ae)
        Returns:
        an array of Strings which represent all of the titles in the database that matched the search
        Since:
        8.0
      • SearchForTitlesNTE

        public java.lang.String[] SearchForTitlesNTE​(java.lang.String NTEString,
                                                     java.lang.String MediaMask)
        Returns a list of all of the titles in the database that match the passed in text, where the Unicode characters u2460-u2468 and u24EA (Unicode Circled Digits) in the text represent the numeric Text Keys 1-9 and 0. This is similar to the predictive text entry input of mobile phones.
        The characters represented by the keys are defined by the client properties "ui/numeric_text_input_<ui/translation_language_code>_<key>_lower The content it references must also match one of the media types specified in the MediaMask.
        Parameters:
        NTEString - A string containing a mix of normal and NumericTextKey characters (u2460-2468, u24ae)
        MediaMask - string specifying what content types to search (i.e. "TM" for TV & Music, 'T'=TV, 'M'=Music, 'V'=Video, 'D'=DVD, 'P'=Pictures, 'B'=BluRay)
        Returns:
        an array of Strings which represent all of the titles in the database that matched the search that also have content that matches the MediaMask
        Since:
        8.0
      • DataUnion

        public java.util.Vector DataUnion​(java.lang.Object DataSet1,
                                          java.lang.Object DataSet2)
        Creates a Union of one or more sets of data. This method can have zero or more arguments. The ordering of the elements is stable. Any element that is in any data set that is passed in will be included in the returned set. Any duplicate items will be removed. If the arguments are a java.util.Collection, java.util.Map or an array then each element in them will be processed in the Union. If the argument is any other type then the argument itself will be processed in the Union.
        Parameters:
        DataSet1 - one of the data sets to include in the union
        DataSet2 - another one of the data sets to include in the union
        Returns:
        a java.util.Vector which is a union of all of the elements in the passed in arguments
      • DataIntersection

        public java.util.Vector DataIntersection​(java.lang.Object DataSet1,
                                                 java.lang.Object DataSet2)
        Creates an intersection of two sets of data. The ordering of the elements is stable. Any element that is in both of the data sets that are passed in will be included in the returned set. If the arguments are a java.util.Collection or an array then each element in them will be processed in the intersection. If the argument is any other type then the argument itself will be processed in the intersection.
        Parameters:
        DataSet1 - one of the data sets to include in the intersection
        DataSet2 - the other data set to include in the intersection
        Returns:
        a java.util.Vector which is an intersection of all of the elements in the passed in arguments
      • SearchSelectedFields

        public java.util.Vector SearchSelectedFields​(java.lang.String SearchString,
                                                     boolean CaseSensitive,
                                                     boolean Titles,
                                                     boolean Episode,
                                                     boolean Description,
                                                     boolean People,
                                                     boolean Category,
                                                     boolean Rated,
                                                     boolean ExtendedRatings,
                                                     boolean Year,
                                                     boolean Misc)
        Searches the specified fields of all the Airings in the database for the specified search string.
        Parameters:
        SearchString - the string to search with
        CaseSensitive - if true then the search is case senstive, if false then it's case insensitive
        Titles - if true then the title fields will be searched, if false then they will not be
        Episode - if true then the episode fields will be searched, if false then they will be not be
        Description - if true then the description fields will be searched, if false then they will not be
        People - if true then the people fields will be searched, if false then they will not be
        Category - if true then the category fields will be searched, if false then they will not be
        Rated - if true then the rated fields will be searched, if false then they will not be
        ExtendedRatings - if true then the extended ratings fields will be searched, if false then they will not be
        Year - if true then the year fields will be searched, if false then they will not be
        Misc - if true then the miscellaneous fields will be searched, if false then they will not be
        Returns:
        an array of Airings which matches the search criteria
      • SearchSelectedFields

        public java.util.Vector SearchSelectedFields​(java.lang.String SearchString,
                                                     boolean CaseSensitive,
                                                     boolean Titles,
                                                     boolean Episode,
                                                     boolean Description,
                                                     boolean People,
                                                     boolean Category,
                                                     boolean Rated,
                                                     boolean ExtendedRatings,
                                                     boolean Year,
                                                     boolean Misc,
                                                     java.lang.String MediaMask)
        Searches the specified fields of all the Airings in the database for the specified search string. The content it references must also match one of the media types specified in the MediaMask.
        Parameters:
        SearchString - the string to search with
        CaseSensitive - if true then the search is case senstive, if false then it's case insensitive
        Titles - if true then the title fields will be searched, if false then they will not be
        Episode - if true then the episode fields will be searched, if false then they will be not be
        Description - if true then the description fields will be searched, if false then they will not be
        People - if true then the people fields will be searched, if false then they will not be
        Category - if true then the category fields will be searched, if false then they will not be
        Rated - if true then the rated fields will be searched, if false then they will not be
        ExtendedRatings - if true then the extended ratings fields will be searched, if false then they will not be
        Year - if true then the year fields will be searched, if false then they will not be
        Misc - if true then the miscellaneous fields will be searched, if false then they will not be
        MediaMask - string specifying what content types to search (i.e. "TM" for TV & Music, 'T'=TV, 'M'=Music, 'V'=Video, 'D'=DVD, 'P'=Pictures, 'B'=BluRay)
        Returns:
        an array of Airings which matches the search criteria
        Since:
        5.1
      • SearchSelectedExactFields

        public java.util.Vector SearchSelectedExactFields​(java.lang.String SearchString,
                                                          boolean CaseSensitive,
                                                          boolean Titles,
                                                          boolean Episode,
                                                          boolean Description,
                                                          boolean People,
                                                          boolean Category,
                                                          boolean Rated,
                                                          boolean ExtendedRatings,
                                                          boolean Year,
                                                          boolean Misc)
        Searches the specified fields of all the Airings in the database for the specified search string. This requires that the SearchString matches the specified field's value exactly. Unlike SearchSelectedFields which only requires that the SearchString exist within the field's value somewhere (i.e. a substring)
        Parameters:
        SearchString - the string to search with
        CaseSensitive - if true then the search is case senstive, if false then it's case insensitive
        Titles - if true then the title fields will be searched, if false then they will not be
        Episode - if true then the episode fields will be searched, if false then they will be not be
        Description - if true then the description fields will be searched, if false then they will not be
        People - if true then the people fields will be searched, if false then they will not be
        Category - if true then the category fields will be searched, if false then they will not be
        Rated - if true then the rated fields will be searched, if false then they will not be
        ExtendedRatings - if true then the extended ratings fields will be searched, if false then they will not be
        Year - if true then the year fields will be searched, if false then they will not be
        Misc - if true then the miscellaneous fields will be searched, if false then they will not be
        Returns:
        an array of Airings which matches the search criteria
        Since:
        4.1
      • SearchSelectedExactFields

        public java.util.Vector SearchSelectedExactFields​(java.lang.String SearchString,
                                                          boolean CaseSensitive,
                                                          boolean Titles,
                                                          boolean Episode,
                                                          boolean Description,
                                                          boolean People,
                                                          boolean Category,
                                                          boolean Rated,
                                                          boolean ExtendedRatings,
                                                          boolean Year,
                                                          boolean Misc,
                                                          java.lang.String MediaMask)
        Searches the specified fields of all the Airings in the database for the specified search string. This requires that the SearchString matches the specified field's value exactly. Unlike SearchSelectedFields which only requires that the SearchString exist within the field's value somewhere (i.e. a substring) The content it references must also match one of the media types specified in the MediaMask.
        Parameters:
        SearchString - the string to search with
        CaseSensitive - if true then the search is case senstive, if false then it's case insensitive
        Titles - if true then the title fields will be searched, if false then they will not be
        Episode - if true then the episode fields will be searched, if false then they will be not be
        Description - if true then the description fields will be searched, if false then they will not be
        People - if true then the people fields will be searched, if false then they will not be
        Category - if true then the category fields will be searched, if false then they will not be
        Rated - if true then the rated fields will be searched, if false then they will not be
        ExtendedRatings - if true then the extended ratings fields will be searched, if false then they will not be
        Year - if true then the year fields will be searched, if false then they will not be
        Misc - if true then the miscellaneous fields will be searched, if false then they will not be
        MediaMask - string specifying what content types to search (i.e. "TM" for TV & Music, 'T'=TV, 'M'=Music, 'V'=Video, 'D'=DVD, 'P'=Pictures, 'B'=BluRay)
        Returns:
        an array of Airings which matches the search criteria
        Since:
        5.1
      • SearchSelectedFieldsRegex

        public java.util.Vector SearchSelectedFieldsRegex​(java.util.regex.Pattern RegexPattern,
                                                          boolean Titles,
                                                          boolean Episode,
                                                          boolean Description,
                                                          boolean People,
                                                          boolean Category,
                                                          boolean Rated,
                                                          boolean ExtendedRatings,
                                                          boolean Year,
                                                          boolean Misc)
        Searches the specified fields of all the Airings in the database and tries to match them against the passed in regular expression.
        Parameters:
        RegexPattern - The compiled regular expression used for matching (if it's not compiled, then it will be converted to a compiled regular expression)
        Titles - if true then the title fields will be searched, if false then they will not be
        Episode - if true then the episode fields will be searched, if false then they will be not be
        Description - if true then the description fields will be searched, if false then they will not be
        People - if true then the people fields will be searched, if false then they will not be
        Category - if true then the category fields will be searched, if false then they will not be
        Rated - if true then the rated fields will be searched, if false then they will not be
        ExtendedRatings - if true then the extended ratings fields will be searched, if false then they will not be
        Year - if true then the year fields will be searched, if false then they will not be
        Misc - if true then the miscellaneous fields will be searched, if false then they will not be
        Returns:
        an array of Airings which matches the search criteria
        Since:
        5.1
      • SearchSelectedFieldsRegex

        public java.util.Vector SearchSelectedFieldsRegex​(java.util.regex.Pattern RegexPattern,
                                                          boolean Titles,
                                                          boolean Episode,
                                                          boolean Description,
                                                          boolean People,
                                                          boolean Category,
                                                          boolean Rated,
                                                          boolean ExtendedRatings,
                                                          boolean Year,
                                                          boolean Misc,
                                                          java.lang.String MediaMask)
        Searches the specified fields of all the Airings in the database and tries to match them against the passed in regular expression. The content it references must also match one of the media types specified in the MediaMask.
        Parameters:
        RegexPattern - The compiled regular expression used for matching (if it's not compiled, then it will be converted to a compiled regular expression)
        Titles - if true then the title fields will be searched, if false then they will not be
        Episode - if true then the episode fields will be searched, if false then they will be not be
        Description - if true then the description fields will be searched, if false then they will not be
        People - if true then the people fields will be searched, if false then they will not be
        Category - if true then the category fields will be searched, if false then they will not be
        Rated - if true then the rated fields will be searched, if false then they will not be
        ExtendedRatings - if true then the extended ratings fields will be searched, if false then they will not be
        Year - if true then the year fields will be searched, if false then they will not be
        Misc - if true then the miscellaneous fields will be searched, if false then they will not be
        MediaMask - string specifying what content types to search (i.e. "TM" for TV & Music, 'T'=TV, 'M'=Music, 'V'=Video, 'D'=DVD, 'P'=Pictures, 'B'=BluRay)
        Returns:
        an array of Airings which matches the search criteria
        Since:
        5.1
      • SearchSelectedFieldsNTE

        public java.util.Vector SearchSelectedFieldsNTE​(java.lang.String NTEString,
                                                        boolean Titles,
                                                        boolean Episode,
                                                        boolean Description,
                                                        boolean People,
                                                        boolean Category,
                                                        boolean Rated,
                                                        boolean ExtendedRatings,
                                                        boolean Year,
                                                        boolean Misc)
        Searches the specified fields of all the Airings in the database and tries to match them against the passed in text, where the Unicode characters u2460-u2468 and u24EA (Unicode Circled Digits) in the text represent the numeric Text Keys 1-9 and 0. This is similar to the predictive text entry input of mobile phones.
        The characters represented by the keys are defined by the client properties "ui/numeric_text_input_<ui/translation_language_code>_<key>_lower.
        Parameters:
        NTEString - A string containing a mix of normal and NumericTextKey characters (u2460-2468, u24ae)
        Titles - if true then the title fields will be searched, if false then they will not be
        Episode - if true then the episode fields will be searched, if false then they will be not be
        Description - if true then the description fields will be searched, if false then they will not be
        People - if true then the people fields will be searched, if false then they will not be
        Category - if true then the category fields will be searched, if false then they will not be
        Rated - if true then the rated fields will be searched, if false then they will not be
        ExtendedRatings - if true then the extended ratings fields will be searched, if false then they will not be
        Year - if true then the year fields will be searched, if false then they will not be
        Misc - if true then the miscellaneous fields will be searched, if false then they will not be
        Returns:
        an array of Airings which matches the search criteria
        Since:
        8.0
      • SearchSelectedFieldsNTE

        public java.util.Vector SearchSelectedFieldsNTE​(java.lang.String NTEString,
                                                        boolean Titles,
                                                        boolean Episode,
                                                        boolean Description,
                                                        boolean People,
                                                        boolean Category,
                                                        boolean Rated,
                                                        boolean ExtendedRatings,
                                                        boolean Year,
                                                        boolean Misc,
                                                        java.lang.String MediaMask)
        Searches the specified fields of all the Airings in the database and tries to match them against the passed in text where the Unicode characters u2460-u2468 and u24EA (Unicode Circled Digits) in the text represent the numeric Text Keys 1-9 and 0. This is similar to the predictive text entry input of mobile phones.
        The characters represented by the keys are defined by the client properties "ui/numeric_text_input_<ui/translation_language_code>_<key>_lower. The content it references must also match one of the media types specified in the MediaMask.
        Parameters:
        NTEString - A string containing a mix of normal and NumericTextKey characters (u2460-2468, u24ae)
        Titles - if true then the title fields will be searched, if false then they will not be
        Episode - if true then the episode fields will be searched, if false then they will be not be
        Description - if true then the description fields will be searched, if false then they will not be
        People - if true then the people fields will be searched, if false then they will not be
        Category - if true then the category fields will be searched, if false then they will not be
        Rated - if true then the rated fields will be searched, if false then they will not be
        ExtendedRatings - if true then the extended ratings fields will be searched, if false then they will not be
        Year - if true then the year fields will be searched, if false then they will not be
        Misc - if true then the miscellaneous fields will be searched, if false then they will not be
        MediaMask - string specifying what content types to search (i.e. "TM" for TV & Music, 'T'=TV, 'M'=Music, 'V'=Video, 'D'=DVD, 'P'=Pictures, 'B'=BluRay)
        Returns:
        an array of Airings which matches the search criteria
        Since:
        8.0
      • GetChannelsOnLineup

        public sage.Channel[] GetChannelsOnLineup​(java.lang.String Lineup)
        Returns all of the Channel objects in the database that are on the specified Lineup.
        Parameters:
        Lineup - the name of the EPG lineup to get the channels for
        Returns:
        an array of Channel objects that are on the specified Lineup
      • GetAllTitles

        public java.lang.String[] GetAllTitles()
        Gets all of the titles that are in the database.
        Returns:
        a list of all of the titles that are in the database
      • GetAllTitles

        public java.lang.String[] GetAllTitles​(java.lang.String MediaMask)
        Gets all of the titles that are in the database. The content it references must also match one of the media types specified in the MediaMask.
        Parameters:
        MediaMask - string specifying what content types to search (i.e. "TM" for TV & Music, 'T'=TV, 'M'=Music, 'V'=Video, 'D'=DVD, 'P'=Pictures, 'B'=BluRay)
        Returns:
        a list of all of the titles that are in the database that also have content that matches the MediaMask
        Since:
        5.1
      • GetAllPeople

        public java.lang.String[] GetAllPeople()
        Gets all of the people that are in the database.
        Returns:
        a list of all of the names of people in the database
      • GetAllPeople

        public java.lang.String[] GetAllPeople​(java.lang.String MediaMask)
        Gets all of the people that are in the database. The content it references must also match one of the media types specified in the MediaMask.
        Parameters:
        MediaMask - string specifying what content types to search (i.e. "TM" for TV & Music, 'T'=TV, 'M'=Music, 'V'=Video, 'D'=DVD, 'P'=Pictures, 'B'=BluRay)
        Returns:
        a list of all of the names of people in the database that also have content that matches the MediaMask
        Since:
        5.1
      • GetAllCategories

        public java.lang.String[] GetAllCategories()
        Gets all of the categories that are in the database.
        Returns:
        all of the names of categories that are in the database
      • GetAllCategories

        public java.lang.String[] GetAllCategories​(java.lang.String MediaMask)
        Gets all of the categories that are in the database. The content it references must also match one of the media types specified in the MediaMask.
        Parameters:
        MediaMask - string specifying what content types to search (i.e. "TM" for TV & Music, 'T'=TV, 'M'=Music, 'V'=Video, 'D'=DVD, 'P'=Pictures, 'B'=BluRay)
        Returns:
        all of the names of categories that are in the database that also have content that matches the MediaMask
        Since:
        5.1
      • GetAllGroupingCategories

        public java.lang.String[] GetAllGroupingCategories()
        Gets all of the categories that are in the database. This is different than GetAllCategories because this one will break apart any comma or semicolon delimited category lists into multiple different categories. i.e. if you have "Comedy; Horror" as a category this API call will break it up into Comedy and Horror as two separate categories. This call will also coalesce any case-sensitive differences in category names.
        Returns:
        all of the names of categories that are in the database with multi-categories broken apart
        Since:
        7.0
      • GetAllGroupingCategories

        public java.lang.String[] GetAllGroupingCategories​(java.lang.String MediaMask)
        Gets all of the categories that are in the database. The content it references must also match one of the media types specified in the MediaMask. This is different than GetAllCategories because this one will break apart any comma or semicolon delimited category lists into multiple different categories. i.e. if you have "Comedy; Horror" as a category this API call will break it up into Comedy and Horror as two separate categories. This call will also coalesce any case-sensitive differences in category names.
        Parameters:
        MediaMask - string specifying what content types to search (i.e. "TM" for TV & Music, 'T'=TV, 'M'=Music, 'V'=Video, 'D'=DVD, 'P'=Pictures, 'B'=BluRay)
        Returns:
        all of the names of categories that are in the database that also have content that matches the MediaMask with multi-categories broken apart
        Since:
        7.0
      • GetDatabaseLastModifiedTime

        public long GetDatabaseLastModifiedTime​(java.lang.String MediaMask)
        Returns the last modification time for objects that match anything in the specified MediaMask. This is useful for knowing when to clear caches that are used to optimize UI rendering.
        Parameters:
        MediaMask - string specifying what content types (i.e. "TM" for TV & Music, 'T'=TV, 'M'=Music, 'V'=Video, 'D'=DVD, 'P'=Pictures, 'B'=BluRay)
        Returns:
        the last modification time of anything in the DB that matches anything in the specified MediaMask
        Since:
        5.1
      • GetFilesWithImportPrefix

        public java.lang.Object GetFilesWithImportPrefix​(java.lang.Object MediaData,
                                                         java.lang.String ImportPrefix,
                                                         boolean IncludeFiles,
                                                         boolean IncludeFolders,
                                                         boolean GroupFolders)
        Returns a list of java.io.File objects w/ the specified MediaMask whos import prefix matches that of the argument
        Parameters:
        MediaData - can either by a MediaMask string specifying what content types ('M'=Music, 'V'=Video, 'D'=DVD, 'P'=Pictures, 'B'=BluRay) or it can be an array/collection of the specific MediaFile objects to analyze
        ImportPrefix - a string specifying a subpath that must match the start of the import files path relative to its import root
        IncludeFiles - if true, then MediaFile objects with a complete prefix match will be returned
        IncludeFolders - if true, then MediaFile objects with a partial prefix match will be returned
        GroupFolders - if true, then MediaFile objects with partial prefixes that match will be grouped by their next path section; extract the 'null' keyed value to get the list of the files
        Returns:
        a Vector or Map of java.io.File objects w/ the specified MediaMask whos import prefix matches that of the argument; a Map will be returned if GroupFolders is set to true
        Since:
        6.4
      • GetMediaFilesWithImportPrefix

        public java.lang.Object GetMediaFilesWithImportPrefix​(java.lang.Object MediaData,
                                                              java.lang.String ImportPrefix,
                                                              boolean IncludeFiles,
                                                              boolean IncludeFolders,
                                                              boolean GroupFolders)
        Returns a list or map of MediaFile objects w/ the specified MediaMask whos import prefix matches that of the argument
        Parameters:
        MediaData - can either by a MediaMask string specifying what content types ('M'=Music, 'V'=Video, 'D'=DVD, 'P'=Pictures, 'B'=BluRay) or it can be an array/collection of the specific MediaFile objects to analyze
        ImportPrefix - a string specifying a subpath that must match the start of the import files path relative to its import root
        IncludeFiles - if true, then MediaFile objects with a complete prefix match will be returned
        IncludeFolders - if true, then MediaFile objects with a partial prefix match will be returned
        GroupFolders - if true, then MediaFile objects with partial prefixes that match will be grouped by their next path section; extract the 'null' keyed value to get the list of the files
        Returns:
        a Vector or Map of MediaFile objects w/ the specified MediaMask whos import prefix matches that of the argument; a Map will be returned if GroupFolders is set to true
        Since:
        6.4
      • IsDatabaseMemoryMaxed

        public boolean IsDatabaseMemoryMaxed()
        Returns true if the database has maxed out its memory usage and cannot add more content
        Returns:
        true if the database has maxed out its memory usage and cannot add more content
        Since:
        6.5
      • StripLeadingArticles

        public java.lang.String StripLeadingArticles​(java.lang.String Text)
        Strips any leading 'a, an or the' prefixes from the passed in string and returns the resulting string. If the property "ui/ignore_the_when_sorting" is set to false, this method will do nothing. The articles stripped by this method can be defined with the property "ui/prefixes_to_ignore_on_sort".
        Parameters:
        Text - the string to strip the leading articles from
        Returns:
        the String after the leading articles have been stripped from the past in string
        Since:
        7.0
      • GetMediaMask

        public java.lang.String GetMediaMask​(sage.DBObject DBObject)
        Returns a string which represents the different media categories the specified DBObject belongs to. This may contain any of the following characters respectively: T = TV, D = DVD, V = Video, M = Music, P = Photos, B = BluRay, O = VOD, N = Netflix, U = VUDU.
        Parameters:
        DBObject - the database object to get the media mask of; should be an Airing, Show or MediaFile
        Returns:
        the media mask string for the passed in DBObject
        Since:
        8.0
      • HasMediaMask

        public boolean HasMediaMask​(sage.DBObject DBObject,
                                    java.lang.String MediaMask)
        Tests whether the passed in DBObject matches any of the categories specified in the passed in MediaMask. This may contain any of the following characters respectively: T = TV, D = DVD, V = Video, M = Music, P = Photos, B = BluRay, O = VOD, N = Netflix, U = VUDU.
        Parameters:
        DBObject - the database object to get the media mask of; should be an Airing, Show or MediaFile
        MediaMask - this may contain any of the following characters respectively: T = TV, D = DVD, V = Video, M = Music, P = Photos, B = BluRay, O = VOD, N = Netflix, U = VUDU
        Returns:
        true if the passed in object has any of the media masks from the passed in mask string, false otherwise
        Since:
        8.0
      • SearchForChannel

        public sage.Channel[] SearchForChannel​(java.lang.String SearchString)
        Returns all Channels in the database (disabled or not) that match the SearchString in their channel number, name, callsign or network. Results will be returned in StationID order
        Parameters:
        SearchString - the text to search for
        Returns:
        an array of Channel objects that includes the SearchString
        Since:
        8.1
      • SearchForChannel

        public sage.Channel[] SearchForChannel​(java.lang.String SearchString,
                                               java.lang.Boolean IncludeNonViewable)
        Returns all Channels in the database that match the SearchString in their channel number, name, callsign or network. Results will be returned in StationID order
        Parameters:
        SearchString - the text to search for
        IncludeNonViewable - whether to include Non-Viewable (disabled) channels in the results
        Returns:
        an array of Channel objects that includes the SearchString
        Since:
        8.1