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

COVERAGE SUMMARY FOR SOURCE FILE [TimeSpanToTimeSeriesAdapter.java]

nameclass, %method, %block, %line, %
TimeSpanToTimeSeriesAdapter.java0%   (0/1)0%   (0/2)0%   (0/37)0%   (0/9)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class TimeSpanToTimeSeriesAdapter0%   (0/1)0%   (0/2)0%   (0/37)0%   (0/9)
TimeSpanToTimeSeriesAdapter (SensorAndMeasurements): void 0%   (0/1)0%   (0/6)0%   (0/3)
getAdaptedObject (): Object 0%   (0/1)0%   (0/31)0%   (0/6)

1package de.uka.ipd.sdq.sensorframework.adapter;
2 
3import de.uka.ipd.sdq.codegen.simudatavisualisation.datatypes.TimeSeries;
4import de.uka.ipd.sdq.sensorframework.entities.Measurement;
5import de.uka.ipd.sdq.sensorframework.entities.SensorAndMeasurements;
6import de.uka.ipd.sdq.sensorframework.entities.TimeSpanMeasurement;
7 
8/**Adapter for TimeSpanSensor to TimeSeries.
9 * @author groenda
10 */
11public class TimeSpanToTimeSeriesAdapter extends DataAdapter {
12 
13//        private FilteredMeasurementsCollection measurements;
14//        private static final String ACTIVEDE_FILTERS = "ACTIVEDE_FILTERS";
15        /** Information about the TimeSpanSensor and the measurements. */
16        private SensorAndMeasurements samInformation;
17 
18        /** Initializes the adapter with the provided TimeSpanSensor.
19         * @param samInformation Information about the TimeSpanSensor 
20         *        and the measurements.
21         */
22        public TimeSpanToTimeSeriesAdapter(
23                        final SensorAndMeasurements samInformation) {
24                super();
25                this.samInformation = samInformation;
26        }
27 
28        /** {@inheritDoc}
29         */
30        public Object getAdaptedObject() {
31                TimeSeries series = 
32                        new TimeSeries(samInformation.getSensor().getSensorName());
33                for (Measurement m : samInformation.getMeasurements()) {
34                        series.add(m.getMeasurementID(), ((TimeSpanMeasurement) m)
35                                        .getTimeSpan());
36                }
37                return series;
38        }
39}

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