Package org.discogs.model

Examples of org.discogs.model.Artist


    lstArtists.addListSelectionListener(new ListSelectionListener() {
      public void valueChanged(ListSelectionEvent arg0) {
        DiscogsArtistListModel artistModel = (DiscogsArtistListModel) lstArtists.getModel();
        ListSelectionModel selectionModel = lstArtists.getSelectionModel();
        if (!selectionModel.isSelectionEmpty() && !arg0.getValueIsAdjusting()) {
          Artist artist = artistModel.getEx(selectionModel.getMinSelectionIndex());
          if (artist != null) {
            DiscogsReleaseListModel releaseModel = (DiscogsReleaseListModel) lstReleases.getModel();

            releaseModel.clear();
            for (ArtistRelease release : artist.getReleases()) {
              releaseModel.addElement(release);
            }

            lstReleases.revalidate();
            lstReleases.clearSelection();
View Full Code Here


                        if (lstArtists != null && data != null) {
                            DefaultListModel listModel = (DefaultListModel) lstArtists.getModel();

                            listModel.clear();
                            if (callMode == DiscogsCaller.CallMode.ARTIST) {
                                Artist artist = (Artist) data;
                                listModel.addElement(artist);
                            }
                            else if (callMode == DiscogsCaller.CallMode.SEARCH_ARTISTS) {
                                List<Artist> artists = (List<Artist>) data;
                                for (Artist artist : artists) {
View Full Code Here

  }

  @Override
  protected Artist createObject(
      Element constructed) {
    return new Artist(constructed,
      client);
  }
View Full Code Here

      String convAnv = null;
      if (anv != null)
        convAnv = URLEncoder.encode(name, "ISO-8859-1");
      Element resultE = loadResult("/artist/" + convName + (anv != null ? "?anv=" + convAnv : ""));
      if (resultE != null)
      return new Artist(resultE,
        this);
      return null;
    } catch (UnsupportedEncodingException e) {
      e.printStackTrace();
      return null;
View Full Code Here

        for (int i = 0; i < tracks.size(); i++) {
          Track curr = tracks.get(i);
          System.out.println("\t" + (i + 1) + ": " + curr.getTitle());
        }
      }
      Artist artist = discogs.getArtist("Richard H. Kirk", "Richard H Kirk");
      System.out.println(artist);
      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

    return null;
  }

  @Override
  public Object get(int index) {
    Artist artist = getEx(index);
    return artist == null ? null : artist.getName();
  }
View Full Code Here

TOP

Related Classes of org.discogs.model.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.