Search in sources :

Example 36 with CodeType

use of net.opengis.gml.x32.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 37 with CodeType

use of net.opengis.gml.x32.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 38 with CodeType

use of net.opengis.gml.x32.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 39 with CodeType

use of net.opengis.gml.x32.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)

Example 40 with CodeType

use of net.opengis.gml.x32.CodeType in project UVMS-ActivityModule-APP by UnionVMS.

the class MapperUtil method getGearCharacteristics.

public static GearCharacteristic getGearCharacteristics() {
    CodeType typeCode = getCodeType("Code 1", "57t3yf-ght43yrf-ght56yru-ght7565h");
    List<TextType> descriptions = Arrays.asList(getTextType("This is sample text"));
    MeasureType valueMeasure = getMeasureType(123, "C62", "57t3yf-ght43yrf-ght56yru-ght7565h");
    DateTimeType valueDateTime = getDateTimeType("2016-07-01 11:15:00");
    IndicatorType valueIndicator = getIndicatorType(true, "Test value", "Test format");
    CodeType valueCode = getCodeType("Code type 1", "4fhry5-thfyr85-67thf-5htr84");
    TextType value = getTextType("This is sample Text");
    QuantityType valueQuantity = getQuantityType(123);
    List<FLUXLocation> specifiedFluxLocations = Arrays.asList(getFluxLocation());
    GearCharacteristic gearCharacteristic = new GearCharacteristic(typeCode, descriptions, valueMeasure, valueDateTime, valueIndicator, valueCode, value, valueQuantity, specifiedFluxLocations);
    return gearCharacteristic;
}
Also used : DateTimeType(un.unece.uncefact.data.standard.unqualifieddatatype._20.DateTimeType) IndicatorType(un.unece.uncefact.data.standard.unqualifieddatatype._20.IndicatorType) QuantityType(un.unece.uncefact.data.standard.unqualifieddatatype._20.QuantityType) FLUXLocation(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FLUXLocation) CodeType(un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType) MeasureType(un.unece.uncefact.data.standard.unqualifieddatatype._20.MeasureType) GearCharacteristic(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.GearCharacteristic) TextType(un.unece.uncefact.data.standard.unqualifieddatatype._20.TextType)

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 ArrayList (java.util.ArrayList)6 QuantityType (un.unece.uncefact.data.standard.unqualifieddatatype._20.QuantityType)6 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 CustomProcessFunction (com.sldeditor.rendertransformation.CustomProcessFunction)3 ProcessFunctionParameterValue (com.sldeditor.rendertransformation.ProcessFunctionParameterValue)3 LiteralInputType (net.opengis.wps10.LiteralInputType)3 EList (org.eclipse.emf.common.util.EList)3