/**
   * Returns a String representation of this submission with the fields separated by &. Order of the
   * fields is:<br>
   * <tt>artist&track&startTime&Source&RecommendationKey&Rating&length&album&tracknumber</tt><br>
   * Note that: - Values may possibly be <code>null</code> or empty - enum values such as Rating and
   * Source are <code>null</code> or their constant name is used (i.e. "LOVE") - all string values
   * (artist, track, album) are utf8-url-encoded
   *
   * @return a String
   */
  public String toString() {
    String b = encode(album != null ? album : "");
    String artist = encode(this.artist);
    String track = encode(this.track);
    String l = length == -1 ? "" : String.valueOf(length);
    String n = tracknumber == -1 ? "" : String.valueOf(tracknumber);

    String r = "";
    if (rating != null) r = rating.name();
    String rec = "";
    if (recommendationKey != null && source == Source.LAST_FM && recommendationKey.length() == 5)
      rec = recommendationKey;

    return String.format(
        "%s&%s&%s&%s&%s&%s&%s&%s&%s", artist, track, startTime, source.name(), rec, r, l, b, n);
  }