use of un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FLUXCharacteristic in project UVMS-ActivityModule-APP by UnionVMS.
the class ActivityEntityToModelMapper method mapValues.
private void mapValues(FLUXCharacteristic target, FluxCharacteristicEntity source) {
if (ObjectUtils.allNotNull(target, source)) {
String valueText = source.getValueText();
if (StringUtils.isNotEmpty(valueText)) {
TextType textType = new TextType();
textType.setValue(valueText);
target.setValues(Collections.singletonList(textType));
}
}
}
use of un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FLUXCharacteristic in project UVMS-ActivityModule-APP by UnionVMS.
the class ActivityEntityToModelMapper method mapValueCode.
private void mapValueCode(FLUXCharacteristic target, FluxCharacteristicEntity source) {
if (ObjectUtils.allNotNull(target, source)) {
if (source.getValueCode() != null) {
CodeType codeType = new CodeType();
codeType.setValue(source.getValueCode());
target.setTypeCode(codeType);
}
}
}
use of un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FLUXCharacteristic in project UVMS-ActivityModule-APP by UnionVMS.
the class ActivityEntityToModelMapper method mapValueMeasure.
private void mapValueMeasure(FLUXCharacteristic target, FluxCharacteristicEntity source) {
if (ObjectUtils.allNotNull(target, source)) {
Double valueMeasure = source.getValueMeasure();
String valueMeasureUnitCode = source.getValueMeasureUnitCode();
if (valueMeasure != null || StringUtils.isNotEmpty(valueMeasureUnitCode)) {
MeasureType measureType = new MeasureType();
if (valueMeasure != null) {
measureType.setValue(new BigDecimal(valueMeasure));
}
if (StringUtils.isNotEmpty(valueMeasureUnitCode)) {
measureType.setUnitCode(valueMeasureUnitCode);
}
target.setValueMeasure(measureType);
}
}
}
use of un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FLUXCharacteristic in project UVMS-ActivityModule-APP by UnionVMS.
the class ActivityEntityToModelMapper method mapValueIndicator.
private void mapValueIndicator(FLUXCharacteristic target, FluxCharacteristicEntity source) {
if (ObjectUtils.allNotNull(target, source)) {
String valueIndicator = source.getValueIndicator();
if (StringUtils.isNotEmpty(valueIndicator)) {
IndicatorType type = new IndicatorType();
IndicatorType.IndicatorString indicatorString = new IndicatorType.IndicatorString();
indicatorString.setValue(valueIndicator);
type.setIndicatorString(indicatorString);
target.setValueIndicator(type);
}
}
}
use of un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FLUXCharacteristic in project UVMS-ActivityModule-APP by UnionVMS.
the class ActivityEntityToModelMapper method mapSpecifiedFLUXCharacteristics.
private void mapSpecifiedFLUXCharacteristics(FishingActivity fishingActivity, Set<FluxCharacteristicEntity> fluxCharacteristics) {
if (CollectionUtils.isNotEmpty(fluxCharacteristics)) {
List<FLUXCharacteristic> fluxCharacteristicList = new ArrayList<>();
for (FluxCharacteristicEntity source : fluxCharacteristics) {
FLUXCharacteristic target = new FLUXCharacteristic();
mapPurposeCode(target, source);
mapValueCode(target, source);
mapValueDateTime(target, source);
mapValueIndicator(target, source);
mapValueQuantity(target, source);
mapValueMeasure(target, source);
mapDescriptions(target, source);
mapValues(target, source);
fluxCharacteristicList.add(target);
}
fishingActivity.setSpecifiedFLUXCharacteristics(fluxCharacteristicList);
}
}
Aggregations