Class SyncDefaultRenderer

  • All Implemented Interfaces:
    com.yahoo.component.Component, com.yahoo.component.Deconstructable, Cloneable, Comparable<com.yahoo.component.Component>

    public final class SyncDefaultRenderer
    extends Renderer
    Author:
    Tony Vaagenes
    • Constructor Detail

      • SyncDefaultRenderer

        public SyncDefaultRenderer()
    • Method Detail

      • init

        public void init()
        Overrides:
        init in class com.yahoo.processing.rendering.Renderer<Result>
      • getEncoding

        public String getEncoding()
        Specified by:
        getEncoding in class com.yahoo.processing.rendering.Renderer<Result>
      • getMimeType

        public String getMimeType()
        Specified by:
        getMimeType in class com.yahoo.processing.rendering.Renderer<Result>
      • getDefaultSummaryClass

        public String getDefaultSummaryClass()
        Overrides:
        getDefaultSummaryClass in class Renderer
        Returns:
        The summary class to fill the hits with if no summary class was specified in the query presentation.
      • renderCoverageAttributes

        protected static void renderCoverageAttributes​(Coverage coverage,
                                                       com.yahoo.text.XMLWriter writer)
                                                throws IOException
        Throws:
        IOException
      • renderHit

        public void renderHit​(com.yahoo.text.XMLWriter writer,
                              Hit hit,
                              int hitno)
                       throws IOException
        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