Examples of Artist


Examples of com.github.hakko.musiccabinet.domain.model.music.Artist

    userTopArtistsService.setLastFmSettingsService(lastFmSettingsService);
    userTopArtistsService.setUserTopArtistsClient(userTopArtistsClient);
    userTopArtistsService.setUserTopArtistsDao(userTopArtistsDao);

    userTopArtistsDao.createUserTopArtists(asList(
        new UserTopArtists(user1, OVERALL, asList(new Artist("M83"))),
        new UserTopArtists(user2, SIX_MONTHS, asList(new Artist("Zola Jesus")))));
    assertEquals("M83", userTopArtistsService.getUserTopArtists(user1, OVERALL, 0, 10)
        .get(0).getArtistName());
    assertEquals("Zola Jesus", userTopArtistsService.getUserTopArtists(user2, SIX_MONTHS, 0, 10)
        .get(0).getArtistName());
View Full Code Here

Examples of com.github.hakko.musiccabinet.domain.model.music.Artist

    PostgreSQLUtil.loadFunction(albumDao, UPDATE_MB_ALBUM);

    additionDao.getJdbcTemplate().execute("truncate music.artist cascade");
    additionDao.getJdbcTemplate().execute("truncate library.file cascade");

    artist = new Artist(ARTIST);
    musicDao.setArtistId(artist);
   
    album1 = new MBRelease(MBID1, null, null, TITLE1, TYPE1, YEAR1, null);
    album2 = new MBRelease(MBID2, null, null, TITLE2, TYPE2, YEAR2, null);
    album1.setArtistId(artist.getId());
View Full Code Here

Examples of com.github.hakko.musiccabinet.domain.model.music.Artist

 
  @Test
  public void artistTopTracksUpdateUpdatesAllArtists() throws ApplicationException, IOException {
    clearLibraryAndAddCherTrack();

    WebserviceInvocation wi = new WebserviceInvocation(ARTIST_GET_TOP_TRACKS, new Artist(artistName));
    Assert.assertTrue(webserviceHistoryService.isWebserviceInvocationAllowed(wi));

    Set<String> artists = webserviceHistoryService.getArtistNamesScheduledForUpdate(ARTIST_GET_TOP_TRACKS);
    Assert.assertNotNull(artists);
    Assert.assertEquals(1, artists.size());
View Full Code Here

Examples of com.github.hakko.musiccabinet.domain.model.music.Artist

    lastFmDao.createOrUpdateLastFmUser(user1);

    user2 = new LastFmUser(userName2);
    lastFmDao.createOrUpdateLastFmUser(user2);

    artistInfoDao.createArtistInfo(asList(new ArtistInfo(new Artist(artistName1), "img")));
  }
View Full Code Here

Examples of com.github.hakko.musiccabinet.domain.model.music.Artist

    String indie = "indie", jazz = "jazz";
    submitFile(additionDao, UnittestLibraryUtil.getFile(artist, "Album", "Title"));
    submitFile(additionDao, UnittestLibraryUtil.getFile(indieArtist, "Album", "Title"));
    submitFile(additionDao, UnittestLibraryUtil.getFile(jazzArtist, "Album", "Title"));

    topTagsDao.createTopTags(new Artist(indieArtist),
        Arrays.asList(new Tag("indie", (short) 100)));
    topTagsDao.createTopTags(new Artist(jazzArtist),
        Arrays.asList(new Tag("jazz", (short) 60)));

    List<Artist> allArtists = browserDao.getArtists();
    Assert.assertEquals(3, allArtists.size());
View Full Code Here

Examples of com.github.hakko.musiccabinet.domain.model.music.Artist

    AlbumInfoParser parser = new AlbumInfoParserImpl(
        new ResourceUtil(ALBUM_INFO_FILE).getInputStream());
   
    AlbumInfo albumInfo = parser.getAlbumInfo();
   
    assertEquals(new Artist("Nirvana"), albumInfo.getAlbum().getArtist());
   
    assertEquals(SMALL_IMAGE_URL, albumInfo.getSmallImageUrl());
    assertEquals(MEDIUM_IMAGE_URL, albumInfo.getMediumImageUrl());
    assertEquals(LARGE_IMAGE_URL, albumInfo.getLargeImageUrl());
    assertEquals(EXTRA_LARGE_IMAGE_URL, albumInfo.getExtraLargeImageUrl());
View Full Code Here

Examples of com.github.hakko.musiccabinet.domain.model.music.Artist

    ArtistInfoParser parser = new ArtistInfoParserImpl(
        new ResourceUtil(ARTIST_INFO_FILE).getInputStream());
   
    ArtistInfo artistInfo = parser.getArtistInfo();
   
    assertEquals(new Artist("ABBA"), artistInfo.getArtist());
   
    assertEquals(SMALL_IMAGE_URL, artistInfo.getSmallImageUrl());
    assertEquals(MEDIUM_IMAGE_URL, artistInfo.getMediumImageUrl());
    assertEquals(LARGE_IMAGE_URL, artistInfo.getLargeImageUrl());
    assertEquals(EXTRA_LARGE_IMAGE_URL, artistInfo.getExtraLargeImageUrl());
View Full Code Here

Examples of com.github.hakko.musiccabinet.domain.model.music.Artist

  @Override
  public void startElement(String uri, String localName, String qName, Attributes attributes)
  throws SAXException {
    if (TAG_TOP_TRACKS.equals(qName)) {
      artistName = attributes.getValue(TAG_ARTIST);
      sourceArtist = new Artist(artistName);
    } else if (TAG_TRACK.equals(qName)) {
      scope = TRACK;
      currentTrack = new Track();
      currentTrack.setArtist(sourceArtist);
    } else if (TAG_ARTIST.equals(qName)) {
View Full Code Here

Examples of com.github.hakko.musiccabinet.domain.model.music.Artist

  @Override
  public void endElement(String uri, String localName, String qName)
  throws SAXException {
    if (TAG_NAME.equals(qName)) {
      String chars = characterData.toString();
      artists.add(new Artist(chars));
    }
  }
View Full Code Here

Examples of com.github.hakko.musiccabinet.domain.model.music.Artist

 
  protected static final String OFFSET = "offset";
 
  public String get(String artistName, String mbid, int offset) throws ApplicationException {
    WebserviceInvocation invocation = new WebserviceInvocation(
        MB_RELEASE_GROUPS, new Artist(artistName));
    List<NameValuePair> params = new ArrayList<>();
    params.add(new BasicNameValuePair(QUERY, format(PATTERN, mbid)));
    params.add(new BasicNameValuePair(LIMIT, HUNDRED));
    params.add(new BasicNameValuePair(OFFSET, valueOf(offset)));
    return executeWSRequest(invocation, PATH, params);
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.