net.sf.statcvs.output
Class HTMLTagger

java.lang.Object
  extended bynet.sf.statcvs.output.HTMLTagger

public class HTMLTagger
extends java.lang.Object

//TODO: lots of duplicate code here and in HTMLPage

Version:
$Id: HTMLTagger.java,v 1.25 2003/03/26 21:05:32 cyganiak Exp $
Author:
Anja Jentzsch

Constructor Summary
HTMLTagger()
           
 
Method Summary
static java.lang.String getBoldText(java.lang.String text)
          Returns bolded HTML code for a given String
static java.lang.String getImage(java.lang.String image)
          Returns HTML code for a image tag
static java.lang.String getImage(java.lang.String image, int width, int height)
          Returns HTML code for a image tag
static java.lang.String getImageWithBorder(java.lang.String image)
          Returns HTML code for a image tag with a border around the image.
static java.lang.String getImageWithoutBorder(java.lang.String image)
          Returns HTML code for a image tag without a border around the image.
static java.lang.String getLink(java.lang.String link, java.lang.String linkName)
          Creates a HTML representation of a hyperlink
static java.lang.String getModuleLink(java.lang.String moduleName)
          Returns HTML code for a modulePage link tag
static java.lang.String getModulePageName(java.lang.String moduleName)
          Returns code for a modulePage name
static java.lang.String getSummaryPeriod(java.util.Date startDate, java.util.Date endDate)
          generates HTML string describing the summary period of a chart or table
static java.lang.String getSummaryPeriod(java.util.Date startDate, java.util.Date endDate, java.lang.String additionalText)
          generates HTML string describing the summary period of a chart or table
static java.lang.String getUserLink(java.lang.String userName)
          Returns HTML code for a userPage link tag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLTagger

public HTMLTagger()
Method Detail

getLink

public static java.lang.String getLink(java.lang.String link,
                                       java.lang.String linkName)
Creates a HTML representation of a hyperlink

Parameters:
link - URL
linkName - Name of the Link
Returns:
String HTML code of the hyperlink

getBoldText

public static java.lang.String getBoldText(java.lang.String text)
Returns bolded HTML code for a given String

Parameters:
text - Text to bolden
Returns:
String HTML code

getImageWithBorder

public static java.lang.String getImageWithBorder(java.lang.String image)
Returns HTML code for a image tag with a border around the image.

Parameters:
image - URL of the Image to be hyperlinked
Returns:
String HTML code for the image tag

getImageWithoutBorder

public static java.lang.String getImageWithoutBorder(java.lang.String image)
Returns HTML code for a image tag without a border around the image.

Parameters:
image - URL of the Image to be hyperlinked
Returns:
String HTML code for the image tag

getImage

public static java.lang.String getImage(java.lang.String image)
Returns HTML code for a image tag

Parameters:
image - URL of the Image to be hyperlinked
Returns:
HTML code for the image tag

getImage

public static java.lang.String getImage(java.lang.String image,
                                        int width,
                                        int height)
Returns HTML code for a image tag

Parameters:
image - URL of the Image to be hyperlinked
width - width of the Image to be hyperlinked
height - height of the Image to be hyperlinked
Returns:
HTML code for the image tag

getUserLink

public static java.lang.String getUserLink(java.lang.String userName)
Returns HTML code for a userPage link tag

Parameters:
userName - userName to be tagged
Returns:
HTML code for the userPage link tag

getModuleLink

public static java.lang.String getModuleLink(java.lang.String moduleName)
Returns HTML code for a modulePage link tag

Parameters:
moduleName - modulePage to be tagged
Returns:
HTML code for the modulePage link tag

getModulePageName

public static java.lang.String getModulePageName(java.lang.String moduleName)
Returns code for a modulePage name

Parameters:
moduleName - modulePage
Returns:
modulePage name

getSummaryPeriod

public static java.lang.String getSummaryPeriod(java.util.Date startDate,
                                                java.util.Date endDate)
generates HTML string describing the summary period of a chart or table

Parameters:
startDate - start date of the period
endDate - end date of the period
Returns:
HTML string

getSummaryPeriod

public static java.lang.String getSummaryPeriod(java.util.Date startDate,
                                                java.util.Date endDate,
                                                java.lang.String additionalText)
generates HTML string describing the summary period of a chart or table

Parameters:
startDate - start date of the period
endDate - end date of the period
additionalText - additional text, added to the output string
Returns:
HTML string