Examples of ArtistTopTagsParser


Examples of com.github.hakko.musiccabinet.parser.lastfm.ArtistTopTagsParser

  @Before
  public void loadFunctionDependencyAndTestdata() throws ApplicationException {
    PostgreSQLUtil.loadFunction(dao, UPDATE_ARTISTTOPTAG);

    ArtistTopTagsParser cherParser = new ArtistTopTagsParserImpl(
        new ResourceUtil(CHER_TOP_TAGS).getInputStream());
    ArtistTopTagsParser rihannaParser = new ArtistTopTagsParserImpl(
        new ResourceUtil(RIHANNA_TOP_TAGS).getInputStream());
    cherArtist = cherParser.getArtist();
    cherTopTags = cherParser.getTopTags();
    rihannaArtist = rihannaParser.getArtist();
    rihannaTopTags = rihannaParser.getTopTags();

    PostgreSQLUtil.truncateTables(dao);

    musicDao.setArtistId(cherArtist);
    musicDao.setArtistId(rihannaArtist);
View Full Code Here

Examples of com.github.hakko.musiccabinet.parser.lastfm.ArtistTopTagsParser

    for (String artistName : artistNames) {
      try {
        WSResponse wsResponse = artistTopTagsClient.getTopTags(new Artist(artistName));
        if (wsResponse.wasCallAllowed() && wsResponse.wasCallSuccessful()) {
          StringUtil stringUtil = new StringUtil(wsResponse.getResponseBody());
          ArtistTopTagsParser attParser =
            new ArtistTopTagsParserImpl(stringUtil.getInputStream());
          removeTagsWithLowTagCount(attParser.getTopTags());
          artistTopTagsDao.createTopTags(attParser.getArtist(),
              attParser.getTopTags());
        }
      } catch (ApplicationException e) {
        LOG.warn("Fetching top tags for " + artistName + " failed.", e);
      }
      addFinishedOperation();
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.