Search in sources :

Example 31 with CodeType

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

the class ActivityEntityToModelMapper method mapVesselStorageCharCodes.

private void mapVesselStorageCharCodes(VesselStorageCharacteristic target, Set<VesselStorageCharCodeEntity> vesselStorageCharCode) {
    if (CollectionUtils.isNotEmpty(vesselStorageCharCode) && target != null) {
        List<CodeType> codeTypeList = new ArrayList<>();
        for (VesselStorageCharCodeEntity source : vesselStorageCharCode) {
            CodeType codeType = new CodeType();
            codeType.setValue(source.getVesselTypeCode());
            codeType.setListID(source.getVesselTypeCodeListId());
            codeTypeList.add(codeType);
        }
        target.setTypeCodes(codeTypeList);
    }
}
Also used : VesselStorageCharCodeEntity(eu.europa.ec.fisheries.ers.fa.entities.VesselStorageCharCodeEntity) ArrayList(java.util.ArrayList) CodeType(un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType)

Example 32 with CodeType

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

the class ActivityEntityToModelMapper method setGeopoliticalRegionCode.

private void setGeopoliticalRegionCode(RegistrationLocation target, RegistrationLocationEntity source) {
    if (ObjectUtils.allNotNull(target, source)) {
        CodeType codeType = new CodeType();
        codeType.setListID(source.getRegionCodeListId());
        codeType.setValue(source.getRegionCode());
        target.setGeopoliticalRegionCode(codeType);
    }
}
Also used : CodeType(un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType)

Example 33 with CodeType

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

the class ActivityEntityToModelMapper method mapToFLUXFAReportMessage.

@SneakyThrows
public FLUXFAReportMessage mapToFLUXFAReportMessage(List<FaReportDocumentEntity> faReportMessageEntity) {
    FLUXFAReportMessage target = new FLUXFAReportMessage();
    FLUXReportDocument fluxReportDocument = new FLUXReportDocument();
    CodeType codeType = new CodeType();
    codeType.setValue("9");
    codeType.setListID("FLUX_GP_PURPOSE");
    fluxReportDocument.setPurposeCode(codeType);
    IDType idType = new IDType();
    idType.setSchemeID("UUID");
    idType.setValue(UUID.randomUUID().toString());
    fluxReportDocument.setIDS(Collections.singletonList(idType));
    DateTimeType dateTimeType = new DateTimeType();
    dateTimeType.setDateTime(DateUtils.getCurrentDate());
    fluxReportDocument.setCreationDateTime(dateTimeType);
    TextType textType = new TextType();
    textType.setValue("LOAD_REPORTS");
    fluxReportDocument.setPurpose(textType);
    FLUXParty party = new FLUXParty();
    IDType idType1 = new IDType();
    idType1.setSchemeID("FLUX_GP_PARTY");
    idType1.setValue("TODO_SET_NODE_ALIAS");
    party.setIDS(Collections.singletonList(idType1));
    fluxReportDocument.setOwnerFLUXParty(party);
    target.setFLUXReportDocument(fluxReportDocument);
    if (CollectionUtils.isNotEmpty(faReportMessageEntity)) {
        mapFAReportDocuments(target, faReportMessageEntity);
    }
    return target;
}
Also used : FLUXReportDocument(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FLUXReportDocument) DateTimeType(un.unece.uncefact.data.standard.unqualifieddatatype._20.DateTimeType) FLUXFAReportMessage(un.unece.uncefact.data.standard.fluxfareportmessage._3.FLUXFAReportMessage) CodeType(un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType) IDType(un.unece.uncefact.data.standard.unqualifieddatatype._20.IDType) FLUXParty(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FLUXParty) TextType(un.unece.uncefact.data.standard.unqualifieddatatype._20.TextType) SneakyThrows(lombok.SneakyThrows)

Example 34 with CodeType

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

the class ActivityEntityToModelMapper method setRoleCode.

private void setRoleCode(VesselTransportMeans target, String roleCodeListId, String roleCodeListValue) {
    if (ObjectUtils.allNotNull(target)) {
        CodeType codeType = new CodeType();
        codeType.setValue(roleCodeListValue);
        codeType.setListID(roleCodeListId);
        target.setRoleCode(codeType);
    }
}
Also used : CodeType(un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType)

Example 35 with CodeType

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

the class ActivityEntityToModelMapper method mapVesselRelatedActivityCode.

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

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