public abstract class AbstractSearcher extends Object implements ProgramSearcher
Modifier and Type | Field and Description |
---|---|
protected boolean |
mReplaceSpCh
Indicates if the special characters should be replaced.
|
Constructor and Description |
---|
AbstractSearcher() |
Modifier and Type | Method and Description |
---|---|
boolean |
matches(Program prog,
ProgramFieldType[] fieldArr)
Checks whether a field of a program matches to the criteria of this
searcher.
|
protected abstract boolean |
matches(String value)
Checks whether a value matches to the criteria of this searcher.
|
Program[] |
search(ProgramFieldType[] fieldArr,
Date startDate,
int nrDays,
Channel[] channels,
boolean sortByStartTime)
Searches the TV database for programs that match the criteria of this
searcher.
|
Program[] |
search(ProgramFieldType[] fieldArr,
Date startDate,
int nrDays,
Channel[] channels,
boolean sortByStartTime,
ProgressMonitor progress)
Searches the TV database for programs that match the criteria of this
searcher.
|
Program[] |
search(ProgramFieldType[] fieldArr,
Date startDate,
int nrDays,
Channel[] channels,
boolean sortByStartTime,
ProgressMonitor progress,
DefaultListModel listModel)
Searches the TV database for programs that match the criteria of this
searcher.
|
protected boolean mReplaceSpCh
public boolean matches(Program prog, ProgramFieldType[] fieldArr)
matches
in interface ProgramSearcher
prog
- The program to check.fieldArr
- The fields to search in.public Program[] search(ProgramFieldType[] fieldArr, Date startDate, int nrDays, Channel[] channels, boolean sortByStartTime, ProgressMonitor progress)
search
in interface ProgramSearcher
fieldArr
- The fields to search instartDate
- The date to start the search.nrDays
- The number of days to include after the start date. If
negative every day get's searched (from yesterday to 4 weeks into the
future)channels
- The channels to search in.sortByStartTime
- Should the results be sorted by the start time?
If not, the results will be grouped by date and channel and the
search will be faster.progress
- progress monitor for monitoring the status of the searchpublic Program[] search(ProgramFieldType[] fieldArr, Date startDate, int nrDays, Channel[] channels, boolean sortByStartTime, ProgressMonitor progress, DefaultListModel listModel)
search
in interface ProgramSearcher
fieldArr
- The fields to search instartDate
- The date to start the search.nrDays
- The number of days to include after the start date. If
negative every day get's searched (from yesterday to 4 weeks into the
future)channels
- The channels to search in.sortByStartTime
- Should the results be sorted by the start time?
If not, the results will be grouped by date and channel and the
search will be faster.progress
- progress monitor for monitoring the status of the searchlistModel
- The list model the found programs should be stored in.public Program[] search(ProgramFieldType[] fieldArr, Date startDate, int nrDays, Channel[] channels, boolean sortByStartTime)
search
in interface ProgramSearcher
fieldArr
- The fields to search instartDate
- The date to start the search.nrDays
- The number of days to include after the start date. If
negative every day get's searched (from yesterday to 4 weeks into the
future)channels
- The channels to search in.sortByStartTime
- Should the results be sorted by the start time?
If not, the results will be grouped by date and channel and the
search will be faster.protected abstract boolean matches(String value)
value
- The value to checkTV-Browser 2.7.6, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)