Package org.discogs.ws.search

Examples of org.discogs.ws.search.Search


          result = DISCOGS.getRelease(query);
          break;
        case SEARCH_ARTISTS:
          List<Artist> artists = new LinkedList<Artist>();

          Search s = DISCOGS.search(Discogs.SEARCH_TYPE_ARTIST, query);

          List<SearchResult> srs = null;
          if (!s.getExactResults().isEmpty()) {
            srs = s.getExactResults();
          }
          else {
            srs = s.getSearchResults();
          }

          for (SearchResult sr : srs) {
            if (sr instanceof ArtistSearchResult) {
              try {
View Full Code Here


      String term) {
    try {
      String convTerm = URLEncoder.encode(term, "UTF-8");
      Element resultE = loadResult("/search?" + (type == null ? "" : "type=" + type + "&") + "q=" + convTerm);
    if (resultE != null)
    return new Search((Element) resultE.getParentNode(),
      this);
    return null;
    } catch (UnsupportedEncodingException e) {
      e.printStackTrace();
      return null;
View Full Code Here

      Label label = discogs.getLabel("Warp Records");
      System.out.println(label.getProfile());
      // this fails on extended characters.
      artist = discogs.getArtist("Stéphane Pompougnac");
      System.out.println(artist.getProfile());
      Search s = discogs.search(SEARCH_TYPE_ARTIST, "Stéphane Pompougnac");
      System.out.println(s);
      Release r = discogs.getRelease("507569");
      System.out.println("Track name with UTF-8 char: " + r.getTracks().get(1).getTitle());
      // System.out.println(r);
View Full Code Here

TOP

Related Classes of org.discogs.ws.search.Search

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.