示例#1
0
  public List<TagField> getFields(String id) {

    if (FieldKey.ARTIST.name().equals(id)) {
      return getArtist();
    } else if (FieldKey.ALBUM.name().equals(id)) {
      return getAlbum();
    } else if (FieldKey.TITLE.name().equals(id)) {
      return getTitle();
    } else if (FieldKey.GENRE.name().equals(id)) {
      return getGenre();
    } else if (FieldKey.YEAR.name().equals(id)) {
      return getYear();
    } else if (FieldKey.COMMENT.name().equals(id)) {
      return getComment();
    }
    return new ArrayList<TagField>();
  }
示例#2
0
  public TagField getFirstField(String id) {
    List<TagField> results = null;

    if (FieldKey.ARTIST.name().equals(id)) {
      results = getArtist();
    } else if (FieldKey.ALBUM.name().equals(id)) {
      results = getAlbum();
    } else if (FieldKey.TITLE.name().equals(id)) {
      results = getTitle();
    } else if (FieldKey.GENRE.name().equals(id)) {
      results = getGenre();
    } else if (FieldKey.YEAR.name().equals(id)) {
      results = getYear();
    } else if (FieldKey.COMMENT.name().equals(id)) {
      results = getComment();
    }

    if (results != null) {
      if (results.size() > 0) {
        return results.get(0);
      }
    }
    return null;
  }