Search in sources :

Example 36 with CodeType

use of un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType in project UVMS-ActivityModule-APP by UnionVMS.

the class ActivityEntityToModelMapper method mapFisheryTypeCode.

private void mapFisheryTypeCode(FishingActivity target, FishingActivityEntity source) {
    if (ObjectUtils.allNotNull(target, source) && (StringUtils.isNotEmpty(source.getFisheryTypeCode()) || StringUtils.isNotEmpty(source.getFisheryTypeCodeListId()))) {
        CodeType codeType = new CodeType();
        if (StringUtils.isNotEmpty(source.getFisheryTypeCode())) {
            codeType.setValue(source.getFisheryTypeCode());
        }
        if (StringUtils.isNotEmpty(source.getFisheryTypeCodeListId())) {
            codeType.setListID(source.getFisheryTypeCodeListId());
        }
        target.setFisheryTypeCode(codeType);
    }
}
Also used : CodeType(un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType)

Example 37 with CodeType

use of un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType in project UVMS-ActivityModule-APP by UnionVMS.

the class BaseMapper method mapToSizeDistributionClassCodes.

public static Set<SizeDistributionClassCodeEntity> mapToSizeDistributionClassCodes(List<CodeType> codeTypes, SizeDistributionEntity sizeDistributionEntity) {
    if (codeTypes == null || codeTypes.isEmpty()) {
        Collections.emptySet();
    }
    Set<SizeDistributionClassCodeEntity> classCodes = new HashSet<>();
    for (CodeType codeType : codeTypes) {
        SizeDistributionClassCodeEntity entity = SizeDistributionMapper.INSTANCE.mapToSizeDistributionClassCodeEntity(codeType);
        entity.setSizeDistribution(sizeDistributionEntity);
        classCodes.add(entity);
    }
    return classCodes;
}
Also used : SizeDistributionClassCodeEntity(eu.europa.ec.fisheries.ers.fa.entities.SizeDistributionClassCodeEntity) CodeType(un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType) Sets.newHashSet(com.google.common.collect.Sets.newHashSet) HashSet(java.util.HashSet)

Example 38 with CodeType

use of un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType in project UVMS-ActivityModule-APP by UnionVMS.

the class ContactPartyMapper method getContactPartyRoles.

protected Set<ContactPartyRoleEntity> getContactPartyRoles(List<CodeType> codeTypes, ContactPartyEntity contactPartyEntity) {
    if (CollectionUtils.isEmpty(codeTypes)) {
        return Collections.emptySet();
    }
    Set<ContactPartyRoleEntity> contactPartyRoles = new HashSet<>();
    for (CodeType codeType : codeTypes) {
        ContactPartyRoleEntity contactPartyRoleEntity = ContactPartyMapper.INSTANCE.mapToContactPartyRoleEntity(codeType);
        contactPartyRoleEntity.setContactParty(contactPartyEntity);
        contactPartyRoles.add(contactPartyRoleEntity);
    }
    return contactPartyRoles;
}
Also used : CodeType(un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType) ContactPartyRoleEntity(eu.europa.ec.fisheries.ers.fa.entities.ContactPartyRoleEntity) HashSet(java.util.HashSet)

Example 39 with CodeType

use of un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType in project UVMS-ActivityModule-APP by UnionVMS.

the class GearProblemMapper method mapToGearProblemRecoveries.

protected Set<GearProblemRecoveryEntity> mapToGearProblemRecoveries(List<CodeType> codeTypes, GearProblemEntity gearProblemEntity) {
    if (codeTypes == null || codeTypes.isEmpty()) {
        return Collections.emptySet();
    }
    Set<GearProblemRecoveryEntity> gearProblemRecoveries = new HashSet<>();
    for (CodeType codeType : codeTypes) {
        GearProblemRecoveryEntity gearProblemRecovery = GearProblemMapper.INSTANCE.mapToGearProblemRecoveryEntity(codeType);
        gearProblemRecovery.setGearProblem(gearProblemEntity);
        gearProblemRecoveries.add(gearProblemRecovery);
    }
    return gearProblemRecoveries;
}
Also used : GearProblemRecoveryEntity(eu.europa.ec.fisheries.ers.fa.entities.GearProblemRecoveryEntity) CodeType(un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType) HashSet(java.util.HashSet)

Example 40 with CodeType

use of un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType in project UVMS-ActivityModule-APP by UnionVMS.

the class VesselStorageCharacteristicsMapper method mapToVesselStorageCharCodes.

protected Set<VesselStorageCharCodeEntity> mapToVesselStorageCharCodes(List<CodeType> codeTypes, VesselStorageCharacteristicsEntity vesselStorageChar) {
    if (codeTypes == null || codeTypes.isEmpty()) {
        return Collections.emptySet();
    }
    Set<VesselStorageCharCodeEntity> vesselStorageCharCodes = new HashSet<>();
    for (CodeType codeType : codeTypes) {
        VesselStorageCharCodeEntity vesselStorageCharCode = VesselStorageCharacteristicsMapper.INSTANCE.mapToVesselStorageCharCodeEntity(codeType);
        vesselStorageCharCode.setVesselStorageCharacteristics(vesselStorageChar);
        vesselStorageCharCodes.add(vesselStorageCharCode);
    }
    return vesselStorageCharCodes;
}
Also used : VesselStorageCharCodeEntity(eu.europa.ec.fisheries.ers.fa.entities.VesselStorageCharCodeEntity) CodeType(un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType) HashSet(java.util.HashSet)

Aggregations

CodeType (un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType)45 IDType (un.unece.uncefact.data.standard.unqualifieddatatype._20.IDType)14 TextType (un.unece.uncefact.data.standard.unqualifieddatatype._20.TextType)10 DateTimeType (un.unece.uncefact.data.standard.unqualifieddatatype._20.DateTimeType)9 QuantityType (un.unece.uncefact.data.standard.unqualifieddatatype._20.QuantityType)6 ArrayList (java.util.ArrayList)5 HashSet (java.util.HashSet)5 FLUXLocation (un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FLUXLocation)5 FLUXParty (un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FLUXParty)5 MeasureType (un.unece.uncefact.data.standard.unqualifieddatatype._20.MeasureType)5 CodeType (net.opengis.ows11.CodeType)4 DataInputsType (net.opengis.wps10.DataInputsType)4 InputDescriptionType (net.opengis.wps10.InputDescriptionType)4 ProcessDescriptionType (net.opengis.wps10.ProcessDescriptionType)4 Test (org.junit.Test)4 FLUXCharacteristic (un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FLUXCharacteristic)4 SizeDistribution (un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.SizeDistribution)4 CustomProcessFunction (com.sldeditor.rendertransformation.CustomProcessFunction)3 ProcessFunctionParameterValue (com.sldeditor.rendertransformation.ProcessFunctionParameterValue)3 LiteralInputType (net.opengis.wps10.LiteralInputType)3