EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.sensorframework.visualisation.rvisualisation.reportitems]

COVERAGE SUMMARY FOR SOURCE FILE [TimeSeriesReportItem.java]

nameclass, %method, %block, %line, %
TimeSeriesReportItem.java0%   (0/1)0%   (0/3)0%   (0/84)0%   (0/19)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class TimeSeriesReportItem0%   (0/1)0%   (0/3)0%   (0/84)0%   (0/19)
TimeSeriesReportItem (String, String): void 0%   (0/1)0%   (0/10)0%   (0/4)
TimeSeriesReportItem (String, int, int, int, String): void 0%   (0/1)0%   (0/13)0%   (0/4)
generatePlotCommand (): String 0%   (0/1)0%   (0/61)0%   (0/12)

1package de.uka.ipd.sdq.sensorframework.visualisation.rvisualisation.reportitems;
2 
3import org.eclipse.core.runtime.IStatus;
4 
5import de.uka.ipd.sdq.sensorframework.visualisation.rvisualisation.RVisualisationPlugin;
6 
7public class TimeSeriesReportItem extends AbstractPlotReportItem {
8        
9        /** Default label for the x axis. */
10        public static final String DEFAULT_X_AXIS_LABEL = "";
11        
12        /** Label of the x axis. */
13        private String xAxisLabel = DEFAULT_X_AXIS_LABEL;
14 
15        public TimeSeriesReportItem(String title, final String xAxisLabel) {
16                super(title);
17                this.xAxisLabel = xAxisLabel;
18        }
19 
20        public TimeSeriesReportItem(final String title, final int height, 
21                        final int width, final int fontSize, final String xAxisLabel) {
22                super(title, height, width, fontSize);
23                this.xAxisLabel = xAxisLabel;
24        }
25        
26        /**
27         * Plots the first data set against the second. Expects to find 
28         * the measured values in the first set and the 
29         * measurements number or event time in the second. 
30         */
31        @Override
32        protected String generatePlotCommand() {
33                String rCommand = "";
34                
35                String[] dataSeries = getDataSeries();
36                
37                if (dataSeries.length > 1){
38                        
39                        String xDataId = dataSeries[1];
40                        String yDataId = dataSeries[0];
41                        
42                        String xDataName = getDataCommand(xDataId);
43                        String yDataName = getDataCommand(yDataId);
44                        
45                        rCommand = "plot("+xDataName +", "+yDataName+ ", main=\"" + getDescription() + "\", " 
46                                + "title=\"Histogram\", "
47                                + "xlab=\"" + xAxisLabel + "\", " + "ylab=\"Value\")\n";
48                        
49                } else {
50                        RVisualisationPlugin.log(IStatus.ERROR,"Internal Error: Less than two measurements in data for time series.");
51                }
52 
53                return rCommand;
54        }
55 
56}

[all classes][de.uka.ipd.sdq.sensorframework.visualisation.rvisualisation.reportitems]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov