1 23 24 package org.hammurapi.render.dom; 25 26 import org.hammurapi.results.ReviewResults; 27 import org.w3c.dom.Document ; 28 import org.w3c.dom.Element ; 29 30 import com.pavelvlasov.jsel.util.CompilationUnitRenderer; 31 import com.pavelvlasov.render.RenderRequest; 32 import com.pavelvlasov.render.RenderingException; 33 import com.pavelvlasov.render.dom.AbstractRenderer; 34 import com.pavelvlasov.render.dom.DomRenderer; 35 36 41 public class ReviewResultsRenderer extends AbstractRenderer { 42 43 public ReviewResultsRenderer(RenderRequest request) { 44 super(request); 45 } 46 47 public Element render(Document document) throws RenderingException { 48 ReviewResults reviewResult=(ReviewResults) request.getRenderee(); 49 Element resultsElement=document.createElement("review"); 50 DomRenderer rr=DetailedResultsRenderer.newRenderer(new RenderRequest(reviewResult)); 51 resultsElement.appendChild(rr.render(document)); 52 rr=new CompilationUnitRenderer(new RenderRequest(reviewResult.getCompilationUnit())); 53 resultsElement.appendChild(rr.render(document)); 54 return resultsElement; 55 } 56 } 57 | Popular Tags |