com.googlecode.solrgeonames.server
Interface OpenSearchResponse

All Known Implementing Classes:
HtmlDebugResponse, HtmlDetailResponse, HtmlSearchResponse, JsonDetailResponse, JsonSearchResponse

public interface OpenSearchResponse

A response interface that all formats and functions will adhere to.

Author:
Greg Pendlebury

Method Summary
 String contentType()
          Get the content type to return to users for this response
 void init(javax.servlet.http.HttpServletRequest request)
          An initialisation function giving access to the HTTP input.
 String renderEmptyResponse()
          Render a response indicated no results were returned
 String renderError(String message)
          Render an error message response
 String renderResponse(org.apache.solr.client.solrj.response.QueryResponse results)
          Render a valid response to a search result list.
 

Method Detail

init

void init(javax.servlet.http.HttpServletRequest request)
An initialisation function giving access to the HTTP input.

Parameters:
request: - The incoming HTTP request

renderResponse

String renderResponse(org.apache.solr.client.solrj.response.QueryResponse results)
Render a valid response to a search result list.

Parameters:
results: - The results list to render
Returns:
String: The rendered output

renderEmptyResponse

String renderEmptyResponse()
Render a response indicated no results were returned

Returns:
String: The rendered output

renderError

String renderError(String message)
Render an error message response

Parameters:
String: - The message to include in the response
Returns:
String: The rendered output

contentType

String contentType()
Get the content type to return to users for this response

Returns:
String: The MIME type to use


Copyright © 2011. All Rights Reserved.