Search in sources :

Example 6 with PowerQualityProfileData

use of org.opensmartgridplatform.domain.core.valueobjects.smartmetering.PowerQualityProfileData in project open-smart-grid-platform by OSGP.

the class PowerQualityProfileResponseDataConverter method convert.

@Override
public org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.PowerQualityProfileData convert(final PowerQualityProfileData source, final Type<? extends org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.PowerQualityProfileData> destinationType, final MappingContext mappingContext) {
    final org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.PowerQualityProfileData result = new org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.PowerQualityProfileData();
    result.setLogicalName(this.mapperFacade.map(source.getLogicalName(), ObisCodeValues.class));
    final CaptureObjects captureObjects = new CaptureObjects();
    captureObjects.getCaptureObjects().addAll(this.mapperFacade.mapAsList(source.getCaptureObjects(), CaptureObject.class));
    result.setCaptureObjectList(captureObjects);
    final ProfileEntries profileEntries = new ProfileEntries();
    profileEntries.getProfileEntries().addAll(this.mapProfileEntries(source));
    result.setProfileEntryList(profileEntries);
    return result;
}
Also used : ObisCodeValues(org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.ObisCodeValues) PowerQualityProfileData(org.opensmartgridplatform.domain.core.valueobjects.smartmetering.PowerQualityProfileData) CaptureObject(org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.CaptureObject) CaptureObjects(org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.CaptureObjects) ProfileEntries(org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.ProfileEntries)

Aggregations

PowerQualityProfileData (org.opensmartgridplatform.domain.core.valueobjects.smartmetering.PowerQualityProfileData)6 Test (org.junit.jupiter.api.Test)4 PowerQualityProfileDataDto (org.opensmartgridplatform.dto.valueobjects.smartmetering.PowerQualityProfileDataDto)3 CaptureObject (org.opensmartgridplatform.domain.core.valueobjects.smartmetering.CaptureObject)2 GetPowerQualityProfileResponse (org.opensmartgridplatform.domain.core.valueobjects.smartmetering.GetPowerQualityProfileResponse)2 ObisCodeValues (org.opensmartgridplatform.domain.core.valueobjects.smartmetering.ObisCodeValues)2 ProfileEntry (org.opensmartgridplatform.domain.core.valueobjects.smartmetering.ProfileEntry)2 ArrayList (java.util.ArrayList)1 CaptureObject (org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.CaptureObject)1 CaptureObjects (org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.CaptureObjects)1 ObisCodeValues (org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.ObisCodeValues)1 ProfileEntries (org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.ProfileEntries)1 ProfileEntryValue (org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.ProfileEntryValue)1 ProfileEntryValue (org.opensmartgridplatform.domain.core.valueobjects.smartmetering.ProfileEntryValue)1