* @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) {