use of com.serotonin.m2m2.web.mvc.rest.v1.model.pointValue.statistics.NumericPointValueStatisticsQuantizerJsonCallback in project ma-modules-public by infiniteautomation.
the class AbstractPointValueRollupCalculator method createQuantizer.
/**
* Create the proper quantizer for json generation
* @param startValue
* @param bc
* @param jgen
* @return
*/
protected AbstractDataQuantizer createQuantizer(DataPointVO vo, DataValue startValue, BucketCalculator bc, JsonGenerator jgen) {
if (vo.getPointLocator().getDataTypeId() == DataTypes.NUMERIC) {
return new AnalogStatisticsQuantizer(bc, startValue, new NumericPointValueStatisticsQuantizerJsonCallback(jgen, vo, this.useRendered, this.unitConversion, this.rollup, this.limit, this.dateTimeFormat, this.timezone));
} else {
if (!rollup.nonNumericSupport()) {
LOG.warn("Invalid non-numeric rollup type: " + rollup);
// Default to first
rollup = RollupEnum.FIRST;
}
return new ValueChangeCounterQuantizer(bc, startValue, new NonNumericPointValueStatisticsQuantizerJsonCallback(jgen, vo, useRendered, unitConversion, this.rollup, this.limit, this.dateTimeFormat, this.timezone));
}
}
Aggregations