use of net.opengis.ows11.CodeType in project UVMS-ActivityModule-APP by UnionVMS.
the class ActivityEntityToModelMapper method mapRoles.
private void mapRoles(ContactParty target, Set<ContactPartyRoleEntity> contactPartyRoleEntities) {
List<CodeType> codeTypeList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(contactPartyRoleEntities)) {
for (ContactPartyRoleEntity source : contactPartyRoleEntities) {
CodeType codeType = new CodeType();
codeType.setValue(source.getRoleCode());
codeType.setListID(source.getRoleCodeListId());
codeTypeList.add(codeType);
}
}
target.setRoleCodes(codeTypeList);
}
use of net.opengis.ows11.CodeType in project UVMS-ActivityModule-APP by UnionVMS.
the class ActivityEntityToModelMapper method mapPurposeCode.
private void mapPurposeCode(FishingActivity target, FishingActivityEntity source) {
if (ObjectUtils.allNotNull(target, source)) {
CodeType codeType = new CodeType();
codeType.setValue(source.getTypeCode());
codeType.setListID(source.getTypeCodeListid());
target.setTypeCode(codeType);
}
}
use of net.opengis.ows11.CodeType in project UVMS-ActivityModule-APP by UnionVMS.
the class ActivityEntityToModelMapper method mapFMCMarkerCode.
private void mapFMCMarkerCode(FAReportDocument target, String fmcMarkerValue, String fmcMarkerListId) {
if (ObjectUtils.allNotNull(target) && (StringUtils.isNotEmpty(fmcMarkerValue) || StringUtils.isNotEmpty(fmcMarkerListId))) {
CodeType codeType = new CodeType();
if (StringUtils.isNotEmpty(fmcMarkerValue)) {
codeType.setValue(fmcMarkerValue);
}
if (StringUtils.isNotEmpty(fmcMarkerListId)) {
codeType.setListID(fmcMarkerListId);
}
target.setFMCMarkerCode(codeType);
}
}
use of net.opengis.ows11.CodeType 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 net.opengis.ows11.CodeType in project UVMS-ActivityModule-APP by UnionVMS.
the class BaseMapper method mapToFishingGears.
public static Set<FishingGearRoleEntity> mapToFishingGears(List<CodeType> codeTypes, FishingGearEntity fishingGearEntity) {
if (CollectionUtils.isEmpty(codeTypes)) {
Collections.emptySet();
}
Set<FishingGearRoleEntity> fishingGearRoles = newSet();
for (CodeType codeType : codeTypes) {
FishingGearRoleEntity gearRole = FishingGearMapper.INSTANCE.mapToFishingGearRoleEntity(codeType);
gearRole.setFishingGear(fishingGearEntity);
fishingGearRoles.add(gearRole);
}
return fishingGearRoles;
}
Aggregations