Package org.apache.rat
Class Report
- java.lang.Object
-
- org.apache.rat.Report
-
public class Report extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
baseDirectory
private static java.lang.String
EXCLUDE_CLI
private static java.lang.String
EXCLUDE_FILE_CLI
private static java.lang.String
HELP
private java.io.FilenameFilter
inputFileFilter
private static java.lang.String
STYLESHEET_CLI
-
Constructor Summary
Constructors Modifier Constructor Description private
Report(java.lang.String baseDirectory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description private static org.apache.commons.cli.Options
buildOptions()
private IReportable
getDirectory(java.io.PrintStream out)
static void
main(java.lang.String[] args)
(package private) static java.io.FilenameFilter
parseExclusions(java.util.List<java.lang.String> excludes)
private static void
printUsage(org.apache.commons.cli.Options opts)
ClaimStatistic
report(java.io.PrintStream out)
Deprecated.usereport(PrintStream, ReportConfiguration)
insteadstatic void
report(java.io.PrintStream out, IReportable base, java.io.InputStream style, ReportConfiguration pConfiguration)
Output a report that is styled using a defined stylesheet.ClaimStatistic
report(java.io.PrintStream out, ReportConfiguration configuration)
static ClaimStatistic
report(java.io.Writer out, IReportable base, java.io.InputStream style, ReportConfiguration pConfiguration)
Output a report that is styled using a defined stylesheet.static ClaimStatistic
report(IReportable container, java.io.Writer out, ReportConfiguration pConfiguration)
void
setInputFileFilter(java.io.FilenameFilter inputFileFilter)
Sets the current filter used to select files.void
styleReport(java.io.PrintStream out)
Deprecated.usestyleReport(PrintStream, ReportConfiguration)
insteadvoid
styleReport(java.io.PrintStream out, ReportConfiguration configuration)
Output a report in the default style and default license header matcher.
-
-
-
Field Detail
-
EXCLUDE_CLI
private static final java.lang.String EXCLUDE_CLI
- See Also:
- Constant Field Values
-
EXCLUDE_FILE_CLI
private static final java.lang.String EXCLUDE_FILE_CLI
- See Also:
- Constant Field Values
-
STYLESHEET_CLI
private static final java.lang.String STYLESHEET_CLI
- See Also:
- Constant Field Values
-
HELP
private static final java.lang.String HELP
- See Also:
- Constant Field Values
-
baseDirectory
private final java.lang.String baseDirectory
-
inputFileFilter
private java.io.FilenameFilter inputFileFilter
-
-
Method Detail
-
main
public static final void main(java.lang.String[] args) throws java.lang.Exception
- Throws:
java.lang.Exception
-
parseExclusions
static java.io.FilenameFilter parseExclusions(java.util.List<java.lang.String> excludes) throws java.io.IOException
- Throws:
java.io.IOException
-
buildOptions
private static org.apache.commons.cli.Options buildOptions()
-
printUsage
private static void printUsage(org.apache.commons.cli.Options opts)
-
setInputFileFilter
public void setInputFileFilter(java.io.FilenameFilter inputFileFilter)
Sets the current filter used to select files.- Parameters:
inputFileFilter
- filter, or null when no filter has been set
-
report
@Deprecated public ClaimStatistic report(java.io.PrintStream out) throws java.lang.Exception
Deprecated.usereport(PrintStream, ReportConfiguration)
instead- Parameters:
out
- - the output stream to receive the styled report- Returns:
- the currently collected numerical statistics.
- Throws:
java.lang.Exception
- in case of errors.
-
report
public ClaimStatistic report(java.io.PrintStream out, ReportConfiguration configuration) throws java.lang.Exception
- Parameters:
out
- - the output stream to receive the styled reportconfiguration
- - current configuration options.- Returns:
- the currently collected numerical statistics.
- Throws:
java.lang.Exception
- in case of errors.- Since:
- Rat 0.8
-
getDirectory
private IReportable getDirectory(java.io.PrintStream out)
-
styleReport
@Deprecated public void styleReport(java.io.PrintStream out) throws java.lang.Exception
Deprecated.usestyleReport(PrintStream, ReportConfiguration)
insteadOutput a report in the default style and default license header matcher.- Parameters:
out
- - the output stream to receive the styled report- Throws:
java.lang.Exception
- in case of errors.
-
styleReport
public void styleReport(java.io.PrintStream out, ReportConfiguration configuration) throws java.lang.Exception
Output a report in the default style and default license header matcher.- Parameters:
out
- - the output stream to receive the styled reportconfiguration
- the configuration to use- Throws:
java.lang.Exception
- in case of errors.- Since:
- Rat 0.8
-
report
public static void report(java.io.PrintStream out, IReportable base, java.io.InputStream style, ReportConfiguration pConfiguration) throws java.io.IOException, javax.xml.transform.TransformerConfigurationException, java.lang.InterruptedException, RatException
Output a report that is styled using a defined stylesheet.- Parameters:
out
- the stream to write the report tobase
- the files or directories to report onstyle
- an input stream representing the stylesheet to use for styling the reportpConfiguration
- current report configuration.- Throws:
java.io.IOException
- in case of I/O errors.javax.xml.transform.TransformerConfigurationException
- in case of XML errors.java.lang.InterruptedException
- in case of threading errors.RatException
- in case of internal errors.
-
report
public static ClaimStatistic report(java.io.Writer out, IReportable base, java.io.InputStream style, ReportConfiguration pConfiguration) throws java.io.IOException, javax.xml.transform.TransformerConfigurationException, java.lang.InterruptedException, RatException
Output a report that is styled using a defined stylesheet.- Parameters:
out
- the writer to write the report tobase
- the files or directories to report onstyle
- an input stream representing the stylesheet to use for styling the reportpConfiguration
- current report configuration.- Returns:
- the currently collected numerical statistics.
- Throws:
java.io.IOException
- in case of I/O errors.javax.xml.transform.TransformerConfigurationException
- in case of XML errors.java.lang.InterruptedException
- in case of threading errors.RatException
- in case of internal errors.
-
report
public static ClaimStatistic report(IReportable container, java.io.Writer out, ReportConfiguration pConfiguration) throws java.io.IOException, RatException
- Parameters:
container
- the files or directories to report onout
- the writer to write the report topConfiguration
- current report configuration.- Returns:
- the currently collected numerical statistics.
- Throws:
java.io.IOException
- in case of I/O errors.RatException
- in case of internal errors.
-
-