Package com.tagtraum.beatunes.analysis
Class ImportOnlineDBMetaData
- java.lang.Object
-
- com.tagtraum.beatunes.analysis.Task
-
- com.tagtraum.beatunes.analysis.AudioAnalysisTask
-
- com.tagtraum.beatunes.analysis.ImportOnlineDBMetaData
-
- All Implemented Interfaces:
TaskFactory
,TaskProcessListener
,TaskRunListener
,Matchable
,Cloneable
@Entity public class ImportOnlineDBMetaData extends AudioAnalysisTask
Looks up meta data for a given song usingOnlineDB
.- Author:
- Hendrik Schreiber
-
-
Field Summary
-
Fields inherited from class com.tagtraum.beatunes.analysis.Task
useOnlineResources
-
-
Constructor Summary
Constructors Constructor Description ImportOnlineDBMetaData()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImportOnlineDBMetaData
createDeepCopy()
This method creates a copy of the Task and its subtasks.SignalProcessor
createPipeline(AudioFileFormat audioFileFormat)
String
getDescription()
HTML or plain text description of this task.String
getName()
HTML or plaintext name of this task.AudioClip
getRequiredClip(AudioFileFormat audioFileFormat)
boolean
isChooseEarliestRelease()
boolean
isIgnoreCompilations()
boolean
isImportAlbum()
boolean
isImportAlbumArtist()
boolean
isImportArtist()
boolean
isImportArtwork()
boolean
isImportComposer()
boolean
isImportDiscNumber()
boolean
isImportGenre()
boolean
isImportMissingData()
boolean
isImportName()
boolean
isImportRating()
boolean
isImportTrackNumber()
boolean
isImportYear()
boolean
isReplaceExistingData()
void
processBefore(Task task)
Process online results with this task before other tasks are invoked.void
runBefore(Task task)
Is executed before sub tasks are run.void
setChooseEarliestRelease(boolean chooseEarliestRelease)
void
setIgnoreCompilations(boolean ignoreCompilations)
void
setImportAlbum(boolean importAlbum)
void
setImportAlbumArtist(boolean importAlbumArtist)
void
setImportArtist(boolean importArtist)
void
setImportArtwork(boolean importArtwork)
void
setImportComposer(boolean importComposer)
void
setImportDiscNumber(boolean importDiscNumber)
void
setImportGenre(boolean importGenre)
void
setImportMissingData(boolean importMissingData)
void
setImportName(boolean importName)
void
setImportRating(boolean importRating)
void
setImportTrackNumber(boolean importTrackNumber)
void
setImportYear(boolean importYear)
void
setReplaceExistingData(boolean replaceExistingData)
boolean
skip()
Indicates, whether this task can be skipped.-
Methods inherited from class com.tagtraum.beatunes.analysis.AudioAnalysisTask
getAlgorithmName
-
Methods inherited from class com.tagtraum.beatunes.analysis.Task
add, addTaskProcessListener, addTaskRunListener, cancel, clearProperties, createEditor, 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, 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
-
createPipeline
public SignalProcessor createPipeline(AudioFileFormat audioFileFormat)
- Overrides:
createPipeline
in classAudioAnalysisTask
-
getRequiredClip
public AudioClip getRequiredClip(AudioFileFormat audioFileFormat)
- Overrides:
getRequiredClip
in classAudioAnalysisTask
- Parameters:
audioFileFormat
- file format of the original, potentially compressed audio file- Returns:
- the clip this algorithm actually requires
-
getName
public String getName()
Description copied from class:Task
HTML or plaintext name of this task. Defaults to the task's classname.
-
getDescription
public String getDescription()
Description copied from class:Task
HTML or plain text description of this task.- Overrides:
getDescription
in classTask
- Returns:
- description
-
isImportArtwork
public boolean isImportArtwork()
-
setImportArtwork
public void setImportArtwork(boolean importArtwork)
-
isChooseEarliestRelease
public boolean isChooseEarliestRelease()
-
setChooseEarliestRelease
public void setChooseEarliestRelease(boolean chooseEarliestRelease)
-
isIgnoreCompilations
public boolean isIgnoreCompilations()
-
setIgnoreCompilations
public void setIgnoreCompilations(boolean ignoreCompilations)
-
isImportMissingData
public boolean isImportMissingData()
-
setImportMissingData
public void setImportMissingData(boolean importMissingData)
-
isReplaceExistingData
public boolean isReplaceExistingData()
-
setReplaceExistingData
public void setReplaceExistingData(boolean replaceExistingData)
-
isImportAlbum
public boolean isImportAlbum()
-
setImportAlbum
public void setImportAlbum(boolean importAlbum)
-
isImportArtist
public boolean isImportArtist()
-
setImportArtist
public void setImportArtist(boolean importArtist)
-
isImportName
public boolean isImportName()
-
setImportName
public void setImportName(boolean importName)
-
isImportTrackNumber
public boolean isImportTrackNumber()
-
setImportTrackNumber
public void setImportTrackNumber(boolean importTrackNumber)
-
isImportGenre
public boolean isImportGenre()
-
setImportGenre
public void setImportGenre(boolean importGenre)
-
isImportYear
public boolean isImportYear()
-
setImportYear
public void setImportYear(boolean importYear)
-
isImportRating
public boolean isImportRating()
-
setImportRating
public void setImportRating(boolean importRating)
-
isImportComposer
public boolean isImportComposer()
-
setImportComposer
public void setImportComposer(boolean importComposer)
-
isImportAlbumArtist
public boolean isImportAlbumArtist()
-
setImportAlbumArtist
public void setImportAlbumArtist(boolean importAlbumArtist)
-
isImportDiscNumber
public boolean isImportDiscNumber()
-
setImportDiscNumber
public void setImportDiscNumber(boolean importDiscNumber)
-
processBefore
public void processBefore(Task task)
Description copied from class:Task
Process online results with this task before other tasks are invoked. Override this method, if you want to take online resources into account. Note that you will also need to setTask.setUseOnlineResources(boolean)
totrue
, if you want this method to be called at all.To avoid having this task processed again by
Task.runBefore(Task)
, you must callTask.setSucceeded(boolean)
with the argumenttrue
. If, for some reason, you could not take care of this task with just the available online resources, you must callTask.setSucceeded(boolean)
with the argumentfalse
This method is executed before sub tasks are run. When this method is called, the methods
Task.getSong()
andTask.getReferenceSong()
will return meaningful results.- Specified by:
processBefore
in interfaceTaskProcessListener
- Overrides:
processBefore
in classTask
- Parameters:
task
- task
-
runBefore
public void runBefore(Task task) throws AnalysisException
Description copied from class:Task
Is executed before sub tasks are run.- Specified by:
runBefore
in interfaceTaskRunListener
- Overrides:
runBefore
in classTask
- Parameters:
task
- task- Throws:
AnalysisException
- if this analysis step fails
-
skip
public boolean skip()
Description copied from class:Task
Indicates, 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 ImportOnlineDBMetaData 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
-
-