Class Reporter.Output

java.lang.Object
org.apache.rat.Reporter.Output
Enclosing class:
Reporter

public static final class Reporter.Output extends Object
The output from a report run.
  • Method Details

    • builder

      public static Reporter.Output.Builder builder()
    • getDocument

      public Document getDocument()
      Gets the document that was generated during execution.
      Returns:
      the document that was generated during execution.
    • getStatistic

      public ClaimStatistic getStatistic()
      Get the claim statistics from the run.
      Returns:
      the claim statistics.
    • getConfiguration

      public ReportConfiguration getConfiguration()
    • format

      public void format(ReportConfiguration config) throws RatException
      Formats the report to the output and using the stylesheet found in the report configuration.
      Parameters:
      config - the RAT report configuration.
      Throws:
      RatException - on error.
    • format

      public void format(org.apache.commons.io.function.IOSupplier<InputStream> stylesheet, org.apache.commons.io.function.IOSupplier<OutputStream> output) throws RatException
      Formats the report to the specified output using the stylesheet. It is safe to call this method more than once in order to generate multiple reports from the same run.
      Parameters:
      stylesheet - the style sheet to use for XSLT formatting.
      output - the output stream to write to.
      Throws:
      RatException - on error.
    • listLicenses

      public void listLicenses(PrintWriter printWriter, LicenseSetFactory.LicenseFilter filter)
      Lists the licenses on the print writer.
      Parameters:
      printWriter - the print writer to write to.
      filter - the license filter that specifies which licenses to output.
    • listLicenses

      public void listLicenses(LicenseSetFactory.LicenseFilter filter) throws IOException
      Lists the licenses on the output specified in the configuration.
      Parameters:
      filter - the license filter that specifies which licenses to output.
      Throws:
      IOException - if PrintWriter can not be retrieved from configuration.
    • writeSummary

      public void writeSummary(Appendable appendable) throws IOException
      Writes a text summary of issues with the run.
      Parameters:
      appendable - the appendable to write to.
      Throws:
      IOException - on error.