public class SearchFormSettings
extends java.lang.Object
SearchForm
Modifier and Type | Field and Description |
---|---|
static int |
SEARCH_IN_ALL
Specifies, that all fields should be searched.
|
static int |
SEARCH_IN_TITLE
Specifies, that only titles should be searched.
|
static int |
SEARCH_IN_USER_DEFINED
Specifies, that a user-defined set of fields should be searched.
|
Constructor and Description |
---|
SearchFormSettings(java.io.ObjectInputStream in)
Loads a SearchFormSettings instance from a stream.
|
SearchFormSettings(java.lang.String searchText)
Creates a new SearchFormSettings instance.
|
Modifier and Type | Method and Description |
---|---|
ProgramSearcher |
createSearcher()
Creates a searcher from these settings
|
ProgramSearcher |
createSearcher(java.lang.String text)
Creates a searcher from this settings
|
boolean |
getCaseSensitive()
Gets whether to search case sensitive.
|
Channel[] |
getChannels()
Get the Channels to search on
This returns null when all channels should be searched
|
ProgramFieldType[] |
getFieldTypes()
Gets the field types to search for.
|
int |
getNrDays()
Gets the number of days
If this value is negative, it searches all data (including yesterday)
|
int |
getSearcherType()
Gets the searcher type to be used.
|
int |
getSearchIn()
Gets where to search.
|
java.lang.String |
getSearchText()
Gets the search text.
|
ProgramFieldType[] |
getUserDefaultFieldTypes()
Gets the default field types for initially selection.
|
ProgramFieldType[] |
getUserDefinedFieldTypes()
Gets the field types defined by the user.
|
void |
setCaseSensitive(boolean caseSensitive)
Sets whether to search case sensitive.
|
void |
setChannels(Channel[] channel) |
void |
setNrDays(int nr)
Sets the number of days
If this value is negative, it searches all data (including yesterday)
|
void |
setSearcherType(int searcherType)
Sets the searcher type to be used.
|
void |
setSearchIn(int searchIn)
Sets where to search.
|
void |
setSearchText(java.lang.String searchText)
Sets the search text.
|
void |
setUserDefaultFieldTypes(ProgramFieldType[] typeArr)
Sets the default selection field types.
|
void |
setUserDefinedFieldTypes(ProgramFieldType[] typeArr)
Sets the user-defined field types to search for.
|
java.lang.String |
toString()
Gets the search text.
|
void |
writeData(java.io.ObjectOutputStream out)
Writes the settings into a stream
|
public static final int SEARCH_IN_TITLE
public static final int SEARCH_IN_ALL
public static final int SEARCH_IN_USER_DEFINED
public SearchFormSettings(java.lang.String searchText)
searchText
- The search textpublic SearchFormSettings(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
in
- The stream to read fromjava.io.IOException
- If reading failedjava.lang.ClassNotFoundException
- If the read data has the wrong formatwriteData(ObjectOutputStream)
public void writeData(java.io.ObjectOutputStream out) throws java.io.IOException
out
- The stream to write tojava.io.IOException
- If writing failedSearchFormSettings(ObjectInputStream)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getSearchText()
public void setSearchText(java.lang.String searchText)
searchText
- The search textpublic ProgramSearcher createSearcher() throws TvBrowserException
TvBrowserException
- If creating the searcher failed.public ProgramSearcher createSearcher(java.lang.String text) throws TvBrowserException
text
- Search for this TextTvBrowserException
- If creating the searcher failed.public ProgramFieldType[] getFieldTypes()
public ProgramFieldType[] getUserDefaultFieldTypes()
public ProgramFieldType[] getUserDefinedFieldTypes()
public void setUserDefinedFieldTypes(ProgramFieldType[] typeArr)
typeArr
- The field types to search forpublic void setUserDefaultFieldTypes(ProgramFieldType[] typeArr)
typeArr
- The default selection field types.public int getSearchIn()
public void setSearchIn(int searchIn)
searchIn
- Where to searchpublic int getSearcherType()
PluginManager.createProgramSearcher(int, String, boolean)
public void setSearcherType(int searcherType)
searcherType
- The searcher type to be used.PluginManager.createProgramSearcher(int, String, boolean)
public boolean getCaseSensitive()
public void setCaseSensitive(boolean caseSensitive)
caseSensitive
- Whether to search case sensitivepublic int getNrDays()
public void setNrDays(int nr)
nr
- number of days to searchpublic Channel[] getChannels()
public void setChannels(Channel[] channel)
TV-Browser 3.4.4, Copyright (C) 2004-2008 TV-Browser Team (dev@tvbrowser.org)