Package com.yahoo.search.rendering
Class SyncDefaultRenderer
java.lang.Object
com.yahoo.component.AbstractComponent
com.yahoo.processing.rendering.Renderer<Result>
com.yahoo.search.rendering.Renderer
com.yahoo.search.rendering.SyncDefaultRenderer
- All Implemented Interfaces:
com.yahoo.component.Component
,com.yahoo.component.Deconstructable
,Cloneable
,Comparable<com.yahoo.component.Component>
- Author:
- Tony Vaagenes
-
Nested Class Summary
-
Field Summary
Fields inherited from class com.yahoo.component.AbstractComponent
isDeconstructable
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
emptyResult
(com.yahoo.text.XMLWriter writer, Result result) void
void
void
init()
void
queryContext
(com.yahoo.text.XMLWriter writer, QueryContext queryContext, Query owner) void
Renders this resultprotected static void
renderCoverageAttributes
(Coverage coverage, com.yahoo.text.XMLWriter writer) void
Renders this hit as xml.static void
renderMessageDefaultErrorHit
(com.yahoo.text.XMLWriter writer, ErrorMessage error) static boolean
simpleRenderDefaultErrorHit
(com.yahoo.text.XMLWriter writer, ErrorHit defaultErrorHit) Methods inherited from class com.yahoo.search.rendering.Renderer
clone, getCharacterEncoding, getRequestedEncoding, renderResponse
Methods inherited from class com.yahoo.component.AbstractComponent
compareTo, deconstruct, getClassName, getId, getIdString, hasInitializedId, initId, isDeconstructable, setIsDeconstructable, toString
-
Field Details
-
DEFAULT_MIMETYPE
- See Also:
-
DEFAULT_ENCODING
- See Also:
-
-
Constructor Details
-
SyncDefaultRenderer
public SyncDefaultRenderer()
-
-
Method Details
-
init
public void init()- Overrides:
init
in classcom.yahoo.processing.rendering.Renderer<Result>
-
getEncoding
- Specified by:
getEncoding
in classcom.yahoo.processing.rendering.Renderer<Result>
-
getMimeType
- Specified by:
getMimeType
in classcom.yahoo.processing.rendering.Renderer<Result>
-
getDefaultSummaryClass
- Overrides:
getDefaultSummaryClass
in classRenderer
- Returns:
- The summary class to fill the hits with if no summary class was specified in the query presentation.
-
render
Renders this result- Specified by:
render
in classRenderer
- Throws:
IOException
-
renderCoverageAttributes
protected static void renderCoverageAttributes(Coverage coverage, com.yahoo.text.XMLWriter writer) throws IOException - Throws:
IOException
-
endResult
- Throws:
IOException
-
error
- Throws:
IOException
-
emptyResult
- Throws:
IOException
-
queryContext
public void queryContext(com.yahoo.text.XMLWriter writer, QueryContext queryContext, Query owner) throws IOException - Throws:
IOException
-
renderHit
Renders this hit as xml. The default implementation will call the simpleRender() hook. If it returns true, nothing more is done, otherwise the given template set will be used for rendering.- Parameters:
writer
- the XMLWriter to append this hit to- Throws:
IOException
- if rendering fails
-
simpleRenderDefaultErrorHit
public static boolean simpleRenderDefaultErrorHit(com.yahoo.text.XMLWriter writer, ErrorHit defaultErrorHit) throws IOException - Throws:
IOException
-
renderMessageDefaultErrorHit
public static void renderMessageDefaultErrorHit(com.yahoo.text.XMLWriter writer, ErrorMessage error) throws IOException - Throws:
IOException
-