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>

public final class SyncDefaultRenderer extends Renderer
Author:
Tony Vaagenes
  • Field Details

  • Constructor Details

    • SyncDefaultRenderer

      public SyncDefaultRenderer()
  • Method Details

    • 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.
    • render

      public void render(Writer writer, Result result) throws IOException
      Renders this result
      Specified by:
      render in class Renderer
      Throws:
      IOException
    • renderCoverageAttributes

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

      public void endResult(com.yahoo.text.XMLWriter writer, Result result) throws IOException
      Throws:
      IOException
    • error

      public void error(com.yahoo.text.XMLWriter writer, Result result) throws IOException
      Throws:
      IOException
    • emptyResult

      protected void emptyResult(com.yahoo.text.XMLWriter writer, Result result) throws IOException
      Throws:
      IOException
    • queryContext

      public void queryContext(com.yahoo.text.XMLWriter writer, QueryContext queryContext, Query owner) 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