Search in sources :

Example 1 with PowerQualityValues

use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.PowerQualityValues in project open-smart-grid-platform by OSGP.

the class ActualPowerQualityResponseDataConverter method convert.

@Override
public org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.ActualPowerQualityData convert(final ActualPowerQualityData source, final Type<? extends org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.ActualPowerQualityData> destinationType, final MappingContext mappingContext) {
    if (source == null) {
        return null;
    }
    final org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.ActualPowerQualityData result = new org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.ActualPowerQualityData();
    final PowerQualityObjects powerQualityObjects = new PowerQualityObjects();
    powerQualityObjects.getPowerQualityObject().addAll(this.mapperFacade.mapAsList(source.getPowerQualityObjects(), PowerQualityObject.class));
    result.setPowerQualityObjects(powerQualityObjects);
    final PowerQualityValues powerQualityValues = new PowerQualityValues();
    powerQualityValues.getPowerQualityValue().addAll(this.mapPowerQualityValues(source));
    result.setPowerQualityValues(powerQualityValues);
    return result;
}
Also used : ActualPowerQualityData(org.opensmartgridplatform.domain.core.valueobjects.smartmetering.ActualPowerQualityData) PowerQualityObject(org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.PowerQualityObject) PowerQualityObjects(org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.PowerQualityObjects) PowerQualityValues(org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.PowerQualityValues)

Aggregations

PowerQualityObject (org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.PowerQualityObject)1 PowerQualityObjects (org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.PowerQualityObjects)1 PowerQualityValues (org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.PowerQualityValues)1 ActualPowerQualityData (org.opensmartgridplatform.domain.core.valueobjects.smartmetering.ActualPowerQualityData)1