Package com.jitcaforwin.extended.api.artist

Examples of com.jitcaforwin.extended.api.artist.Artist


  public Artist getArtist(String name) {
    if (name == null || name.isEmpty()) {
      return null; // No artist specified.
    }

    Artist artist = searchForArtist(name);
    if (artist == null) {
      artist = addArtist(name);
    }
    return artist;
  }
View Full Code Here


  /**
   * {@inheritDoc}
   */
  @Override
  public void setAlbumArtist(Artist albumArtist) throws TrackReadOnly {
    Artist oldAlbumArtist = this.getAlbum().getAlbumArtist();
    if (oldAlbumArtist != null && oldAlbumArtist.equals(albumArtist)) {
      return; // no change needed.
    }
    this.getAlbum().setAlbumArtist(albumArtist);
  }
View Full Code Here

   * @throws JitcaException
   *             if an error occurs.
   */
  private Artist addArtist(String name) {
    // special case treatments
    Artist artist = ArtistImpl.create(name, this.source);

    this.artists.put(name, artist);
    if (!this.lazy) {
      artist.loadAllTracks();
    }

    return artist;
  }
View Full Code Here

  protected FileOrCDTrackImpl(Source source, IITFileOrCDTrack itTrack) {
    super(source, itTrack);
    try {
      this.itTrack = itTrack;
      Artist albumArtist = super.source.getArtist(itTrack.getAlbumArtist());
      if (albumArtist == null) {
        albumArtist = this.getArtist();
      }
      super.album = super.source.getAlbum(itTrack.getAlbum(), albumArtist);
    } catch (TrackDeletedException e) {
View Full Code Here

  /**
   * {@inheritDoc}
   */
  @Override
  public void setAlbumArtist(Artist albumArtist) throws TrackReadOnly {
    Artist oldAlbumArtist = this.getAlbum().getAlbumArtist();
    if (oldAlbumArtist != null && oldAlbumArtist.equals(albumArtist)) {
      return; // no change needed.
    }
    this.getAlbum().setAlbumArtist(albumArtist);
  }
View Full Code Here

  private IITURLTrack itTrack;

  protected URLTrackImpl(Source source, IITURLTrack itTrack) {
    super(source, itTrack);
    this.itTrack = itTrack;
    Artist albumArtist = this.getArtist(); // AlbumArtist is not part of
                        // IITTrack
    try {
      this.album = this.source.getAlbum(itTrack.getAlbum(), albumArtist);
    } catch (TrackDeletedException e) {
      throw new JitcaInitializationError(
View Full Code Here

  public static void main(String args[]) {
    IJitcaITunesController iTunes = new JitcaiTunesController(true);
    UserLibrary library = iTunes.getLibrary();

    Artist michaelJackson = library.getArtist("Michael Jackson");
    michaelJackson.loadAllTracks();
    TrackCollection tracks = michaelJackson.getTracks();

    System.out.println("The following tracks of \"" + michaelJackson.getName() + "\" are in your library:");
    for (Track track : tracks) {
      System.out.println("\"" + track.getTitle() + "\" (" + track.getAlbum() + ")");
    }

    iTunes.close();
View Full Code Here

  private IITURLTrack itTrack;

  protected URLTrackImpl(Source source, IITURLTrack itTrack) {
    super(source, itTrack);
    this.itTrack = itTrack;
    Artist albumArtist = this.getArtist(); // AlbumArtist is not part of
                        // IITTrack
    try {
      this.album = this.source.getAlbum(itTrack.getAlbum(), albumArtist);
    } catch (TrackDeletedException e) {
      throw new JitcaInitializationError(
View Full Code Here

  protected FileOrCDTrackImpl(Source source, IITFileOrCDTrack itTrack) {
    super(source, itTrack);
    try {
      this.itTrack = itTrack;
      Artist albumArtist = super.source.getArtist(itTrack.getAlbumArtist());
      if (albumArtist == null) {
        albumArtist = this.getArtist();
      }
      super.album = super.source.getAlbum(itTrack.getAlbum(), albumArtist);
    } catch (TrackDeletedException e) {
View Full Code Here

  /**
   * {@inheritDoc}
   */
  @Override
  public void setAlbumArtist(Artist albumArtist) throws TrackReadOnly {
    Artist oldAlbumArtist = this.getAlbum().getAlbumArtist();
    if (oldAlbumArtist != null && oldAlbumArtist.equals(albumArtist)) {
      return; // no change needed.
    }
    this.getAlbum().setAlbumArtist(albumArtist);
  }
View Full Code Here

TOP

Related Classes of com.jitcaforwin.extended.api.artist.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.