|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.grcomputing.opencms.search.lucene.SearchParameters
This class retrieves/sets parameters for searching.
Field Summary |
Fields inherited from interface net.grcomputing.opencms.search.lucene.I_XmlConfigConstants |
ATTR_ENABLED, ATTR_LOCATION, ATTR_NAME, ELE_ANALYZER, ELE_CLASS, ELE_DIRECTORIES, ELE_DIRECTORY, ELE_DOC_FACTORIES, ELE_EXTENSION, ELE_FILE_TYPE, ELE_INDEX_DIR, ELE_JSP_DOC_FACTORY, ELE_MERGE_FACTOR, ELE_PAGE_DOC_FACTORY, ELE_PERM_CHECK, ELE_PLAIN_DOC_FACTORY, ELE_PROJECT, ELE_SECTION, ELE_SUBSEARCH, ELE_XML_TEMPLATE_DOC_FACTORY, LUCENE_SEARCH_ELEMENT |
Constructor Summary | |
SearchParameters(CmsObject cmso)
This method constructs a new SearchParameters by retrieving configuration data from the current system registry. |
Method Summary | |
java.lang.String |
getAnalyzerName()
Returns the classname of the appropropriate analyzer. |
java.util.HashMap |
getDirectories()
Returns HashMap of (String dirPath, String enabled). |
java.lang.String |
getIndexPath()
Returns the path that Lucene should use for creating indexes. |
I_DocumentFactory |
getJspDocumentFactory()
returns an instance of a jsp-specific DocumentFactory. |
protected org.w3c.dom.Element |
getLuceneSearchElement(org.w3c.dom.Element sys)
Gets the right node from the system element. |
int |
getMergeFactor()
returns the mergeFactor for the indexer. |
I_DocumentFactory |
getPageDocumentFactory()
returns an instance of a page-specific DocumentFactory. |
I_DocumentFactory |
getPlainDocumentFactory(CmsFile f)
Using CmsFile, return the appropriate DocumentFactory. |
java.util.ArrayList |
getPlainExtensionMappings()
Get the extension mappings for Plain DocumentFactories. |
java.lang.String |
getProject()
Returns the project that the indexer ought to index against. |
I_DocumentFactory |
getXmlTemplateDocumentFactory()
returns an instance of an XMLTemplate-specific DocumentFactory. |
boolean |
isUsingJspDocumentFactory()
Returns true if the DocumentFactory is enabled for this type. |
boolean |
isUsingPageDocumentFactory()
Returns true if the DocumentFactory is enabled for this type. |
boolean |
isUsingPlainDocumentFactory()
Returns true if the DocumentFactory is enabled for this type. |
boolean |
isUsingXmlTemplateDocumentFactory()
Returns true if the DocumentFactory is enabled for this type. |
boolean |
needsSecurityCheck()
Returns true if global viewing permissions should be checked before making the index. |
boolean |
needsSubsearch()
Get the value of global subsearching. |
protected void |
readConfig()
Reads the config information and stores it. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SearchParameters(CmsObject cmso) throws CmsException
CmsException
- if it can't get the registry or there is no search
config present in the registry.Method Detail |
public boolean isUsingPageDocumentFactory()
public boolean isUsingPlainDocumentFactory()
public boolean isUsingJspDocumentFactory()
public boolean isUsingXmlTemplateDocumentFactory()
public boolean needsSubsearch()
public boolean needsSecurityCheck()
public int getMergeFactor()
public java.lang.String getProject()
public java.lang.String getAnalyzerName()
public java.lang.String getIndexPath()
public java.util.HashMap getDirectories()
public I_DocumentFactory getPageDocumentFactory()
public I_DocumentFactory getJspDocumentFactory()
public I_DocumentFactory getXmlTemplateDocumentFactory()
public I_DocumentFactory getPlainDocumentFactory(CmsFile f) throws CmsException
If the extension is not handled by any ExtensionMaps, then the file ought to be left out of the search index (or you ought to fix your config files/write a new DocumentFactory)
CmsException
- if it can't get the right class loaded.public java.util.ArrayList getPlainExtensionMappings()
The ArrayList returned contains ExtensionMapping objects, which map file extensions to the appropriate DocumentFactory. Use these mappings to get the correct DocumentFactory for a plain-type document.
If none of this makes sense to yoou, use the getPlainDocumentFactory method.
ExtensionMapping
protected org.w3c.dom.Element getLuceneSearchElement(org.w3c.dom.Element sys)
protected void readConfig() throws CmsException
CmsException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |