org.jcoderz.phoenix.report
Class Java2Html

java.lang.Object
  extended by org.jcoderz.phoenix.report.Java2Html

public final class Java2Html
extends Object

TODO: Link to current build TODO: Link to CC home TODO: Add @media printer??? TODO: Refactor, split class.

Author:
Andreas Mandel

Field Summary
static String WIKI_BASE_PROPERTY
          property name for the wiki url prefix.
 
Constructor Summary
Java2Html()
          Constructor.
 
Method Summary
 String getProjectName()
          Returns the name of the project.
static void main(String[] args)
          Main entry point.
 void process()
          Starts the actual generation process.
 void setCoverageData(boolean coverageDataAvailable)
          Sets the flag if coverage data is available and should be taken into account.
 void setCvsBase(String cvsBase)
          Base path (url) to the cvs repository used to create links to the cvs.
 void setCvsSuffix(String suffix)
          Suffix to be added at the end of web vc links.
 void setInputFile(File file)
          The input file containing the jcoderz report.
 void setLoglevel(String loglevel)
          The log level to be used when processing the input.
 void setOutDir(File dir)
          The output directory where the report should be written to.
 void setPackageBase(String packageBase)
          Set the name of the package that should be treated as project "root" package.
 void setProjectHome(File file)
          The base path where the source files can be found.
 void setProjectName(String name)
          Sets the name of the project used as readable string at several places in the report.
 void setSourceCharset(Charset charset)
          Sets the char-set used for the source files.
 void setStyle(String style)
          Sets the css file to be used can be relative to report path or absolute.
 void setTabwidth(String tabWidth)
          Sets the tab with to be used when calculating the position in the current line.
 void setTimestamp(String timestamp)
          Set the timestamp when the report has been initiated.
 void setWikiBase(String wikiBase)
          Base url to the wiki to use.
static String toOddEvenString(int number)
          Returns the string "odd" or "even", depending on the number given.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WIKI_BASE_PROPERTY

public static final String WIKI_BASE_PROPERTY
property name for the wiki url prefix.

See Also:
Constant Field Values
Constructor Detail

Java2Html

public Java2Html()
          throws IOException
Constructor.

Throws:
IOException - In case the current working directory cannot be determined.
Method Detail

main

public static void main(String[] args)
                 throws IOException,
                        JAXBException
Main entry point.

Parameters:
args - The command line arguments.
Throws:
IOException - an io exception occurs.
JAXBException - if the xml can not be parsed.

toOddEvenString

public static String toOddEvenString(int number)
Returns the string "odd" or "even", depending on the number given.

Parameters:
number - the number to check if it'S odd or even.
Returns:
the string "odd" if the given number is odd, "even" otherwise.

setPackageBase

public void setPackageBase(String packageBase)
Set the name of the package that should be treated as project "root" package.

Parameters:
packageBase - the project base package name.

setTimestamp

public void setTimestamp(String timestamp)
Set the timestamp when the report has been initiated.

Parameters:
timestamp - the report creation timestamp.

setCoverageData

public void setCoverageData(boolean coverageDataAvailable)
Sets the flag if coverage data is available and should be taken into account.

Parameters:
coverageDataAvailable - true, if coverage data is available and should be taken into account.

setStyle

public void setStyle(String style)
Sets the css file to be used can be relative to report path or absolute.

Parameters:
style - the css file to be used can be relative to report path or absolute.

setWikiBase

public void setWikiBase(String wikiBase)
Base url to the wiki to use. Finding pages link to a wiki page combined of this url and the finding type.

Parameters:
wikiBase - url to the wiki to use.

setCvsBase

public void setCvsBase(String cvsBase)
Base path (url) to the cvs repository used to create links to the cvs.

Parameters:
cvsBase - url that points to a web cvs of the project.

setCvsSuffix

public void setCvsSuffix(String suffix)
Suffix to be added at the end of web vc links.

Parameters:
suffix - String, to be added at the end of web vc links.

getProjectName

public String getProjectName()
Returns the name of the project.

Returns:
the name of the project.

setProjectName

public void setProjectName(String name)
Sets the name of the project used as readable string at several places in the report.

Parameters:
name - the name of the project used as readable string at several places in the report.

setTabwidth

public void setTabwidth(String tabWidth)
Sets the tab with to be used when calculating the position in the current line.

Parameters:
tabWidth - the tab width to assume in input files.

setLoglevel

public void setLoglevel(String loglevel)
The log level to be used when processing the input. Level must be parseable by Level.parse(String).

Parameters:
loglevel - the log level to set.

setSourceCharset

public void setSourceCharset(Charset charset)
Sets the char-set used for the source files.

Parameters:
charset - The char-set in which the source files are expected.

setProjectHome

public void setProjectHome(File file)
                    throws IOException
The base path where the source files can be found.

Parameters:
file - base path where the source files can be found.
Throws:
IOException - if access to the path fails.

setInputFile

public void setInputFile(File file)
                  throws IOException
The input file containing the jcoderz report.

Parameters:
file - input file containing the jcoderz report.
Throws:
IOException - if access to the file fails.

setOutDir

public void setOutDir(File dir)
               throws IOException
The output directory where the report should be written to. If the directory does not exist it is created.

Parameters:
dir - the output directory where the report should be written to.
Throws:
IOException - if access or creation of the directory fails.

process

public void process()
             throws JAXBException,
                    IOException
Starts the actual generation process.

Throws:
JAXBException - if the xmp parsing fails.
IOException - if a IO problem occurs.


Copyright 2007 The jCoderZ Project.