public abstract class SectionedRenderer<WRITER> extends Renderer
Constructor and Description |
---|
SectionedRenderer() |
Modifier and Type | Method and Description |
---|---|
private Collection<ErrorMessage> |
asUnmodifiableSearchErrorList(List<com.yahoo.processing.request.ErrorMessage> queryErrors,
ErrorMessage resultError) |
void |
beginGroup(WRITER writer,
Group group)
Same as beginHitGroup, but for Group(grouping api).
|
void |
beginGroupList(WRITER writer,
GroupList groupList)
Same as beginHitGroup, but for GroupList(grouping api).
|
abstract void |
beginHitGroup(WRITER writer,
HitGroup hitGroup)
Called when a HitGroup is encountered.
|
void |
beginHitList(WRITER writer,
HitList hitList)
Same as beginHitGroup, but for HitList(grouping api).
|
abstract void |
beginResult(WRITER writer,
Result result)
Called at the start of rendering.
|
abstract void |
emptyResult(WRITER writer,
Result result)
Called if there are no hits in the result.
|
void |
endGroup(WRITER writer,
Group group)
Same as endHitGroup, but for Group(grouping api).
|
void |
endGroupList(WRITER writer,
GroupList groupList)
Same as endHitGroup, but for GroupList(grouping api).
|
abstract void |
endHitGroup(WRITER writer,
HitGroup hitGroup)
Called after all the children of the HitGroup have been provided to methods of this class.
|
void |
endHitList(WRITER writer,
HitList hitList)
Same as endHitGroup, but for HitList(grouping api).
|
abstract void |
endResult(WRITER writer,
Result result)
Called at the end of rendering.
|
abstract void |
error(WRITER writer,
Collection<ErrorMessage> errorMessages)
Called if there are errors in the result.
|
void |
errorHit(WRITER writer,
ErrorHit errorHit)
Called when an errorHit is encountered.
|
abstract void |
hit(WRITER writer,
Hit hit)
Called when a Hit is encountered.
|
abstract void |
queryContext(WRITER writer,
QueryContext queryContext)
Called if there is a non-null query context for the query of the result.
|
void |
render(Writer writer,
Result result)
Picks apart the result and feeds it to the other methods.
|
private void |
renderHit(WRITER writer,
Hit hit) |
private void |
renderHitGroup(WRITER writer,
HitGroup hitGroup) |
private void |
renderHitGroupContent(WRITER writer,
HitGroup hitGroup) |
private void |
renderResultContent(WRITER writer,
Result result) |
WRITER |
wrapWriter(Writer writer)
Wraps the Writer instance.
|
clone, getCharacterEncoding, getDefaultSummaryClass, getRequestedEncoding, render
public WRITER wrapWriter(Writer writer)
public abstract void beginResult(WRITER writer, Result result) throws IOException
IOException
public abstract void endResult(WRITER writer, Result result) throws IOException
IOException
public abstract void error(WRITER writer, Collection<ErrorMessage> errorMessages) throws IOException
IOException
public abstract void emptyResult(WRITER writer, Result result) throws IOException
IOException
public abstract void queryContext(WRITER writer, QueryContext queryContext) throws IOException
IOException
public abstract void beginHitGroup(WRITER writer, HitGroup hitGroup) throws IOException
IOException
public abstract void endHitGroup(WRITER writer, HitGroup hitGroup) throws IOException
IOException
public abstract void hit(WRITER writer, Hit hit) throws IOException
IOException
public void errorHit(WRITER writer, ErrorHit errorHit) throws IOException
IOException
public void beginGroup(WRITER writer, Group group) throws IOException
IOException
public void endGroup(WRITER writer, Group group) throws IOException
IOException
public void beginGroupList(WRITER writer, GroupList groupList) throws IOException
IOException
public void endGroupList(WRITER writer, GroupList groupList) throws IOException
IOException
public void beginHitList(WRITER writer, HitList hitList) throws IOException
IOException
public void endHitList(WRITER writer, HitList hitList) throws IOException
IOException
public final void render(Writer writer, Result result) throws IOException
render
in class Renderer
IOException
private void renderResultContent(WRITER writer, Result result) throws IOException
IOException
private Collection<ErrorMessage> asUnmodifiableSearchErrorList(List<com.yahoo.processing.request.ErrorMessage> queryErrors, ErrorMessage resultError)
private void renderHitGroup(WRITER writer, HitGroup hitGroup) throws IOException
IOException
private void renderHitGroupContent(WRITER writer, HitGroup hitGroup) throws IOException
IOException
private void renderHit(WRITER writer, Hit hit) throws IOException
IOException
Copyright © 2017. All rights reserved.