log.info("transforming models into metamodel");
modi.transformArchitectsModel(MoDi.Language.JAVA);
modi.transformDevelopersModel(MoDi.Language.JAVA);
log.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);
log.info("reporting");
modi.report(report, modi.getReportStyle(Config.getStringProperty("MoDi.Report.Style")));
// modi.report(report, MoDi.ReportStyle.XML);
// modi.report(report, MoDi.ReportStyle.HTML); // html implies xml
boolean doCommunicate = Boolean.parseBoolean(Config.getStringProperty("MoDi.do.communicate"));
log.debug("communicate?: " + doCommunicate);
if ( doCommunicate ) {
log.info("communicating");
modi.communicate(report); // communication needs html report
}
log.info(report.getDifferences().size() + " differences found.");
long duration = start + System.currentTimeMillis();
log.info("Done (" + duration + " ms).");
} catch (MoDiException e) {
log.error(e.getMessage());