Remove dead code. (#553)

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
This commit is contained in:
Kai Zimmermann
2017-07-10 09:32:28 +02:00
committed by GitHub
parent 8c82a18994
commit 74868e111a
6 changed files with 0 additions and 318 deletions

View File

@@ -1,36 +0,0 @@
/**
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.hawkbit.repository.report.model;
import java.io.Serializable;
/**
* An abstract report series.
*/
public class AbstractReportSeries implements Serializable {
private static final long serialVersionUID = 1L;
private final String name;
/**
* @param name
* the name of the series
*/
public AbstractReportSeries(final String name) {
this.name = name;
}
/**
* @return the name of the series
*/
public String getName() {
return name;
}
}

View File

@@ -1,67 +0,0 @@
/**
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.hawkbit.repository.report.model;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Stream;
/**
* A data report series which contains a list of {@link DataReportSeriesItem}.
*
*
*
* @param <T>
* the type of the report series item
*/
public class DataReportSeries<T extends Serializable> extends AbstractReportSeries {
private static final long serialVersionUID = 1L;
private final List<DataReportSeriesItem<T>> data = new ArrayList<>();
/**
* @param name
* the name of data series
*/
public DataReportSeries(final String name) {
super(name);
}
/**
* Constructs a ListSeries with the given series name and array of values.
*
* @param name
* the name of the data series
* @param values
* data report series item for this data series.
*/
public DataReportSeries(final String name, final List<DataReportSeriesItem<T>> values) {
this(name);
setData(values);
}
private void setData(final List<DataReportSeriesItem<T>> values) {
data.clear();
data.addAll(values);
}
/**
* @return An array of the numeric values
*/
@SuppressWarnings("unchecked")
public DataReportSeriesItem<T>[] getData() {
return data.toArray(new DataReportSeriesItem[data.size()]);
}
public Stream<DataReportSeriesItem<T>> getDataStream() {
return data.stream();
}
}

View File

@@ -1,51 +0,0 @@
/**
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.hawkbit.repository.report.model;
import java.io.Serializable;
/**
* An data report series item which contains a type and a value.
*
*
*
* @param <T>
* the type of the report series item
*/
public class DataReportSeriesItem<T extends Serializable> implements Serializable {
private static final long serialVersionUID = 1L;
private final T type;
private final Number data;
/**
* @param type
* the type of the data report series item
* @param data
* the data of the report series item
*/
public DataReportSeriesItem(final T type, final Number data) {
this.type = type;
this.data = data;
}
/**
* @return the type of the data report item
*/
public T getType() {
return type;
}
/**
* @return the data of the data report item
*/
public Number getData() {
return data;
}
}

View File

@@ -1,52 +0,0 @@
/**
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.hawkbit.repository.report.model;
import java.io.Serializable;
/**
* A double data series which contains an inner and an outer series ideal for
* showing donut charts.
*
*
*
* @param <T>
* The type parameter for the report series data
*/
public class InnerOuterDataReportSeries<T extends Serializable> implements Serializable {
private static final long serialVersionUID = 1L;
private final DataReportSeries<T> innerSeries;
private final DataReportSeries<T> outerSeries;
/**
* @param innerSeries
* the innerseries of an circle donut chart
* @param outerSeries
* the outer series of an donut chart
*/
public InnerOuterDataReportSeries(final DataReportSeries<T> innerSeries, final DataReportSeries<T> outerSeries) {
this.innerSeries = innerSeries;
this.outerSeries = outerSeries;
}
/**
* @return the innerSeries
*/
public DataReportSeries<T> getInnerSeries() {
return innerSeries;
}
/**
* @return the outerSeries
*/
public DataReportSeries<T> getOuterSeries() {
return outerSeries;
}
}

View File

@@ -1,61 +0,0 @@
/**
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.hawkbit.repository.report.model;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* A simple list report series which just contains a list of values of a report.
*/
public class ListReportSeries extends AbstractReportSeries {
private static final long serialVersionUID = 1L;
private final List<Number> data = new ArrayList<>();
/**
* @param name
* the name of the list report series
*/
public ListReportSeries(final String name) {
super(name);
}
/**
* Constructs a ListSeries with the given series name and array of values.
*
* @param name
* the name of the list report series
* @param values
* the values of the list report series
*/
public ListReportSeries(final String name, final Number... values) {
this(name);
setData(values);
}
/**
* Sets the values in the list series to the ones provided.
*
* @param values
*/
private void setData(final Number... values) {
data.clear();
Collections.addAll(data, values);
}
/**
* @return An array of the numeric values
*/
public Number[] getData() {
return data.toArray(new Number[data.size()]);
}
}

View File

@@ -1,51 +0,0 @@
/**
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.hawkbit.repository.report.model;
/**
* A series time enum definition for {@link DataReportSeriesItem}s.
*
*
*
*
*/
public enum SeriesTime {
/**
* hour.
*/
HOUR,
/**
* day.
*/
DAY,
/**
* week.
*/
WEEK,
/**
* month.
*/
MONTH,
/**
* year.
*/
YEAR,
/**
* more than one year.
*/
MORE_THAN_YEAR,
/**
* never.
*/
NEVER;
}