Package org.apache.rat.report

Examples of org.apache.rat.report.RatReport


     */
    public static ClaimStatistic report(final IReportable container, final Writer out,
            ReportConfiguration pConfiguration) throws IOException, RatException {
        IXmlWriter writer = new XmlWriter(out);
        final ClaimStatistic statistic = new ClaimStatistic();
        RatReport report = XmlReportFactory.createStandardReport(writer, statistic, pConfiguration);
        report.startReport();
        container.run(report);
        report.endReport();
        writer.closeDocument();
        return statistic;
    }
View Full Code Here


            } catch (RatDocumentAnalysisException e) {
                throw new RatException(e.getMessage(), e);
            }
        }
        for (Object reporter : reporters) {
            final RatReport report = (RatReport) reporter;
            report.report(document);
        }
    }
View Full Code Here

        }
    }

    public void startReport() throws RatException {
        for (Object reporter : reporters) {
            final RatReport report = (RatReport) reporter;
            report.startReport();
        }
    }
View Full Code Here

        }
    }

    public void endReport() throws RatException {
        for (Object reporter : reporters) {
            final RatReport report = (RatReport) reporter;
            report.endReport();
        }
    }
View Full Code Here

        final MockLicenseMatcher mockLicenseMatcher = new MockLicenseMatcher();
        DirectoryWalker directory = new DirectoryWalker(new File(elementsPath), IGNORE_EMPTY);
        final ClaimStatistic statistic = new ClaimStatistic();
        final ReportConfiguration configuration = new ReportConfiguration();
        configuration.setHeaderMatcher(mockLicenseMatcher);
        RatReport report = XmlReportFactory.createStandardReport(writer, statistic, configuration);
        report.startReport();
        report(directory, report);
        report.endReport();
        writer.closeDocument();
        final String output = out.toString();
        assertTrue("Preamble and document element are OK",
                   output.startsWith("<?xml version='1.0'?>" +
                "<rat-report timestamp="));
View Full Code Here

     * @throws RatReportFailedException
     */
    public static void report(final IReportable container, final Writer out, final IHeaderMatcher matcher,
             final ILicenseFamily[] approvedLicenseNames) throws IOException, RatReportFailedException {
        IXmlWriter writer = new XmlWriter(out);
        RatReport report = XmlReportFactory.createStandardReport(writer, matcher, approvedLicenseNames)
        report.startReport();
        container.run(report);
        report.endReport();
        writer.closeDocument();
    }
View Full Code Here

   
    public void testStandardReport() throws Exception {
      final String elementsPath = Resources.getResourceDirectory("elements/Source.java");
        final MockLicenseMatcher mockLicenseMatcher = new MockLicenseMatcher();
        DirectoryWalker directory = new DirectoryWalker(new File(elementsPath), IGNORE_EMPTY);
        RatReport report = XmlReportFactory.createStandardReport(writer, mockLicenseMatcher);
        report.startReport();
        report(directory, report);
        report.endReport();
        writer.closeDocument();
        final String output = out.toString();
        assertEquals(
                "<?xml version='1.0'?>" +
                "<rat-report>" +
View Full Code Here

        final ClaimReporterMultiplexer multiplexer = new ClaimReporterMultiplexer(reporters);
       
        final IDocumentAnalyser analyser =
            DefaultAnalyserFactory.createDefaultAnalyser(multiplexer, matcher);
       
        final RatReport result = new XmlReport(writer, analyser);
        return result;
    }
View Full Code Here

     */
    public static ClaimStatistic report(final IReportable container, final Writer out,
            ReportConfiguration pConfiguration) throws IOException, RatException {
        IXmlWriter writer = new XmlWriter(out);
        final ClaimStatistic statistic = new ClaimStatistic();
        RatReport report = XmlReportFactory.createStandardReport(writer, statistic, pConfiguration);
        report.startReport();
        container.run(report);
        report.endReport();
        writer.closeDocument();
        return statistic;
    }
View Full Code Here

        final MockLicenseMatcher mockLicenseMatcher = new MockLicenseMatcher();
        DirectoryWalker directory = new DirectoryWalker(new File(elementsPath), IGNORE_EMPTY);
        final ClaimStatistic statistic = new ClaimStatistic();
        final ReportConfiguration configuration = new ReportConfiguration();
        configuration.setHeaderMatcher(mockLicenseMatcher);
        RatReport report = XmlReportFactory.createStandardReport(writer, statistic, configuration);
        report.startReport();
        report(directory, report);
        report.endReport();
        writer.closeDocument();
        final String output = out.toString();
        assertEquals(
                "<?xml version='1.0'?>" +
                "<rat-report>" +
View Full Code Here

TOP

Related Classes of org.apache.rat.report.RatReport

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.