railo.runtime.search
Class SearchEngineSupport

java.lang.Object
  extended by railo.runtime.search.SearchEngineSupport
All Implemented Interfaces:
SearchEngine
Direct Known Subclasses:
LuceneSearchEngine

public abstract class SearchEngineSupport
extends Object
implements SearchEngine


Field Summary
 
Fields inherited from interface railo.runtime.search.SearchEngine
ALLOW_OVERWRITE, DENY_OVERWRITE
 
Constructor Summary
SearchEngineSupport()
           
 
Method Summary
 SearchCollection createCollection(String name, Resource path, String language, boolean allowOverwrite)
          Creates a new Collection and Store it (creating always a spellindex)
 SearchCollection getCollectionByName(String name)
          returns a collection by name
 Query getCollectionsAsQuery()
           
 Resource getDirectory()
           
abstract  String getDisplayName()
           
 Element getIndexElement(Element collElement, String id)
          return XML Element Matching index id
 LogAndSource getLogger()
           
 void init(Config config, Resource searchDir, LogAndSource log)
          constructor of the class
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchEngineSupport

public SearchEngineSupport()
Method Detail

init

public void init(Config config,
                 Resource searchDir,
                 LogAndSource log)
          throws SAXException,
                 IOException,
                 SearchException
Description copied from interface: SearchEngine
constructor of the class

Specified by:
init in interface SearchEngine
searchDir - directory where the railo xml file is
Throws:
SAXException
IOException
SearchException
See Also:
SearchEngine.init(railo.runtime.config.Config, railo.commons.io.res.Resource, railo.commons.io.log.LogAndSource)

getCollectionByName

public final SearchCollection getCollectionByName(String name)
                                           throws SearchException
Description copied from interface: SearchEngine
returns a collection by name

Specified by:
getCollectionByName in interface SearchEngine
Parameters:
name - name of the desired collection (case insensitive)
Returns:
returns lucene collection object matching name
Throws:
SearchException - if no matching Collection exist
See Also:
SearchEngine.getCollectionByName(java.lang.String)

getCollectionsAsQuery

public final Query getCollectionsAsQuery()
Specified by:
getCollectionsAsQuery in interface SearchEngine
Returns:
returns all collections as a query object
See Also:
SearchEngine.getCollectionsAsQuery()

createCollection

public final SearchCollection createCollection(String name,
                                               Resource path,
                                               String language,
                                               boolean allowOverwrite)
                                        throws SearchException
Description copied from interface: SearchEngine
Creates a new Collection and Store it (creating always a spellindex)

Specified by:
createCollection in interface SearchEngine
Parameters:
name - The Name of the Collection
path - the path to store
language - The language of the collection
Returns:
New SearchCollection
Throws:
SearchException
See Also:
SearchEngine.createCollection(java.lang.String, railo.commons.io.res.Resource, java.lang.String, boolean)

getDirectory

public Resource getDirectory()
Specified by:
getDirectory in interface SearchEngine
Returns:
returns the directory of the search storage
See Also:
SearchEngine.getDirectory()

getLogger

public LogAndSource getLogger()
Specified by:
getLogger in interface SearchEngine
Returns:
returns the logfile of the search storage
See Also:
SearchEngine.getLogger()

getIndexElement

public Element getIndexElement(Element collElement,
                               String id)
Description copied from interface: SearchEngine
return XML Element Matching index id

Specified by:
getIndexElement in interface SearchEngine
Parameters:
collElement - XML Collection Element
Returns:
XML Element
See Also:
SearchEngine.getIndexElement(org.w3c.dom.Element, java.lang.String)

getDisplayName

public abstract String getDisplayName()
Specified by:
getDisplayName in interface SearchEngine
Returns:
returns the Name of the search engine to display in admin
See Also:
SearchEngine.getDisplayName()


Copyright © 2012 Railo