public final class SearchRendererAdaptor extends Renderer
Modifier and Type | Field and Description |
---|---|
private Context |
context |
private LogExceptionUserTemplateDelegator |
templates |
Constructor and Description |
---|
SearchRendererAdaptor(UserTemplate userTemplate) |
Modifier and Type | Method and Description |
---|---|
private <T> Collection<T> |
all(Collection<T> collection,
T extra) |
void |
beginResult(Writer writer,
Result result) |
static void |
callRender(OutputStream stream,
Result result)
A legacy test utility - do not use.
|
void |
emptyResult(Writer writer,
Result result) |
void |
endResult(Writer writer,
Result result) |
void |
error(Writer writer,
Collection<com.yahoo.processing.request.ErrorMessage> errorMessages) |
UserTemplate |
getAdaptee()
For internal use only
|
String |
getDefaultSummaryClass() |
String |
getEncoding() |
String |
getMimeType() |
void |
init() |
void |
queryContext(Writer writer,
QueryContext queryContext) |
void |
render(Writer writer,
Result result)
Renders this result
|
static void |
rendererErrorHitMessageMessage(com.yahoo.text.XMLWriter writer,
ErrorHit errorHit,
com.yahoo.processing.request.ErrorMessage error) |
void |
renderHit(Writer writer,
Hit hit,
int hitno)
Renders this hit as xml.
|
private void |
renderHitGroup(Writer writer,
HitGroup hitGroup,
int hitnumber) |
static void |
renderMessageDefaultErrorHit(com.yahoo.text.XMLWriter writer,
com.yahoo.processing.request.ErrorMessage error) |
private void |
renderRegularHit(Writer writer,
Hit hit,
int hitno) |
static boolean |
simpleRenderDefaultErrorHit(Writer writer,
ErrorHit defaultErrorHit) |
boolean |
simpleRenderErrorHit(Writer writer,
ErrorHit errorHit)
Renders this hit as XML, disregarding the given template.
|
private boolean |
simpleRenderHit(Writer writer,
Hit hit) |
Writer |
wrapWriter(Writer writer) |
clone, getCharacterEncoding, getRequestedEncoding, render
private final LogExceptionUserTemplateDelegator templates
private Context context
public SearchRendererAdaptor(UserTemplate userTemplate)
public void init()
init
in class com.yahoo.processing.rendering.Renderer<Result>
public static void callRender(OutputStream stream, Result result) throws IOException
IOException
public String getEncoding()
getEncoding
in class com.yahoo.processing.rendering.Renderer<Result>
public String getMimeType()
getMimeType
in class com.yahoo.processing.rendering.Renderer<Result>
public String getDefaultSummaryClass()
getDefaultSummaryClass
in class Renderer
public void render(Writer writer, Result result) throws IOException
render
in class Renderer
IOException
private <T> Collection<T> all(Collection<T> collection, T extra)
public void beginResult(Writer writer, Result result) throws IOException
IOException
public void endResult(Writer writer, Result result) throws IOException
IOException
public void error(Writer writer, Collection<com.yahoo.processing.request.ErrorMessage> errorMessages) throws IOException
IOException
public void emptyResult(Writer writer, Result result) throws IOException
IOException
public void queryContext(Writer writer, QueryContext queryContext) throws IOException
IOException
private void renderHitGroup(Writer writer, HitGroup hitGroup, int hitnumber) throws IOException
IOException
public void renderHit(Writer writer, Hit hit, int hitno) throws IOException
writer
- the writer to append this hit toIOException
- if rendering failsprivate void renderRegularHit(Writer writer, Hit hit, int hitno) throws IOException
IOException
private boolean simpleRenderHit(Writer writer, Hit hit) throws IOException
IOException
public static boolean simpleRenderDefaultErrorHit(Writer writer, ErrorHit defaultErrorHit) throws IOException
IOException
public static void renderMessageDefaultErrorHit(com.yahoo.text.XMLWriter writer, com.yahoo.processing.request.ErrorMessage error) throws IOException
IOException
public boolean simpleRenderErrorHit(Writer writer, ErrorHit errorHit) throws IOException
IOException
public static void rendererErrorHitMessageMessage(com.yahoo.text.XMLWriter writer, ErrorHit errorHit, com.yahoo.processing.request.ErrorMessage error) throws IOException
IOException
public UserTemplate getAdaptee()
Copyright © 2018. All rights reserved.