Examples of Song


Examples of it.unipd.netmus.server.persistent.Song

     * faccio una ricerca su youtube (per Copyright legati al Country)
     */
    @Override
    public synchronized SongDTO getSongDTO(SongSummaryDTO song_summary_dto) {

        Song song = Song.loadFromDTO(song_summary_dto);

        SongDTO song_dto = null;
        if (song != null) {
            song_dto = song.toSongDTO();
        } else {
            return new SongDTO();
        }

        String ip = getThreadLocalRequest().getRemoteAddr();
        if (ip.equals("127.0.0.1"))
            ip = "";

        song_dto.setAlbumCover(Album.getAlbumCoverLastFm(song_dto.getAlbum(),
                song_dto.getArtist()));
        song_dto.setYoutubeCode(Utils.getYouTubeCode(song.getTitle() + " "
                + song.getArtist(), ip));

        return song_dto;
    }
View Full Code Here

Examples of mjg.Song

  }
 
  @Test
  public void testGetSongById() {
    client.addSong("1", "Feeling Groovy", "Simon and Garfunkel", "1966");
    Song s = client.getSongById("1");
    assertEquals("1",s.getId());
    assertEquals("Feeling Groovy",s.getTitle());
    assertEquals("Simon and Garfunkel",s.getArtist());
    assertEquals("1966",s.getYear());
  }
View Full Code Here

Examples of mjg.Song

  @Test
  public void testAddSong() {
    client.addSong("1", "Feeling Groovy", "Simon and Garfunkel", "1966");
    List<Song> songs = client.getSongs();
    assertEquals(1,songs.size());
    Song s = songs.get(0);
    assertEquals("Feeling Groovy",s.getTitle());
    assertEquals("Simon and Garfunkel",s.getArtist());
    assertEquals("1966",s.getYear());
    assertEquals("1", s.getId());
  }
View Full Code Here

Examples of mjg.Song

  }

  public void addSong(String id, String title, String artist,  String year) {
    String url =
      "http://localhost:8163/SongService/SongService.groovy";
    Song s = new Song();
    s.setId(id);
    s.setArtist(artist);
    s.setTitle(title);
    s.setYear(year);
    Song2XML converter = new Song2XML();
    URI uri = template.postForLocation(url, converter.song2xml(s));
    if (uri != null) {
      log.info("Location: " + uri.toString());
    } else {
View Full Code Here

Examples of org.adoptopenjdk.lambda.tutorial.exercise5.musicplayer.Song

     *
     */
    @Test
    public void useDefaultMethodToReturnPlaylistOrderedByArtist() {
        MusicLibrary library = new LocalFilesystemMusicLibrary(
            new Song("A Change Is Gonna Come", "Sam Cooke"),
            new Song("Bad Moon Rising", "Creedence Clearwater Revival"),
            new Song("Candy", "Paulo Nutini"),
            new Song("Desolation Row", "Bob Dylan"),
            new Song("Eleanor Rigby", "The Beatles")
        );

//        UNCOMMENT THE LINES BELOW
//        Until the sortedByArtist method is added to MusicLibrary, there will be a compiler error.
//        assertThat(library.sortedByArtist(), containsSongsBy("Bob Dylan", "Creedence Clearwater Revival",
View Full Code Here

Examples of org.hibernate.ogm.backendtck.id.Song

  @Before
  public void prepareDb() throws Exception {
    getTransactionManager().begin();
    final EntityManager em = getFactory().createEntityManager();
    song = new Song();
    song.setSinger( "Jon Bovi" );
    song.setTitle( "Keep the pace" );
    em.persist( song );
    commitOrRollback( true );
    em.close();
View Full Code Here

Examples of org.jrest4guice.search.hs.entity.Song

    testCreate(10000, 20000);
  }

  private static void testCreate(final int start, final int times) {
    for (int i = start; i < times; i++) {
      Song song = new Song();
      song.setArtist("群星_" + i);
      song.setName("北京欢迎你");
      song.setLyric("北京欢迎你,welcome to beijing,第29届奥林匹克运动会");
      song.setTime(new Date());
      song.setArtistCityId(i % 8);
      service.addSong(song);
      System.out.println(song.getId()+"      "+i);
    }
  }
View Full Code Here

Examples of org.jrest4guice.search.hs.entity.Song

    testCreate(0, 10000);
  }

  private static void testCreate(final int start, final int times) {
    for (int i = start; i < times; i++) {
      Song song = new Song();
      song.setArtist("群星_" + i);
      song.setName("北京欢迎你");
      song.setLyric("北京欢迎你,welcome to beijing,第29届奥林匹克运动会");
      song.setTime(new Date());
      song.setArtistCityId(i % 8);
      service.addSong(song);
      System.out.println(song.getId()+"      "+i);
    }
  }
View Full Code Here

Examples of org.jrest4guice.search.hs.entity.Song

  @Inject
  private FullTextSession fullTextSession;

  public void init() {
    for (int i = 3; i < 7; i++) {
      Song song = new Song();
      song.setArtist("群星");
      song.setName("北京欢迎你");
      song.setLyric("北京欢迎你,welcome to beijing,第29届奥林匹克运动会");
      song.setTime(new Date());
      song.setArtistCityId(i % 8);
      this.entityManager.create(song);
    }
  }
View Full Code Here

Examples of org.mapstruct.ap.test.nestedsourceproperties.source.Song

        Artist artist = new Artist();
        artist.setName( "The Beatles" );
        artist.setLabel( label );

        Song song = new Song();
        song.setArtist( artist );
        song.setTitle( "A Hard Day's Night" );

        ChartEntry chartEntry = ArtistToChartEntry.MAPPER.map( song );

        assertThat( chartEntry ).isNotNull();
        assertThat( chartEntry.getArtistName() ).isEqualTo( "The Beatles" );
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.