1 | package de.uka.ipd.sdq.sensorframework.visualisation.rvisualisation.reports; |
2 | |
3 | import java.util.ArrayList; |
4 | import java.util.Collection; |
5 | |
6 | import de.uka.ipd.sdq.sensorframework.entities.SensorAndMeasurements; |
7 | import de.uka.ipd.sdq.sensorframework.visualisation.rvisualisation.reportitems.IReportItem; |
8 | import de.uka.ipd.sdq.sensorframework.visualisation.rvisualisation.utils.RConnection; |
9 | |
10 | /**Abstract class for R reports. |
11 | * The interface of this class is used by the viewers to access the reports. |
12 | * @author groenda |
13 | */ |
14 | public abstract class RReport { |
15 | |
16 | /**Identifier for subsets of data elements that belong to a single |
17 | * time series element. |
18 | * @see TimeSeries |
19 | * @author groenda |
20 | */ |
21 | public enum TimeseriesData { |
22 | /** The timespan value of the time series data point. */ |
23 | TIMESPAN, |
24 | /** The eventtime value of the time series data point. */ |
25 | EVENTTIME, |
26 | /** Both, the timespan and eventtime, of the time series data point. */ |
27 | BOTH |
28 | } |
29 | |
30 | /**Template method for subclasses to implement. Subclasses can create |
31 | * IReportItems from the given <code>SensorAndMeasurements</code>. They |
32 | * can use the <code>storeMeasurementsInRVector(SensorAndMeasurements, int) |
33 | * </code> to transfer data to R. |
34 | * |
35 | * @param measurements List of the measurements for a sensor. |
36 | * @param rConnection connection to the R engine. |
37 | * @return List of Items. |
38 | */ |
39 | public abstract ArrayList<IReportItem> prepareReportItems( |
40 | Collection<SensorAndMeasurements> measurements, |
41 | RConnection rConnection); |
42 | |
43 | } |