Class HTMLRenderer


  • public class HTMLRenderer
    extends Object
    Renders HTML version of blast-like output.

    Makes an assumption that the gap character is '-', should parameterize. Primary author - Colin Hardman (CAT) Other authors - Tim Dilks (CAT) Simon Brocklehurst (CAT) Stuart Johnston (CAT) Lawerence Bower (CAT) Derek Crockford (CAT) Neil Benn (CAT) Copyright 2001 Cambridge Antibody Technology Group plc. This code released to the biojava project, May 2001 under the LGPL license.

    Version:
    1.0
    Author:
    Cambridge Antibody Technology Group plc, Greg Cox
    • Constructor Detail

      • HTMLRenderer

        public HTMLRenderer​(PrintWriter poPrintWriter,
                            String poStyleDef,
                            int piAlignmentWidth,
                            URLGeneratorFactory poFactory,
                            AlignmentMarker poAlignmentMarker,
                            Properties poOptions)
        Creates an HTMLRenderer, that outputs the HTML to the specified PrintWriter.

        The style definition is expected to defines the following styles

        • footer
        • alignment
        • dbRetrieve
        • titleLevel1
        • titleLevel1Sub
        • titleLevel2
        • titleLevel3
        • titleLevel3Sub
        • titleLevel4
        • summaryBodyLineOdd
        • summaryBodyLineEven
        These URL's are used in two places, in the summary and detail sections. The first URLGenerator is used for the summary, and all for the detail.
        Parameters:
        poPrintWriter - - the output stream to write the HTML to.
        poStyleDef - - definition of styles, if null uses hard coded.
        piAlignmentWidth - width in characters of the alignment regions of output
        poFactory - URLGeneratorFactory provides an array of DatabaseURLGenerators, null for no links
        poAlignmentMarker - - for configurable markup of alignments, for no markup use null.
        poOptions - properties of
    • Method Detail

      • setPrintWriter

        public void setPrintWriter​(PrintWriter poPrintWriter)
        Set the PrintWriter to output the HTML to.
        Parameters:
        poPrintWriter - a PrintWriter
      • wasEmpty

        public boolean wasEmpty()
        Returns true if no HitSummary and no Hit elements were encountered
        Returns:
        boolean - true if no summary of Hit elements where encountered.
      • getHeaderDefinitions

        public String getHeaderDefinitions()
        Returns the appropriate style and javascript definitions for this renderer.
        Returns:
        a String value