net.sf.statcvs.output
Class HTMLTagger

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

public class HTMLTagger
extends Object

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

Version:
$Id: HTMLTagger.java,v 1.38 2004/10/12 07:22:42 cyganiak Exp $
Author:
Anja Jentzsch

Constructor Summary
HTMLTagger()
           
 
Method Summary
static String getAuthorLink(Author author)
          Returns HTML code for a link to an author page
static String getDate(Date date)
          Returns HTML code for a date
static String getDateAndTime(Date date)
          Returns HTML code for a date, including time
static String getDirectoryLink(Directory directory)
          Returns HTML code for a directory page link
static String getFileLink(CvsFile file)
          Returns HTML code for a file.
static String getIcon(String iconFilename)
          Generates HTML for an icon
static String getLink(String link, String linkName)
          Creates a HTML representation of a hyperlink
static String getSummaryPeriod(Date startDate, Date endDate)
          generates HTML string describing the summary period of a chart or table
static String getSummaryPeriod(Date startDate, Date endDate, 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 String getLink(String link,
                             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 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 String getDate(Date date)
Returns HTML code for a date

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

getDateAndTime

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

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

getDirectoryLink

public static 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 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 String getSummaryPeriod(Date startDate,
                                      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 String getSummaryPeriod(Date startDate,
                                      Date endDate,
                                      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 String getIcon(String iconFilename)
Generates HTML for an icon

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