Package com.github.hakko.musiccabinet.domain.model.music

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


    return getArtistId(artist.getName());
  }
 
  public Artist getArtist(String artistName) {
    String sql = "select artist_name_capitalization from music.artist where artist_name = upper(?)";
    return new Artist(jdbcTemplate.queryForObject(sql, String.class, artistName));
  }
View Full Code Here


        getArtistNamesScheduledForUpdate(ARTIST_GET_TOP_TRACKS);
    setTotalOperations(artistNames.size());
   
    for (String artistName : artistNames) {
      try {
        WSResponse wsResponse = artistTopTracksClient.getTopTracks(new Artist(artistName));
        if (wsResponse.wasCallAllowed() && wsResponse.wasCallSuccessful()) {
          StringUtil stringUtil = new StringUtil(wsResponse.getResponseBody());
          ArtistTopTracksParser attParser =
            new ArtistTopTracksParserImpl(stringUtil.getInputStream());
          artistTopTracksDao.createTopTracks(attParser.getArtist(),
View Full Code Here

   
    setTotalOperations(artistNames.size());
   
    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());
View Full Code Here

  public void endElement(String uri, String localName, String qName)
  throws SAXException {
    if (state != null) {
      String chars = characterData.toString();
      if (state == NAME) {
        currentArtistRelation.setTarget(new Artist(chars));
      } else if (state == MATCH) {
        currentArtistRelation.setMatch(toFloat(chars));
      }
      state = null;
    }
View Full Code Here

      totalPages = toShort(attributes.getValue(ATTR_TOTAL_PAGES));
    } else if (TAG_TRACK.equals(qName)) {
      scope = TRACK;
      currentTrackPlayCount = new TrackPlayCount();
      currentTrackPlayCount.setTrack(new Track());
      currentTrackPlayCount.getTrack().setArtist(new Artist());
    } else if (TAG_ALBUM.equals(qName)) {
      scope = ALBUM;
    } else if (TAG_ARTIST.equals(qName)) {
      scope = ARTIST;
    } else {
View Full Code Here

  @Override
  public void startElement(String uri, String localName, String qName, Attributes attributes)
  throws SAXException {
    if (TAG_TOP_TAGS.equals(qName)) {
      artistName = attributes.getValue(TAG_ARTIST);
      sourceArtist = new Artist(artistName);
    } else if (TAG_NAME.equals(qName)) {
      currentTag = new Tag();
      state = NAME;
      characterData = new StringBuilder();
    } else if (TAG_COUNT.equals(qName)) {
View Full Code Here

    private Artist artist;
    private Artist contextArtist1;
    private Artist contextArtist2;

    public RecommendedArtist(String artistName, String contextArtist1Name, String contextArtist2Name) {
      this.artist = new Artist(artistName);
      this.contextArtist1 = new Artist(contextArtist1Name);
      this.contextArtist2 = new Artist(contextArtist2Name);
    }
View Full Code Here

      @Override
      public ArtistRelation mapRow(ResultSet rs, int rowNum)
          throws SQLException {
        String artistName = rs.getString(1);
        float match = rs.getFloat(2);
        return new ArtistRelation(new Artist(artistName), match);
      }
    });

    return artistRelations;
  }
View Full Code Here

    return jdbcTemplate.query(topArtistsSql, new Object[]{topTags.size()},
        new RowMapper<ArtistRelation>() {
      @Override
      public ArtistRelation mapRow(ResultSet rs, int rowNum) throws SQLException {
        return new ArtistRelation(new Artist(rs.getString(1)), rs.getFloat(2));
      }
    });
  }
View Full Code Here

    List<ArtistInfo> artistInfos = jdbcTemplate.query(sql, new RowMapper<ArtistInfo>() {
      @Override
      public ArtistInfo mapRow(ResultSet rs, int rowNum)
          throws SQLException {
        ArtistInfo ai = new ArtistInfo();
        ai.setArtist(new Artist(artistId, rs.getString(1)));
        ai.setLargeImageUrl(rs.getString(2));
        ai.setBioSummary(rs.getString(3));
        ai.setInSearchIndex(rs.getBoolean(4));
        return ai;
      }
View Full Code Here

TOP

Related Classes of com.github.hakko.musiccabinet.domain.model.music.Artist

Copyright © 2018 www.massapicom. 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.