Package com.tagtraum.beatunes.analysis
Class LastFMTags
- java.lang.Object
-
- com.tagtraum.beatunes.analysis.Task
-
- com.tagtraum.beatunes.analysis.SongAnalysisTask
-
- com.tagtraum.beatunes.analysis.LastFMTags
-
- All Implemented Interfaces:
TaskFactory,TaskProcessListener,TaskRunListener,Matchable<PlayList.SubstringFilterProperty>,Cloneable
@Entity public class LastFMTags extends SongAnalysisTask
Copies Last.FM tags to comment field/tags.
-
-
Field Summary
-
Fields inherited from class com.tagtraum.beatunes.analysis.Task
useOnlineResources
-
-
Constructor Summary
Constructors Constructor Description LastFMTags()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description LastFMTagscreateDeepCopy()This method creates a copy of the Task and its subtasks.TaskEditor<LastFMTags>createEditor()Returns an instance of the correspondingTaskEditor, in this caseLastFMTagsEditor.StringgetDescription()Returns a verbose description of the task in HTML format.StringgetName()This will be the displayed name of the analysis task.intgetNumberOfTags()booleanisCopyComments()booleanisEmbedMoodTags()booleanisReplaceExistingValue()booleanisUseBraces()static voidmain(String[] args)voidrunBefore(Task task)This is where the actual work occurs.voidsetCopyComments(boolean copyComments)Persistently stores the whether we should copy the tags to the comments field.voidsetEmbedMoodTags(boolean embedMoodTags)Persistently stores, whether we should embed mood tags or not in this task's properties.voidsetNumberOfTags(int numberOfTags)Persistently stores the number of tags in this task's properties.voidsetReplaceExistingValue(boolean replaceExistingValue)voidsetUseBraces(boolean useBraces)Persistently stores whether we should brace tags or not in this task's properties.booleanskip()Indicates, whether this task can be skipped.StringtoString()-
Methods inherited from class com.tagtraum.beatunes.analysis.Task
add, addTaskProcessListener, addTaskRunListener, cancel, clearProperties, createTask, deepRemove, equals, fetchCollections, getAnalysisProgress, getApplication, getAudioFileFormat, getCurrentOperation, getDeepLeafs, getDeepTaskCount, getDeepTasks, getEditor, getId, getMessagePanel, getParent, getPriority, getProperties, getProperty, getPropertyNames, getReferenceSong, getSong, getSongId, getTask, getTaskCount, getTasks, hashCode, hasSucceeded, isAvailable, isCancelled, isDeepUseOnlineResources, isFileExistedBeforeStart, isLeaf, isPaused, isProgressRelevant, isUseOnlineResources, matches, maybePause, process, processAfter, processBefore, processFinally, remove, removeDeadLeaves, run, runAfter, runFinally, setAnalysisProgress, setApplication, setAudioFileFormat, setAvailable, setCurrentOperation, setId, setParent, setPaused, setPriority, setProgressRelevant, setProperties, setProperty, setReferenceSong, setSkipped, setSong, setSongId, setSucceeded, setUseOnlineResources, wasSkipped
-
-
-
-
Method Detail
-
getName
public String getName()
This will be the displayed name of the analysis task.
-
getDescription
public String getDescription()
Returns a verbose description of the task in HTML format.- Overrides:
getDescriptionin classTask- Returns:
- verbose HTML description.
-
isReplaceExistingValue
public boolean isReplaceExistingValue()
-
setReplaceExistingValue
public void setReplaceExistingValue(boolean replaceExistingValue)
-
getNumberOfTags
public int getNumberOfTags()
-
setNumberOfTags
public void setNumberOfTags(int numberOfTags)
Persistently stores the number of tags in this task's properties.- Parameters:
numberOfTags- number of tags to import- See Also:
Task.setProperty(String, String)
-
isUseBraces
public boolean isUseBraces()
-
setUseBraces
public void setUseBraces(boolean useBraces)
Persistently stores whether we should brace tags or not in this task's properties.- Parameters:
useBraces- true or false
-
isEmbedMoodTags
public boolean isEmbedMoodTags()
-
setEmbedMoodTags
public void setEmbedMoodTags(boolean embedMoodTags)
Persistently stores, whether we should embed mood tags or not in this task's properties.- Parameters:
embedMoodTags-trueorfalse
-
isCopyComments
public boolean isCopyComments()
-
setCopyComments
public void setCopyComments(boolean copyComments)
Persistently stores the whether we should copy the tags to the comments field.- Parameters:
copyComments- true or false
-
runBefore
public void runBefore(Task task) throws AnalysisException
This is where the actual work occurs.- Specified by:
runBeforein interfaceTaskRunListener- Overrides:
runBeforein classTask- Parameters:
task- task- Throws:
AnalysisException- if something goes wrong.
-
skip
public boolean skip()
Indicates, whether this task can be skipped.
-
createEditor
public TaskEditor<LastFMTags> createEditor()
Returns an instance of the correspondingTaskEditor, in this caseLastFMTagsEditor. Starting with beaTunes 1.2.9, you don't have to override this method as long as you simply follow the naming convention Task + "Editor". If you don't need a custom editor at all, don't override this method.- Overrides:
createEditorin classTask- Returns:
- editor instance
-
createDeepCopy
public LastFMTags createDeepCopy()
Description copied from class:TaskThis method creates a copy of the Task and its subtasks. If you added any members to your subclass you MUST override this method and provide code that copies your members.- Overrides:
createDeepCopyin classTask- Returns:
- copy
-
main
public static void main(String[] args) throws IOException
- Throws:
IOException
-
-