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

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


    verifyTopTag(parser, 99, "techno", 0);
  }
 
  private void verifyTopTag(ArtistTopTagsParser parser,
      int tagIndex, String tagName, int tagCount) {
    Tag tag = parser.getTopTags().get(tagIndex);
    assertTrue(tag.getName().equals(tagName));
    assertEquals(tagCount, tag.getCount());
  }
View Full Code Here


public class TagIdNameRowMapper implements RowMapper<Tag> {

  @Override
  public Tag mapRow(ResultSet rs, int rowNum) throws SQLException {
    return new Tag(rs.getInt(1), rs.getString(2));
  }
View Full Code Here

  @Override
  public Tag mapRow(ResultSet rs, int rowNum) throws SQLException {
    String tagName = rs.getString(1);
    short tagCount = rs.getShort(2);
    return new Tag(tagName, tagCount);
  }
View Full Code Here

   * Don't bother to save them to database, they won't really affect the radio
   * selection algorithm anyway.
   */
  protected void removeTagsWithLowTagCount(List<Tag> tags) {
    for (Iterator<Tag> it = tags.iterator(); it.hasNext();) {
      Tag tag = it.next();
      if (tag.getCount() < 10) {
        it.remove();
      }
    }
  }
View Full Code Here

  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)) {
      state = COUNT;
      characterData = new StringBuilder();
View Full Code Here

TOP

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

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.