uk.ac.ebi.intact.application.search2.struts.view.html
Class HtmlBuilderManager

java.lang.Object
  |
  +--uk.ac.ebi.intact.application.search2.struts.view.html.HtmlBuilderManager

public class HtmlBuilderManager
extends java.lang.Object

This class gives the access to the HtmlBuilder methods by calling the appropriate one according to the objects (one or a collection) given.

If you give:

- a single object (e.g. Experiment), the method HtmlBuilder (Experiment) will be called
- a collection of object (e.g. Interaction) the method HtmlBuilder (Interaction) will be called iteratively on each item of the given collection.

This is a singleton class.

Version:
$Id: HtmlBuilderManager.java,v 1.6 2004/01/31 11:41:34 skerrien Exp $
Author:
Samuel Kerrien (skerrien@ebi.ac.uk)

Field Summary
protected static org.apache.log4j.Logger logger
           
 
Method Summary
 void getChunkIndexHtml(java.io.Writer writer, AnnotatedObject object, java.util.Set highlights, java.lang.String link, java.lang.String contextPath, int currentChunk, int maxChunk, int objectCount, java.lang.String chunkedObjectType)
           
 void getHtml(java.io.Writer writer, java.util.Collection objects, java.util.Set highlights, java.lang.String link, java.lang.String contextPath)
          Write the HTML code related the the collection of object given in the the writer.
 void getHtml(java.io.Writer writer, java.lang.Object object, java.util.Set highlights, java.lang.String link, java.lang.String contextPath)
          Write the HTML code related the the single object given in the the writer.
static HtmlBuilderManager getInstance()
          Returns the only instance of this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final transient org.apache.log4j.Logger logger
Method Detail

getInstance

public static HtmlBuilderManager getInstance()
Returns the only instance of this class.

Returns:
the only instance of this class; always non null value is returned.

getHtml

public void getHtml(java.io.Writer writer,
                    java.util.Collection objects,
                    java.util.Set highlights,
                    java.lang.String link,
                    java.lang.String contextPath)
             throws java.lang.NoSuchMethodException,
                    java.lang.reflect.InvocationTargetException,
                    java.lang.IllegalAccessException
Write the HTML code related the the collection of object given in the the writer. It highlights all string given in the highlights set and integrates link as an help link.

Parameters:
writer - where to write the produced HTML code
objects - the collection of object to convert in HTML
highlights - which String to highlight in the HTML content
link - where is the help page.
Throws:
java.lang.NoSuchMethodException - if the method called by reflexion is not yet implemented
java.lang.reflect.InvocationTargetException - If an exception occured in the method called by reflexion.
java.lang.IllegalAccessException

getHtml

public void getHtml(java.io.Writer writer,
                    java.lang.Object object,
                    java.util.Set highlights,
                    java.lang.String link,
                    java.lang.String contextPath)
             throws java.lang.NoSuchMethodException,
                    java.lang.reflect.InvocationTargetException,
                    java.lang.IllegalAccessException
Write the HTML code related the the single object given in the the writer. It highlights all string given in the highlights set and integrates link as an help link.

Parameters:
writer - where to write the produced HTML code
object - the single object to convert in HTML
highlights - which String to highlight in the HTML content
link - where is the help page.
Throws:
java.lang.NoSuchMethodException - if the method called by reflexion is not yet implemented
java.lang.reflect.InvocationTargetException - If an exception occured in the method called by reflexion.
java.lang.IllegalAccessException

getChunkIndexHtml

public void getChunkIndexHtml(java.io.Writer writer,
                              AnnotatedObject object,
                              java.util.Set highlights,
                              java.lang.String link,
                              java.lang.String contextPath,
                              int currentChunk,
                              int maxChunk,
                              int objectCount,
                              java.lang.String chunkedObjectType)
                       throws java.io.IOException
Parameters:
writer -
object -
highlights -
link -
contextPath -
currentChunk -
maxChunk -
java.io.IOException


IntAct Project - EMBL-EBI 2004 - intact-help@ebi.ac.uk