Loading DataAccessAPI/src/main/java/cz/muni/fi/lasaris/sbms/data/api/DataPointsEndpoint.java +3 −3 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ import cz.muni.fi.lasaris.sbms.data.entities.Address; import cz.muni.fi.lasaris.sbms.data.entities.values.RawValue; import cz.muni.fi.lasaris.sbms.data.logic.ProviderManager; import cz.muni.fi.lasaris.sbms.data.logic.DataCollector; import cz.muni.fi.lasaris.sbms.data.util.Aggregations; import cz.muni.fi.lasaris.sbms.data.util.Aggregator; Loading Loading @@ -77,7 +77,7 @@ public class DataPointsEndpoint { logger.debug(json); SnapshotRequest readSpecs = m.readValue(json, SnapshotRequest.class); logger.debug(readSpecs); return dc.getDataPointsAggregation(readSpecs, Aggregations.getAggregation(agg), allowCache(cache)); return dc.getDataPointsAggregation(readSpecs, Aggregator.getAggregation(agg), allowCache(cache)); } catch (IOException e) { return AggregationResponse.getErrorResponse("Unable to parse query:" + e); } Loading Loading @@ -119,7 +119,7 @@ public class DataPointsEndpoint { logger.debug(json); GroupedSnapshotRequest readSpecs = m.readValue(json, GroupedSnapshotRequest.class); logger.debug(readSpecs); AggregationResponse result = dc.getDataPointGroupAggregations(readSpecs, Aggregations.getAggregation(agg), allowCache(cache)); AggregationResponse result = dc.getDataPointGroupAggregations(readSpecs, Aggregator.getAggregation(agg), allowCache(cache)); logger.debug(result); return result; } catch (IOException e) { Loading DataAccessAPI/src/main/java/cz/muni/fi/lasaris/sbms/data/logic/DataCollector.java +3 −3 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ import cz.muni.fi.lasaris.sbms.data.entities.AggregationFunction; import cz.muni.fi.lasaris.sbms.data.entities.containers.Snapshot; import cz.muni.fi.lasaris.sbms.data.entities.values.AggregatedValue; import cz.muni.fi.lasaris.sbms.data.entities.values.RawValue; import cz.muni.fi.lasaris.sbms.data.util.Aggregations; import cz.muni.fi.lasaris.sbms.data.util.Aggregator; Loading Loading @@ -175,14 +175,14 @@ NavigableMap<String, SnapshotRequest> protocols = readSpecs.getProtocols(); Map<String, AggregatedValue> result = new LinkedHashMap<String, AggregatedValue>(); for(String group : data.keySet()) { AggregatedValue value = Aggregations.computeAggregation(data.get(group).getData(), aggregation); AggregatedValue value = Aggregator.computeAggregation(data.get(group).getData(), aggregation); result.put(group, value); } return result; } private AggregatedValue computeAggregation(Map<Address, RawValue> data, AggregationFunction aggregation) { return Aggregations.computeAggregation(data, aggregation); return Aggregator.computeAggregation(data, aggregation); } } ProviderInterfaces/pom.xml +6 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,12 @@ <scope>test</scope> </dependency> <dependency> <groupId>com.cronutils</groupId> <artifactId>cron-utils</artifactId> <version>5.0.5</version> </dependency> </dependencies> <build> Loading ProviderInterfaces/src/main/java/cz/muni/fi/lasaris/sbms/data/entities/AggregationFunction.java +4 −4 Original line number Diff line number Diff line Loading @@ -7,14 +7,14 @@ public enum AggregationFunction { WEIGHTED_AVG, WEIGHTED_TEMPORAL_AVG, MEDIAN, // TEMPORAL_MEDIAN, // WEIGHTED_MEDIAN, // WIGHTED_TEMPORAL_MEDIAN, MIN, MAX, SUM, COUNT, AND, OR, RATIO RATIO, WEIGHTED_RATIO, TEMPORAL_RATIO, WEIGHTED_TEMPORAL_RATIO } ProviderInterfaces/src/main/java/cz/muni/fi/lasaris/sbms/data/entities/containers/CompositeDataContainer.java +3 −3 Original line number Diff line number Diff line Loading @@ -15,8 +15,8 @@ public abstract class CompositeDataContainer<L, D> { } public CompositeDataContainer(Map<L,D> data) { container = new LinkedHashMap<L, D>(); container.putAll(data); container = data; //new LinkedHashMap<L, D>(); //container.putAll(data); } public void add(L label, D data) { Loading @@ -24,7 +24,7 @@ public abstract class CompositeDataContainer<L, D> { } public void addAll(Map<L, D> data) { data.forEach((l, d) -> container.put(l, d)); container.putAll(data); } public D remove(L label) { Loading Loading
DataAccessAPI/src/main/java/cz/muni/fi/lasaris/sbms/data/api/DataPointsEndpoint.java +3 −3 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ import cz.muni.fi.lasaris.sbms.data.entities.Address; import cz.muni.fi.lasaris.sbms.data.entities.values.RawValue; import cz.muni.fi.lasaris.sbms.data.logic.ProviderManager; import cz.muni.fi.lasaris.sbms.data.logic.DataCollector; import cz.muni.fi.lasaris.sbms.data.util.Aggregations; import cz.muni.fi.lasaris.sbms.data.util.Aggregator; Loading Loading @@ -77,7 +77,7 @@ public class DataPointsEndpoint { logger.debug(json); SnapshotRequest readSpecs = m.readValue(json, SnapshotRequest.class); logger.debug(readSpecs); return dc.getDataPointsAggregation(readSpecs, Aggregations.getAggregation(agg), allowCache(cache)); return dc.getDataPointsAggregation(readSpecs, Aggregator.getAggregation(agg), allowCache(cache)); } catch (IOException e) { return AggregationResponse.getErrorResponse("Unable to parse query:" + e); } Loading Loading @@ -119,7 +119,7 @@ public class DataPointsEndpoint { logger.debug(json); GroupedSnapshotRequest readSpecs = m.readValue(json, GroupedSnapshotRequest.class); logger.debug(readSpecs); AggregationResponse result = dc.getDataPointGroupAggregations(readSpecs, Aggregations.getAggregation(agg), allowCache(cache)); AggregationResponse result = dc.getDataPointGroupAggregations(readSpecs, Aggregator.getAggregation(agg), allowCache(cache)); logger.debug(result); return result; } catch (IOException e) { Loading
DataAccessAPI/src/main/java/cz/muni/fi/lasaris/sbms/data/logic/DataCollector.java +3 −3 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ import cz.muni.fi.lasaris.sbms.data.entities.AggregationFunction; import cz.muni.fi.lasaris.sbms.data.entities.containers.Snapshot; import cz.muni.fi.lasaris.sbms.data.entities.values.AggregatedValue; import cz.muni.fi.lasaris.sbms.data.entities.values.RawValue; import cz.muni.fi.lasaris.sbms.data.util.Aggregations; import cz.muni.fi.lasaris.sbms.data.util.Aggregator; Loading Loading @@ -175,14 +175,14 @@ NavigableMap<String, SnapshotRequest> protocols = readSpecs.getProtocols(); Map<String, AggregatedValue> result = new LinkedHashMap<String, AggregatedValue>(); for(String group : data.keySet()) { AggregatedValue value = Aggregations.computeAggregation(data.get(group).getData(), aggregation); AggregatedValue value = Aggregator.computeAggregation(data.get(group).getData(), aggregation); result.put(group, value); } return result; } private AggregatedValue computeAggregation(Map<Address, RawValue> data, AggregationFunction aggregation) { return Aggregations.computeAggregation(data, aggregation); return Aggregator.computeAggregation(data, aggregation); } }
ProviderInterfaces/pom.xml +6 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,12 @@ <scope>test</scope> </dependency> <dependency> <groupId>com.cronutils</groupId> <artifactId>cron-utils</artifactId> <version>5.0.5</version> </dependency> </dependencies> <build> Loading
ProviderInterfaces/src/main/java/cz/muni/fi/lasaris/sbms/data/entities/AggregationFunction.java +4 −4 Original line number Diff line number Diff line Loading @@ -7,14 +7,14 @@ public enum AggregationFunction { WEIGHTED_AVG, WEIGHTED_TEMPORAL_AVG, MEDIAN, // TEMPORAL_MEDIAN, // WEIGHTED_MEDIAN, // WIGHTED_TEMPORAL_MEDIAN, MIN, MAX, SUM, COUNT, AND, OR, RATIO RATIO, WEIGHTED_RATIO, TEMPORAL_RATIO, WEIGHTED_TEMPORAL_RATIO }
ProviderInterfaces/src/main/java/cz/muni/fi/lasaris/sbms/data/entities/containers/CompositeDataContainer.java +3 −3 Original line number Diff line number Diff line Loading @@ -15,8 +15,8 @@ public abstract class CompositeDataContainer<L, D> { } public CompositeDataContainer(Map<L,D> data) { container = new LinkedHashMap<L, D>(); container.putAll(data); container = data; //new LinkedHashMap<L, D>(); //container.putAll(data); } public void add(L label, D data) { Loading @@ -24,7 +24,7 @@ public abstract class CompositeDataContainer<L, D> { } public void addAll(Map<L, D> data) { data.forEach((l, d) -> container.put(l, d)); container.putAll(data); } public D remove(L label) { Loading