public static void getHTMLTableForASingleJournal ( QJMStatus status , String journalName , StringBuilder sb ) { List < StatsDescriptor > stats = status . stats . get ( journalName ) ; if ( stats == null ) { return ; } Set < String > statsNames = status . statNames ; // header sb . append ( "<table border=1 align=\"right\" cellpadding=1 " + "cellspacing=0 title=\"Journal statistics\">" ) ; sb . append ( "<thead><tr><td></td>" ) ; for ( StatsDescriptor sd : stats ) { sb . append ( "<td><b>" + sd . journalNode + "</b></td>" ) ; } sb . append ( "</tr></thead>" ) ; // contents for ( String st : statsNames ) { // for each available stat sb . append ( "<tr><td>" + st + "</td>" ) ; // for each available node for ( StatsDescriptor sd : stats ) { sb . append ( "<td align=\"right\">" + getValue ( sd . statsPerJournal , st ) + "</td>" ) ; } sb . append ( "</tr>" ) ; } sb . append ( "</table>" ) ; }
Render html table for a single journal .