Package eu.clarin.sru.server
Interface SRUSearchEngine
-
- All Known Implementing Classes:
SRUSearchEngineBase
public interface SRUSearchEngineInterface for connecting the SRU protocol implementation to an actual search engine.Implementing the
explain(SRUServerConfig, SRURequest, SRUDiagnosticList)andscan(SRUServerConfig, SRURequest, SRUDiagnosticList)is optional, but implementingsearch(SRUServerConfig, SRURequest, SRUDiagnosticList)is mandatory.The implementation of these methods must be thread-safe.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SRUExplainResultexplain(SRUServerConfig config, SRURequest request, SRUDiagnosticList diagnostics)Handle an explain operation.SRUScanResultSetscan(SRUServerConfig config, SRURequest request, SRUDiagnosticList diagnostics)Handle a scan operation.SRUSearchResultSetsearch(SRUServerConfig config, SRURequest request, SRUDiagnosticList diagnostics)Handle a searchRetrieve operation.
-
-
-
Method Detail
-
explain
SRUExplainResult explain(SRUServerConfig config, SRURequest request, SRUDiagnosticList diagnostics) throws SRUException
Handle an explain operation. Implementing this method is optional, but is required, if the writeExtraResponseData block of the SRU response needs to be filled. The arguments for this operation are provides by theSRURequestobject.The implementation of this method must be thread-safe.
- Parameters:
config- theSRUEndpointConfigobject that contains the endpoint configurationrequest- theSRURequestobject that contains the request made to the endpointdiagnostics- theSRUDiagnosticListobject for storing non-fatal diagnostics- Returns:
- a
SRUExplainResultobject ornullif the search engine does not want to provide writeExtraResponseData - Throws:
SRUException- if an fatal error occurred- See Also:
SRUExplainResult
-
search
SRUSearchResultSet search(SRUServerConfig config, SRURequest request, SRUDiagnosticList diagnostics) throws SRUException
Handle a searchRetrieve operation. Implementing this method is mandatory. The arguments for this operation are provides by theSRURequestobject.The implementation of this method must be thread-safe.
- Parameters:
config- theSRUEndpointConfigobject that contains the endpoint configurationrequest- theSRURequestobject that contains the request made to the endpointdiagnostics- theSRUDiagnosticListobject for storing non-fatal diagnostics- Returns:
- a
SRUSearchResultSetobject - Throws:
SRUException- if an fatal error occurred- See Also:
SRURequest,SRUExplainResult
-
scan
SRUScanResultSet scan(SRUServerConfig config, SRURequest request, SRUDiagnosticList diagnostics) throws SRUException
Handle a scan operation. Implementing this method is optional. If you don't need to handle the scan operation, just returnnulland the SRU server will return the appropiate diagnostic to the client. The arguments for this operation are provides by theSRURequestobject.The implementation of this method must be thread-safe.
- Parameters:
config- theSRUEndpointConfigobject that contains the endpoint configurationrequest- theSRURequestobject that contains the request made to the endpointdiagnostics- theSRUDiagnosticListobject for storing non-fatal diagnostics- Returns:
- a
SRUScanResultSetobject ornullif this operation is not supported by this search engine - Throws:
SRUException- if an fatal error occurred- See Also:
SRUExplainResult
-
-