Package com.tagtraum.beatunes.analysis
Class ImportLyrics
- java.lang.Object
-
- com.tagtraum.beatunes.analysis.Task
-
- com.tagtraum.beatunes.analysis.SongAnalysisTask
-
- com.tagtraum.beatunes.analysis.ImportLyrics
-
- All Implemented Interfaces:
TaskFactory,TaskProcessListener,TaskRunListener,Matchable<PlayList.SubstringFilterProperty>,Cloneable
@Entity public class ImportLyrics extends SongAnalysisTask
Import lyrics from online databases using implementations ofLyricsProvider. To add another provider, simply implement theLyricsProviderinterface, pack the implementation into a plugin jar, add the implementing class to the plugin'splugin.xmland install the plugin.- Author:
- Hendrik Schreiber
-
-
Field Summary
-
Fields inherited from class com.tagtraum.beatunes.analysis.Task
useOnlineResources
-
-
Constructor Summary
Constructors Constructor Description ImportLyrics()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImportLyricscreateDeepCopy()This method creates a copy of the Task and its subtasks.TaskEditor<ImportLyrics>createEditor()By default instantiates a class with the namethis.getClass().getName() + "Editor".booleanequals(Object obj)StringgetDescription()HTML or plain text description of this task.StringgetName()HTML or plaintext name of this task.booleanisReplaceExistingLyrics()voidrunBefore(Task task)Is executed before sub tasks are run.voidsetReplaceExistingLyrics(boolean replaceExistingLyrics)booleanskip()Indicates, whether this task can be skipped.-
Methods inherited from class com.tagtraum.beatunes.analysis.Task
add, addTaskProcessListener, addTaskRunListener, cancel, clearProperties, createTask, deepRemove, 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, toString, wasSkipped
-
-
-
-
Method Detail
-
createEditor
public TaskEditor<ImportLyrics> createEditor()
Description copied from class:TaskBy default instantiates a class with the namethis.getClass().getName() + "Editor". If that does not work (because the editor class does not exist), anEmptyTaskEditoris created. To create a meaningful editor for a configurable task, you must override this method.- Overrides:
createEditorin classTask- Returns:
- task editor for this task.
-
isReplaceExistingLyrics
public boolean isReplaceExistingLyrics()
-
setReplaceExistingLyrics
public void setReplaceExistingLyrics(boolean replaceExistingLyrics)
-
getName
public String getName()
Description copied from class:TaskHTML or plaintext name of this task. Defaults to the task's classname.
-
getDescription
public String getDescription()
Description copied from class:TaskHTML or plain text description of this task.- Overrides:
getDescriptionin classTask- Returns:
- description
-
runBefore
public void runBefore(Task task) throws AnalysisException
Description copied from class:TaskIs executed before sub tasks are run.- Specified by:
runBeforein interfaceTaskRunListener- Overrides:
runBeforein classTask- Parameters:
task- task- Throws:
AnalysisException- if this analysis step fails
-
skip
public boolean skip()
Description copied from class:TaskIndicates, whether this task can be skipped. Defaults to false.Since this task is not necessarily called by beaTunes, but by your own implementation of
Task.runBefore(Task), you should callTask.setSkipped(boolean)with whatever value you are returning.
-
createDeepCopy
public ImportLyrics 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
-
-