final String titleJPQLQueries = "List of JPQL queries";
final String titleSQLQueries = "List of SQL Queries";
final String titleFaults = "List of Faulty Queries";
final Serializer s = new Serializer(project);
final ResultVO result = s.deserialize();
if (result == null) {
getLog().warn("No result found on the output, make sure the translate goal was ran before the report goal");
return;
}
if (result.getPackages().isEmpty()) {
getLog().warn("No packages found in resulting output. Was the plugin correctly configured ? ");
}
final Collection<EntityVO> aggregatedEntities = new TreeSet<EntityVO>();
final Collection<QueryVO> aggregatedQueries = new TreeSet<QueryVO>();
printOutputToDebug(result);
getLog().info("Starting creation of report");
final Sink sink = getSink();
sink.head();
sink.title();
sink.text(getName(null));
sink.title_();
sink.head_();
sink.body();
sink.section1();
sink.sectionTitle1();
sink.text("Report");
sink.sectionTitle1_();
sink.paragraph();
addTitleLink(titleEntitiesPerPackage, sink);
addTitleLink(titleNamesPerEntity, sink);
addTitleLink(titleJPQLQueries, sink);
addTitleLink(titleSQLQueries, sink);
addTitleLink(titleFaults, sink);
sink.paragraph_();
sink.section2();
sink.sectionTitle2();
sink.text("Entities per packages");
sink.sectionTitle2_();
sink.table();
sink.tableRow();
sink.tableHeaderCell();
sink.text("Package");
sink.tableHeaderCell_();
sink.tableHeaderCell();
sink.text("Entities");
sink.tableHeaderCell_();
sink.tableRow_();
for (final PackageVO packge : result.getPackages()) {
sink.tableRow();
sink.tableCell();
sink.text(packge.getName());
sink.tableCell_();
sink.tableCell();