org.biojava.bio.program.blast2html
Class HTMLRenderer

java.lang.Object
  extended by org.biojava.bio.program.blast2html.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. All Rights Reserved. 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 Summary
HTMLRenderer(PrintWriter poPrintWriter, String poStyleDef, int piAlignmentWidth, URLGeneratorFactory poFactory, AlignmentMarker poAlignmentMarker, Properties poOptions)
          Creates an HTMLRenderer, that outputs the HTML to the specified PrintWriter.
 
Method Summary
 String getHeaderDefinitions()
          Returns the appropriate style and javascript definitions for this renderer.
 void setPrintWriter(PrintWriter poPrintWriter)
          Set the PrintWriter to output the HTML to.
 boolean wasEmpty()
          Returns true if no HitSummary and no Hit elements were encountered
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

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