Package com.jitcaforwin.basic.enums

Examples of com.jitcaforwin.basic.enums.ITTrackKind


  }
 
  public static IITTrack newIITTrack(DispatchObject o) throws JitcaGeneralException{
    try{
      ITTrackImpl track = new ITTrackImpl(o);
      ITTrackKind trackKind = track.getKind();
     
      if (trackKind.is(ITTrackKind.CD()) || trackKind.is(ITTrackKind.File())){
        return new ITFileOrCDTrackImpl(o);
      } else if (trackKind.is(ITTrackKind.URL())){
        return new ITURLTrackImpl(o);
      } else {
        return track;
      }
    } catch (DispatchObjectNullException e){
View Full Code Here


      throw new JitcaGeneralException("Artwork form file could not be added to Track.");
    }
  }

  public ITTrackKind getKind() throws JitcaGeneralException {
    return new ITTrackKind(this.iTunesCom.getPropertyAsEnum("Kind"));
  }
View Full Code Here

  }

  public static IITTrack create(DispatchObject o) {
    try {
      ITTrackImpl track = new ITTrackImpl(o);
      ITTrackKind trackKind = track.getKind();

      if (trackKind.is(ITTrackKind.CD()) || trackKind.is(ITTrackKind.File())) {
        return new ITFileOrCDTrackImpl(o);
      } else if (trackKind.is(ITTrackKind.URL())) {
        return new ITURLTrackImpl(o);
      } else {
        return track;
      }
    } catch (DispatchObjectNullException e) {
View Full Code Here

    }
  }

  public ITTrackKind getKind() throws TrackDeletedException {
    try {
      return new ITTrackKind(this.iTunesCom.getPropertyAsEnum("Kind"));
    } catch (ITUNES_E_OBJECTDELETED e) {
      throw new TrackDeletedException(this);
    }
  }
View Full Code Here

   * @throws JitcaException
   *             if an error occurs.
   */
  public static TrackImpl create(Source source, IITTrack itTrack) {
    try {
      ITTrackKind trackKind = itTrack.getKind();

      if ((trackKind.is(ITTrackKind.CD()) || trackKind.is(ITTrackKind.File()))
          && (itTrack instanceof IITFileOrCDTrack)) {
        return FileOrCDTrackImpl.create(source, (IITFileOrCDTrack) itTrack);
      } else if ((trackKind.is(ITTrackKind.URL())) && (itTrack instanceof IITURLTrack)) {
        return URLTrackImpl.create(source, (IITURLTrack) itTrack);
      } else {
        return new DefaultTrack(source, itTrack);
      }
    } catch (TrackDeletedException e) {
View Full Code Here

TOP

Related Classes of com.jitcaforwin.basic.enums.ITTrackKind

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.