Examples of MusicLibraryDTO


Examples of it.unipd.netmus.shared.MusicLibraryDTO

     * Comunica alla view, tramite il metodo della view setStats, i dati
     * rigurdanti la pagina delle statistiche.
     */
    @Override
    public void setStats() {
        MusicLibraryDTO library = current_user.getMusicLibrary();

        // numero di canzoni del catalogo
        String num_songs = String.valueOf(library.getSongs().size());

        // artista preferito
        String preferred_artist = library.getPreferred_artist();

        // canzone più votata dall'utente
        String most_popular_song_for_this_user = "";
        SongSummaryDTO song = library.getSongs().get(
                library.getMostPopularSongForThisUser());
        if (song != null) {
            most_popular_song_for_this_user = song.getTitle() + " ("
                    + song.getArtist() + ")";
        } else {
            most_popular_song_for_this_user = my_constants
                    .noVoteForThisUserError();
        }

        // canzone più votata del catalogo
        String most_popular_song = "";
        song = library.getSongs().get(library.getMostPopularSong());
        if (song != null) {
            most_popular_song = song.getTitle() + " (" + song.getArtist() + ")";
        } else {
            most_popular_song = my_constants.noVoteError();
        }
View Full Code Here

Examples of it.unipd.netmus.shared.MusicLibraryDTO

        for (String tmp : this.playlists) {
            Playlist p = getPlaylistFromId(tmp);
            playlists.add(new PlaylistDTO(p.getName(), p.getSongs()));
        }

        MusicLibraryDTO library = new MusicLibraryDTO(map, playlists);

        library.setPreferred_artist(getPreferredArtist());
        library.setMostPopularSong(this.most_popular_song);
        library.setMostPopularSongForThisUser(this.most_popular_song_for_this_user);

        return library;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.