1 23 package org.hammurapi.render.dom; 24 25 import org.hammurapi.HammurapiMeasurement; 26 import org.w3c.dom.DOMException ; 27 import org.w3c.dom.Element ; 28 29 import com.pavelvlasov.metrics.MetricRenderer; 30 import com.pavelvlasov.metrics.Metric.Measurement; 31 import com.pavelvlasov.render.RenderRequest; 32 import com.pavelvlasov.render.RenderingException; 33 import com.pavelvlasov.review.SourceMarkerRenderer; 34 35 40 public class HammurapiMetricRenderer extends MetricRenderer { 41 42 45 public HammurapiMetricRenderer(RenderRequest request) { 46 super(request); 47 } 48 49 50 51 55 public HammurapiMetricRenderer(RenderRequest request, String profile) { 56 super(request, profile); 57 } 58 59 protected void renderMeasurement(Measurement ms, Element me) throws DOMException , RenderingException { 60 super.renderMeasurement(ms, me); 61 if (ms instanceof HammurapiMeasurement && ((HammurapiMeasurement) ms).getSource()!=null) { 62 me.appendChild(new SourceMarkerRenderer(new RenderRequest(((HammurapiMeasurement) ms).getSource())).render(me.getOwnerDocument())); 63 } 64 } 65 } 66 | Popular Tags |