org.carrot2.source
Class SimpleSearchEngine
java.lang.Object
org.carrot2.core.ProcessingComponentBase
org.carrot2.source.SearchEngineBase
org.carrot2.source.SimpleSearchEngine
- All Implemented Interfaces:
- IDocumentSource, IProcessingComponent
- Direct Known Subclasses:
- PubMedDocumentSource, RemoteXmlSimpleSearchEngineBase
public abstract class SimpleSearchEngine
- extends SearchEngineBase
A base class facilitating implementation of IDocumentSources wrapping external
search engines with remote/ network-based interfaces. This implementation assumes that
all requested results can be fetched from the search engine using one request.
- See Also:
MultipageSearchEngine
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleSearchEngine
public SimpleSearchEngine()
fetchSearchResponse
protected abstract SearchEngineResponse fetchSearchResponse()
throws Exception
- Requests and returns results from the underlying search engine.
- Throws:
Exception - in case of problems with the underlying search engine
process
public void process()
throws ProcessingException
- Description copied from interface:
IProcessingComponent
- Performs the processing required to fulfill the request. This method is called once
per request.
- Specified by:
process in interface IProcessingComponent- Overrides:
process in class ProcessingComponentBase
- Throws:
ProcessingException - when processing failed. If thrown, the
IProcessingComponent.afterProcessing() method will be called and the component will
be ready to accept further requests or to be disposed of. Finally, the
exception will be rethrown from the controller method that caused the
component to perform processing.
Copyright (c) Dawid Weiss, Stanislaw Osinski