net.sourceforge.atunes.kernel.modules.repository.tags.writer
Class TagModifier

java.lang.Object
  extended by net.sourceforge.atunes.kernel.modules.repository.tags.writer.TagModifier

public class TagModifier
extends java.lang.Object

Class for writting tags to an audio file. We only use JAudiotagger for it. In general, for writting a complete tag, call setInfo.

Author:
sylvain

Constructor Summary
TagModifier()
           
 
Method Summary
static void deleteTags(AudioFile file)
          Delete tags.
static void refreshAfterTagModify(java.util.List<AudioFile> audioFilesEditing)
          Refresh after tag modify.
static void setAlbum(AudioFile file, java.lang.String album)
          Writes album to tag.
static void setGenre(AudioFile file, java.lang.String genre)
          Writes genre to tag.
static void setInfo(AudioFile file, Tag tag)
          Writes tag to audiofile using JAudiotagger.
static void setInfo(AudioFile file, Tag tag, boolean shouldEditCover, byte[] cover)
          Writes tag to audio file using JAudiotagger.
static void setLyrics(AudioFile file, java.lang.String lyrics)
          Sets the lyrics.
static void setTitles(AudioFile file, java.lang.String newTitle)
          Writes title name to tag.
static void setTrackNumber(AudioFile file, java.lang.Integer track)
          Sets track number on a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TagModifier

public TagModifier()
Method Detail

deleteTags

public static void deleteTags(AudioFile file)
Delete tags.

Parameters:
file - the file

refreshAfterTagModify

public static void refreshAfterTagModify(java.util.List<AudioFile> audioFilesEditing)
Refresh after tag modify.

Parameters:
audioFilesEditing - the audio files editing

setAlbum

public static void setAlbum(AudioFile file,
                            java.lang.String album)
Writes album to tag.

Parameters:
file - File to which the tag should be written
album - Album of file

setGenre

public static void setGenre(AudioFile file,
                            java.lang.String genre)
Writes genre to tag.

Parameters:
file - File to which the tag should be written
genre - Genre of file

setInfo

public static void setInfo(AudioFile file,
                           Tag tag)
Writes tag to audiofile using JAudiotagger. For mp3 we write id3v1 and id3v2 tags to file.

Parameters:
file - File to which the tags should be written
tag - Tag to be written

setInfo

public static void setInfo(AudioFile file,
                           Tag tag,
                           boolean shouldEditCover,
                           byte[] cover)
Writes tag to audio file using JAudiotagger.

Parameters:
file - File to which the tags should be written
tag - Tag to be written

setLyrics

public static void setLyrics(AudioFile file,
                             java.lang.String lyrics)
Sets the lyrics.

Parameters:
file - the file
lyrics - the lyrics

setTitles

public static void setTitles(AudioFile file,
                             java.lang.String newTitle)
Writes title name to tag.

Parameters:
file - File to which the tag should be written
newTitle - New title

setTrackNumber

public static void setTrackNumber(AudioFile file,
                                  java.lang.Integer track)
Sets track number on a file.

Parameters:
file - File to which the tag should be written
track - Track number


Copyright © 2006-2008 The aTunes Team. All Rights Reserved.