Class Report


  • public class Report
    extends java.lang.Object
    • Field Detail

      • EXCLUDE_FILE_CLI

        private static final java.lang.String EXCLUDE_FILE_CLI
        See Also:
        Constant Field Values
      • baseDirectory

        private final java.lang.String baseDirectory
      • inputFileFilter

        private java.io.FilenameFilter inputFileFilter
    • Constructor Detail

      • Report

        private Report​(java.lang.String baseDirectory)
    • 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
        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 report
        configuration - - 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
        Output 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 report
        configuration - 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 to
        base - the files or directories to report on
        style - an input stream representing the stylesheet to use for styling the report
        pConfiguration - 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 to
        base - the files or directories to report on
        style - an input stream representing the stylesheet to use for styling the report
        pConfiguration - 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 on
        out - the writer to write the report to
        pConfiguration - 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.