Package net.sf.jmd.report

Examples of net.sf.jmd.report.IReport


        IDifference diffLow = new Difference();
        diffLow.setSeverity(Severity.LOW);
        diffLow.setDescription("The class FooImpl has a new private method "
                + "generateStringFromODS");

        IReport report = new Report();
        report.setArchitect("Jan Hinzmann");
        report.setDate(new Date(System.currentTimeMillis()));
        report.add(diffHigh);
        report.add(diffMedium);
        report.add(diffLow);

        IReporter htmlReporter = ReporterFactory.create(ReportStyle.HTML);
        htmlReporter.report(report);// the report is now stored on the harddrive
       
        return report;
View Full Code Here


            logger.info("transforming models into metamodel");
            modi.transformArchitectsModel(MoDi.Language.JAVA);
            modi.transformDevelopersModel(MoDi.Language.JAVA);

            logger.info("evaluating the differences.");
            IReport report = modi.evaluate();
            String projectName = Config.getStringProperty("MoDi.Meta.Project.Name");
           
            report.setArchitect(
                    Config.getStringProperty("MoDi.Meta.Architect"));
           
            report.setArchitectsModelVersion(projectName + ": " + amRoot);
           
            report.setDeveloper(
                    Config.getStringProperty("MoDi.Meta.Developer"));
           
            report.setDevelopersModelVersion(projectName + ": " + dmRoot);

            logger.info("reporting");
            modi.report(report, MoDi.ReportStyle.CONSOLE);
//            modi.report(report, MoDi.ReportStyle.XML);
            modi.report(report, MoDi.ReportStyle.HTML); // html implies xml
           
            logger.info("communicating");
            modi.communicate(report); // communication needs html report
           
            logger.info(report.getDifferences().size() + " differences found.");
            long duration = start + System.currentTimeMillis();
            logger.info("Done (" + duration + " ms).");

        } catch (MoDiException e) {
            System.out.println(e.getMessage());
View Full Code Here

        comparator.add(interfacesAddedCheck);
    }


    public void testInterfacesAdded() {
        IReport report = comparator.evaluate();
        List<IDifference> differences = report.getDifferences();

        assertNotNull("There should be at least an empty list of differences",
                differences);
       
        int actualSize = differences.size();
View Full Code Here

            //transform,
            modi.transformArchitectsModel(MoDi.Language.JAVA);
            modi.transformDevelopersModel(MoDi.Language.JAVA);
           
            //compare,
            IReport report = modi.evaluate();
            log("got report: " + report);
           
            //communicate!
            IReporter reporter = setUpReporter();
           
View Full Code Here

     * @see org.apache.maven.reporting.AbstractMavenReport#executeReport(java.util.Locale)
     */
    @Override
    protected void executeReport(Locale locale) throws MavenReportException {

        IReport jmdReport;
        try {
            jmdReport = getJMDReport();
        } catch (MoDiException e) {
            throw new MavenReportException(e.getMessage(), e);
        }

        // we use Doxia to create our report. See further annotations below.
        Sink sink = getSink();
        sink.head();
        sink.title();
        sink.text(getName(locale));
        sink.title_();
        sink.head_();

        sink.body();
       
        sink.anchor("top");
        sink.anchor_();
       
        sink.section1();
        sink.sectionTitle1();
        sink.text(getName(locale));
        sink.sectionTitle1_();
        sink.paragraph();
        sink.text(this.getBundle(locale).getString("meta.description"));
        sink.lineBreak();
        sink.text("Version: " + this.getProject().getVersion());
        sink.paragraph_();
        sink.section2();
        sink.sectionTitle2();
        sink.text(this.getBundle(locale).getString("meta.title"));
        sink.sectionTitle2_();
        sink.text("Date: " + jmdReport.getDate());
        sink.lineBreak();
        sink.text("Architect: " + jmdReport.getArchitect());
        sink.lineBreak();
        sink.text("Developer: " + jmdReport.getDeveloper());
        sink.lineBreak();
        sink.text("Architects Model: " + jmdReport.getArchitectsModelVersion());
        sink.lineBreak();
        sink.text("Developers Model: " + jmdReport.getDevelopersModelVersion());
        sink.lineBreak();
        sink.lineBreak();
        sink.text("Differences found: " + jmdReport.getDifferences().size());
        sink.section2_();
       
        sink.section2();
        sink.sectionTitle2();
        sink.text(this.getBundle(locale).getString("differences.title"));
View Full Code Here

        getLog().info("transforming models into metamodel");
        modi.transformArchitectsModel(MoDi.Language.JAVA);
        modi.transformDevelopersModel(MoDi.Language.JAVA);

        getLog().info("evaluating the differences.");
        IReport report = modi.evaluate();
        String projectName = Config.getStringProperty("MoDi.Meta.Project.Name");

        report.setArchitect(Config.getStringProperty("MoDi.Meta.Architect"));

        report.setArchitectsModelVersion(projectName + ": " + amRoot);

        report.setDeveloper(Config.getStringProperty("MoDi.Meta.Developer"));

        report.setDevelopersModelVersion(projectName + ": " + dmRoot);

        return report;
    }
View Full Code Here

TOP

Related Classes of net.sf.jmd.report.IReport

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.