Package sage.api

Class AlbumAPI


  • public class AlbumAPI
    extends java.lang.Object
    Represents an Album of music.
    • Constructor Summary

      Constructors 
      Constructor Description
      AlbumAPI()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      sage.MetaImage GetAlbumArt​(sage.Album Album)
      Returns the album art for this Album.
      java.lang.String GetAlbumArtist​(sage.Album Album)
      Returns the artist for this Album.
      java.lang.String GetAlbumGenre​(sage.Album Album)
      Returns the genre for this Album
      java.lang.String GetAlbumName​(sage.Album Album)
      Returns the name/title for this Album
      sage.Album[] GetAlbums()
      Returns all of the Album objects in the library.
      sage.Airing[] GetAlbumTracks​(sage.Album Album)
      Gets all of the Airings (a 'meta' object referring to the music file in this case) that are on this Album in the library.
      java.lang.String GetAlbumYear​(sage.Album Album)
      Returns the year this Album was recorded in
      java.lang.String[] GetAllMusicArtists()
      Returns all of the artists for the music files in the library
      sage.Airing[] GetAllMusicForArtist​(java.lang.String Artist)
      Gets all of the Airings (a 'meta' object referring to the music file in this case) that have an artist that matches the passed in artist
      sage.Airing[] GetAllMusicForGenre​(java.lang.String Genre)
      Gets all of the Airings (a 'meta' object referring to the music file in this case) that have a genre that matches the passed in genre
      java.lang.String[] GetAllMusicGenres()
      Returns all of the genres for the music files in the library
      int GetNumberOfTracks​(sage.Album Album)
      Returns the number of tracks that are on this Album
      boolean HasAlbumArt​(sage.Album Album)
      Returns true if there is album art for this Album
      boolean IsAlbumObject​(java.lang.Object Album)
      Returns true if the argument is an Album object
      • Methods inherited from class java.lang.Object

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

      • AlbumAPI

        public AlbumAPI()
    • Method Detail

      • GetAllMusicArtists

        public java.lang.String[] GetAllMusicArtists()
        Returns all of the artists for the music files in the library
        Returns:
        an array of the artists for the music files in the library
      • GetAllMusicGenres

        public java.lang.String[] GetAllMusicGenres()
        Returns all of the genres for the music files in the library
        Returns:
        an array of the genres for the music files in the library
      • GetAlbums

        public sage.Album[] GetAlbums()
        Returns all of the Album objects in the library. This list is derived from the music files in the library.
        Returns:
        an array of all of the Album objects in the library
      • GetAllMusicForArtist

        public sage.Airing[] GetAllMusicForArtist​(java.lang.String Artist)
        Gets all of the Airings (a 'meta' object referring to the music file in this case) that have an artist that matches the passed in artist
        Parameters:
        Artist - the name of the artist
        Returns:
        an array of the Airings that correspond to music files by the specified artist
      • GetAllMusicForGenre

        public sage.Airing[] GetAllMusicForGenre​(java.lang.String Genre)
        Gets all of the Airings (a 'meta' object referring to the music file in this case) that have a genre that matches the passed in genre
        Parameters:
        Genre - the name of the genre
        Returns:
        an array of the Airings that correspond to music files by the specified genre
      • GetAlbumTracks

        public sage.Airing[] GetAlbumTracks​(sage.Album Album)
        Gets all of the Airings (a 'meta' object referring to the music file in this case) that are on this Album in the library. The returned list is sorted by the track number of each song.
        Parameters:
        Album - the Album object to get the tracks for
        Returns:
        an array of Airings which are the tracks on this Album
      • GetNumberOfTracks

        public int GetNumberOfTracks​(sage.Album Album)
        Returns the number of tracks that are on this Album
        Parameters:
        Album - the Album object
        Returns:
        the number of tracks that are on the specified Album
      • GetAlbumArtist

        public java.lang.String GetAlbumArtist​(sage.Album Album)
        Returns the artist for this Album. If there's more than one artist it will return the localized string for the resource "Various_Artists". This defaults to "Various".
        Parameters:
        Album - the Album object
        Returns:
        the artist for the specified Album
      • GetAlbumArt

        public sage.MetaImage GetAlbumArt​(sage.Album Album)
        Returns the album art for this Album.
        Parameters:
        Album - the Album object
        Returns:
        the album art for the specified Album, this can be fed into an Image Widget to display it
      • GetAlbumName

        public java.lang.String GetAlbumName​(sage.Album Album)
        Returns the name/title for this Album
        Parameters:
        Album - the Album object
        Returns:
        the name/title of the specified Album
      • HasAlbumArt

        public boolean HasAlbumArt​(sage.Album Album)
        Returns true if there is album art for this Album
        Parameters:
        Album - the Album object
        Returns:
        true if there is album art for this Album, false otherwise
      • IsAlbumObject

        public boolean IsAlbumObject​(java.lang.Object Album)
        Returns true if the argument is an Album object
        Parameters:
        Album - the Object to test
        Returns:
        true if the passed in object is an Album object, false otherwise
      • GetAlbumGenre

        public java.lang.String GetAlbumGenre​(sage.Album Album)
        Returns the genre for this Album
        Parameters:
        Album - the Album object
        Returns:
        the genre for the specified Album
      • GetAlbumYear

        public java.lang.String GetAlbumYear​(sage.Album Album)
        Returns the year this Album was recorded in
        Parameters:
        Album - the Album object
        Returns:
        the year the specified album was recorded in