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
Nested Classes -
Field Summary
FieldsFields inherited from class com.yahoo.component.AbstractComponent
isDeconstructable -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidemptyResult(com.yahoo.text.XMLWriter writer, Result result) voidvoidvoidinit()voidqueryContext(com.yahoo.text.XMLWriter writer, QueryContext queryContext, Query owner) voidRenders this resultprotected static voidrenderCoverageAttributes(Coverage coverage, com.yahoo.text.XMLWriter writer) voidRenders this hit as xml.static voidrenderMessageDefaultErrorHit(com.yahoo.text.XMLWriter writer, ErrorMessage error) static booleansimpleRenderDefaultErrorHit(com.yahoo.text.XMLWriter writer, ErrorHit defaultErrorHit) Methods inherited from class com.yahoo.search.rendering.Renderer
clone, getCharacterEncoding, getRequestedEncoding, renderResponseMethods 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:
initin classcom.yahoo.processing.rendering.Renderer<Result>
-
getEncoding
- Specified by:
getEncodingin classcom.yahoo.processing.rendering.Renderer<Result>
-
getMimeType
- Specified by:
getMimeTypein classcom.yahoo.processing.rendering.Renderer<Result>
-
getDefaultSummaryClass
- Overrides:
getDefaultSummaryClassin 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:
renderin 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
-