Package com.tagtraum.beatunes.matchtable
Class AmazonSimilarityRule
- java.lang.Object
-
- com.tagtraum.beatunes.matchtable.ScoreRule
-
- com.tagtraum.beatunes.matchtable.AmazonSimilarityRule
-
- All Implemented Interfaces:
Serializable
,Comparable<ScoreRule>
@Deprecated public class AmazonSimilarityRule extends ScoreRule
Deprecated.ThisScoreRule
is deprecated, because Amazon does not provide the necessary information anymore. As a fill-in, it currently works similar toSimilarArtistRule
.- Author:
- Hendrik Schreiber
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.tagtraum.beatunes.matchtable.ScoreRule
ScoreRule.BasicScoreRuleEditor, ScoreRule.WeightBoundedRangeModel
-
-
Constructor Summary
Constructors Constructor Description AmazonSimilarityRule()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description int
compareTo(ScoreRule that)
Deprecated.Always make this rule very light (-5f), when comparing, so that we get rid of it first inRuleBasedPrefilter.getPreFilteredSongs(AudioSong, PlayList, Float, boolean, Collection, Collection)
(low weight rules are removed in SQL queries first).protected ScoreRuleEditor
createEditor()
Deprecated.String
getDescription()
Deprecated.Description of how this rule works.String
getId()
Deprecated.Returns a unique name for this rule.SongPropertyFilter
getMatchFilter(AudioSong template, Float templateSyncBPM, boolean playMatchAtSyncTempo)
Deprecated.Returns a filter that matches Songs that match this rule at least somewhat.String
getName()
Deprecated.Short name, like "Similar BPM"boolean
isIgnoredWhileQuickMatching()
Deprecated.Indicates whether this rule should be ignored in the initial matching and only be used to refine the result in a second round of matching.boolean
isSuitableForSorting()
Deprecated.Indicates whether this rule can be used for sorting a playlist, meaning whether it is cheap enough for for many invocations for many songs.void
load(nu.xom.Element element)
Deprecated.Empty impl.float
score(AudioSong song, AudioSong template, Float syncBPM, boolean playMatchAtSyncTempo)
Deprecated.Returns a score between 0 and 1 for how well the given song matches the given template.void
setIgnoredForQuickMatching(boolean ignore)
Deprecated.void
store(nu.xom.Element element)
Deprecated.Empty impl.-
Methods inherited from class com.tagtraum.beatunes.matchtable.ScoreRule
addPropertyChangeListener, getApplication, getScoreRuleEditor, getWeight, getWeightedMatchFilter, setApplication, setWeight, weightedScore
-
-
-
-
Method Detail
-
isSuitableForSorting
public boolean isSuitableForSorting()
Deprecated.Description copied from class:ScoreRule
Indicates whether this rule can be used for sorting a playlist, meaning whether it is cheap enough for for many invocations for many songs. The rule can still be used efficiently for matching.- Overrides:
isSuitableForSorting
in classScoreRule
- Returns:
- by default this returns true, if an implementation is not suitable this may return false and the rule will be ignored when sorting a playlist.
-
isIgnoredWhileQuickMatching
public boolean isIgnoredWhileQuickMatching()
Deprecated.Description copied from class:ScoreRule
Indicates whether this rule should be ignored in the initial matching and only be used to refine the result in a second round of matching.- Overrides:
isIgnoredWhileQuickMatching
in classScoreRule
- Returns:
- default implementation always returns false
-
setIgnoredForQuickMatching
public void setIgnoredForQuickMatching(boolean ignore)
Deprecated.
-
load
public void load(nu.xom.Element element) throws ConfigurationException
Deprecated.Description copied from class:ScoreRule
Empty impl. Override for adding custom initializations.- Overrides:
load
in classScoreRule
- Parameters:
element
- XML element to initialize this rule with.- Throws:
ConfigurationException
-
store
public void store(nu.xom.Element element) throws ConfigurationException
Deprecated.Description copied from class:ScoreRule
Empty impl. Override for adding custom attributes.- Overrides:
store
in classScoreRule
- Parameters:
element
- XML element that is named like the id of this score rule. It's value is equals to weight * 10f- Throws:
ConfigurationException
-
getId
public String getId()
Deprecated.Description copied from class:ScoreRule
Returns a unique name for this rule.
-
getName
public String getName()
Deprecated.Description copied from class:ScoreRule
Short name, like "Similar BPM"
-
getDescription
public String getDescription()
Deprecated.Description copied from class:ScoreRule
Description of how this rule works. May be displayed in tooltips.- Specified by:
getDescription
in classScoreRule
- Returns:
- description
-
score
public float score(AudioSong song, AudioSong template, Float syncBPM, boolean playMatchAtSyncTempo)
Deprecated.Description copied from class:ScoreRule
Returns a score between 0 and 1 for how well the given song matches the given template. A higher score indicates a better match.
-
getMatchFilter
public SongPropertyFilter getMatchFilter(AudioSong template, Float templateSyncBPM, boolean playMatchAtSyncTempo)
Deprecated.Description copied from class:ScoreRule
Returns a filter that matches Songs that match this rule at least somewhat. This should be used to find songs that at least somewhat match the rule.- Specified by:
getMatchFilter
in classScoreRule
- Parameters:
template
- template song to matchtemplateSyncBPM
- sync bpm for the template songplayMatchAtSyncTempo
- the given song is meant to be played at the same tempo as the template song- Returns:
- a filter (set) that matches this rule or null, if all songs match this rule.
-
compareTo
public int compareTo(ScoreRule that)
Deprecated.Always make this rule very light (-5f), when comparing, so that we get rid of it first inRuleBasedPrefilter.getPreFilteredSongs(AudioSong, PlayList, Float, boolean, Collection, Collection)
(low weight rules are removed in SQL queries first).- Specified by:
compareTo
in interfaceComparable<ScoreRule>
- Overrides:
compareTo
in classScoreRule
- Parameters:
that
- other rule- Returns:
- -1, 0, 1
-
createEditor
protected ScoreRuleEditor createEditor()
Deprecated.- Overrides:
createEditor
in classScoreRule
-
-