Package com.tagtraum.beatunes.matchtable
Class RuleBasedPrefilter
- java.lang.Object
-
- com.tagtraum.beatunes.matchtable.RuleBasedPrefilter
-
public class RuleBasedPrefilter extends Object
Rule based pre filter to fetch songs from aPlayList
that roughly match a given set ofScoreRule
s andSongPropertyFilter
s.- Author:
- Hendrik Schreiber
-
-
Constructor Summary
Constructors Constructor Description RuleBasedPrefilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterable<AudioSong>
getPreFilteredSongs(AudioSong template, PlayList playList, Float syncBPM, boolean playMatchesAtSyncTempo, Collection<ScoreRule> scoreRules, Collection<SongFilter> mandatoryFilters)
Returns songs from the database that roughly match the template song.
-
-
-
Method Detail
-
getPreFilteredSongs
public Iterable<AudioSong> getPreFilteredSongs(AudioSong template, PlayList playList, Float syncBPM, boolean playMatchesAtSyncTempo, Collection<ScoreRule> scoreRules, Collection<SongFilter> mandatoryFilters)
Returns songs from the database that roughly match the template song. The database query is executed in theJob.getDefaultJob()
thread. When the executing thread is interrupted, this method returns early with an emptyIterable
.- Parameters:
template
- template songplayList
- playlist to search insyncBPM
- sync bpmplayMatchesAtSyncTempo
- matched songs are meant to be played at the same tempo as the template songscoreRules
- rulesmandatoryFilters
- mandatory filter, e.g. no TV-shows @return song iterable
-
-