|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.toalango.qzarch.SearchEngineConfig
This configuration object is passed on to the search engine as an argument to one of the constructors of the engine.
Most of the configurable settings have defaults in order to minimize the need of configuring the engine if it is used without any particular customisation needs.
Field Summary | |
static java.lang.String |
DEFAULT_DIRECTORY_LARGE_ICONS
|
static java.lang.String |
DEFAULT_DIRECTORY_SMALL_ICONS
|
static java.lang.String |
DEFAULT_ICON
The file name of the default icons |
static java.lang.String |
INIT_CASE_SENSITIVE
|
static java.lang.String |
INIT_EXCLUDE_BASE
|
static java.lang.String |
INIT_EXCLUDE_BASES
|
static java.lang.String |
INIT_EXPRESSION_SUPPORT
|
static java.lang.String |
INIT_EXTRACT_TITLES
|
static java.lang.String |
INIT_FILE_TYPE
|
static java.lang.String |
INIT_FILE_TYPES
|
static java.lang.String |
INIT_ICONS
|
static java.lang.String |
INIT_ICONS_LARGE
|
static java.lang.String |
INIT_ICONS_SMALL
|
static java.lang.String |
INIT_MOUNTED_ROOT
The mounted-root is the complete path to the document root directory. |
static java.lang.String |
INIT_RELATIVE_ROOT
The root-relative-to-servlet is used to produce links to the documents in the result list and the icons. |
static java.lang.String |
INIT_SEARCH_BASE
The search-base can be used if the search engine is going to be configured with one single directory as the search base. |
static java.lang.String |
INIT_SEARCH_BASES
The search-bases can be used to configure the search engine with multiple search base directories. |
Constructor Summary | |
SearchEngineConfig()
|
Method Summary | |
void |
addExcludeBase(java.lang.String pDirectoryName)
Add an exclude base directory for the searches. |
void |
addSearchBase(java.lang.String pDirectoryName)
Add a base directory for the searches. |
java.io.File[] |
getExcludeBases()
Getter method for the base directories for the searches. |
java.lang.String[] |
getFileTypes()
Getter method for the file types that this instance of the serarch engine is configured to use by default if the calling client doesn't pass on this argument in the calls. |
java.util.Map |
getLargeIcons()
|
java.io.File |
getMountedRootDirectory()
Getter method for the directory mounted as the document root. |
java.lang.String |
getResourcePath(java.io.File pFile)
This method maps the physical file name to the resource path required by the web server. |
java.lang.String |
getRootRelativeToServlet()
Returns the relative path from the virtual directory of the search servlet to the mounted root without a trailing slash. |
java.io.File[] |
getSearchBases()
Getter method for the base directories for the searches. |
java.util.Map |
getSmallIcons()
|
boolean |
isCaseSensitive()
Will the searches be performed case-sensitive by default unless the case-sensitive argument is passed together with the search call? |
boolean |
isExtractingTitles()
Getter method for the propety whether to extract titles for the known file type or not. |
boolean |
isSupportingExpressions()
Getter method for the expression support property. |
void |
setCaseSensitive(boolean pCaseSensitive)
Setter method for the case sensitive property |
void |
setExtractingTitles(boolean pExtractingTitles)
Setter method for the extraction of titles from the source files in the result set. |
void |
setFileTypes(java.lang.String[] pFileTypes)
Setter method for the file types that this instance of the serarch engine going to use by default if the calling client doesn't pass on this argument in the calls. |
void |
setLargeIconsLocation(java.io.File pDirectory)
Setter method for the large icons directory. |
void |
setMountedRootDirectory(java.io.File pMountedRootDirectory)
Setter method for the directory mounted as the document root. |
void |
setRootRelativeToServlet(java.lang.String pRootRelativeToServlet)
|
void |
setSmallIconsLocation(java.io.File pDirectory)
Setter method for the small icons directory. |
void |
setSupportingExpressions(boolean pSupportingExpressions)
Setter method for the expression support property. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String INIT_MOUNTED_ROOT
public static final java.lang.String INIT_RELATIVE_ROOT
http://my.domain.com/servlet/search
has search
as
a virtual directory. The relative path to the mounted root is thus
../
, which is the default setting if the configuration is
omitted.
public static final java.lang.String INIT_SEARCH_BASE
public static final java.lang.String INIT_SEARCH_BASES
INIT_SEARCH_BASE
,
Constant Field Valuespublic static final java.lang.String INIT_EXCLUDE_BASE
public static final java.lang.String INIT_EXCLUDE_BASES
public static final java.lang.String INIT_CASE_SENSITIVE
public static final java.lang.String INIT_EXPRESSION_SUPPORT
public static final java.lang.String INIT_FILE_TYPE
public static final java.lang.String INIT_FILE_TYPES
public static final java.lang.String INIT_ICONS
public static final java.lang.String INIT_ICONS_SMALL
public static final java.lang.String INIT_ICONS_LARGE
public static final java.lang.String DEFAULT_DIRECTORY_SMALL_ICONS
public static final java.lang.String DEFAULT_DIRECTORY_LARGE_ICONS
public static final java.lang.String INIT_EXTRACT_TITLES
public static final java.lang.String DEFAULT_ICON
Constructor Detail |
public SearchEngineConfig()
Method Detail |
public void setMountedRootDirectory(java.io.File pMountedRootDirectory)
pMountedRootDirectory
- The value of this propertypublic java.io.File getMountedRootDirectory()
public void setRootRelativeToServlet(java.lang.String pRootRelativeToServlet)
public java.lang.String getRootRelativeToServlet()
public void setFileTypes(java.lang.String[] pFileTypes)
pFileTypes
- public java.lang.String[] getFileTypes()
public void addSearchBase(java.lang.String pDirectoryName)
pDirectoryName
- The name of the directory to
be included as a search base for this instancepublic java.io.File[] getSearchBases()
public java.io.File[] getExcludeBases()
public void addExcludeBase(java.lang.String pDirectoryName)
pDirectoryName
- The name of the directory to
be included as an exclude base for this instancepublic void setCaseSensitive(boolean pCaseSensitive)
pCaseSensitive
- true
or
false
public boolean isCaseSensitive()
true
if the search engine is configured
to perform case sensitive searches by default, otherwise
false
public void setSupportingExpressions(boolean pSupportingExpressions)
pSupportingExpressions
- are simple AND
and
OR
expressions supported?public boolean isSupportingExpressions()
AND
and
OR
expressions supported?public void setExtractingTitles(boolean pExtractingTitles)
pExtractingTitles
- the value of the propertypublic boolean isExtractingTitles()
public void setSmallIconsLocation(java.io.File pDirectory)
The small icons are supposed to be 16x16 pixels, in transparent .gif format.
pDirectory
- The directory where all the
small icons are to be foundpublic void setLargeIconsLocation(java.io.File pDirectory)
The large icons are supposed to be 32x32 pixels, in transparent .gif format.
pDirectory
- The directory where all the
large icons are to be foundpublic java.lang.String getResourcePath(java.io.File pFile)
The path returned by this method can be used directly to reference documents that are visible for the end-users. It is used for both documents in the result set and the assosiated icons.
pFile
- The physical file
public java.util.Map getSmallIcons()
public java.util.Map getLargeIcons()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |