net.sf.statcvs.output
Class HTMLTagger

java.lang.Object
  extended by net.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.36 2003/06/16 23:20:15 cyganiak Exp $
Author:
Anja Jentzsch

Constructor Summary
HTMLTagger()
           
 
Method Summary
static java.lang.String getAuthorLink(Author author)
          Returns HTML code for a link to an author page
static java.lang.String getDate(java.util.Date date)
          Returns HTML code for a date
static java.lang.String getDateAndTime(java.util.Date date)
          Returns HTML code for a date, including time
static java.lang.String getDirectoryLink(Directory directory)
          Returns HTML code for a directory page link
static java.lang.String getFileLink(CvsFile file)
          Returns HTML code for a file.
static java.lang.String getIcon(java.lang.String iconFilename)
          Generates HTML for an icon
static java.lang.String getLink(java.lang.String link, java.lang.String linkName)
          Creates a HTML representation of a hyperlink
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
 
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

getAuthorLink

public static java.lang.String getAuthorLink(Author author)
Returns HTML code for a link to an author page

Parameters:
author - the author
Returns:
HTML code for the link

getDate

public static java.lang.String getDate(java.util.Date date)
Returns HTML code for a date

Parameters:
date - the date
Returns:
HTML code for the date

getDateAndTime

public static java.lang.String getDateAndTime(java.util.Date date)
Returns HTML code for a date, including time

Parameters:
date - the date
Returns:
HTML code for the date

getDirectoryLink

public static java.lang.String getDirectoryLink(Directory directory)
Returns HTML code for a directory page link

Parameters:
directory - a directory
Returns:
HTML code for the link

getFileLink

public static java.lang.String getFileLink(CvsFile file)
Returns HTML code for a file. If connected to a web repository, it will be a link. Otherwise, just the filename.

Parameters:
file - a file
Returns:
HTML code for the file

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

getIcon

public static java.lang.String getIcon(java.lang.String iconFilename)
Generates HTML for an icon

Parameters:
iconFilename - an icon filename (HTMLOutput.XXXX_ICON constants)
Returns:
HTML string