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 LastFMTags
createDeepCopy()
This method creates a copy of the Task and its subtasks.TaskEditor<LastFMTags>
createEditor()
Returns an instance of the correspondingTaskEditor
, in this caseLastFMTagsEditor
.String
getDescription()
Returns a verbose description of the task in HTML format.String
getName()
This will be the displayed name of the analysis task.int
getNumberOfTags()
boolean
isCopyComments()
boolean
isEmbedMoodTags()
boolean
isReplaceExistingValue()
boolean
isUseBraces()
static void
main(String[] args)
void
runBefore(Task task)
This is where the actual work occurs.void
setCopyComments(boolean copyComments)
Persistently stores the whether we should copy the tags to the comments field.void
setEmbedMoodTags(boolean embedMoodTags)
Persistently stores, whether we should embed mood tags or not in this task's properties.void
setNumberOfTags(int numberOfTags)
Persistently stores the number of tags in this task's properties.void
setReplaceExistingValue(boolean replaceExistingValue)
void
setUseBraces(boolean useBraces)
Persistently stores whether we should brace tags or not in this task's properties.boolean
skip()
Indicates, whether this task can be skipped.String
toString()
-
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:
getDescription
in 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
-true
orfalse
-
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:
runBefore
in interfaceTaskRunListener
- Overrides:
runBefore
in 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:
createEditor
in classTask
- Returns:
- editor instance
-
createDeepCopy
public LastFMTags createDeepCopy()
Description copied from class:Task
This 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:
createDeepCopy
in classTask
- Returns:
- copy
-
main
public static void main(String[] args) throws IOException
- Throws:
IOException
-
-