Search in sources :

Example 6 with IDType

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

the class MapperUtil method getIdType.

public static IDType getIdType(String type, String schemeId) {
    IDType idType = new IDType();
    idType.setValue(type);
    idType.setSchemeID(schemeId);
    return idType;
}
Also used : IDType(un.unece.uncefact.data.standard.unqualifieddatatype._20.IDType)

Example 7 with IDType

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

the class FluxMessageServiceBeanTest method setUp.

@Before
public void setUp() {
    FAReportDocument faReportDocument2 = MapperUtil.getFaReportDocument();
    faReportDocument2.getRelatedFLUXReportDocument().setPurposeCode(MapperUtil.getCodeType("9", "4fyrh-58fj4-5jtu-58tjr"));
    IDType id = faReportDocument2.getRelatedFLUXReportDocument().getReferencedID();
    FAReportDocument faReportDocument1 = MapperUtil.getFaReportDocument();
    faReportDocument1.getRelatedFLUXReportDocument().setIDS(Arrays.asList(id));
    faReportDocument1.getRelatedFLUXReportDocument().setPurposeCode(MapperUtil.getCodeType("3", "4f5yrh-58f7j4-5j5tu-58tj7r"));
    fluxFaReportMessage = new FLUXFAReportMessage();
    faReportDocuments = Arrays.asList(faReportDocument1, faReportDocument2);
    fluxFaReportMessage.setFAReportDocuments(faReportDocuments);
    fluxFaReportMessage.setFLUXReportDocument(MapperUtil.getFluxReportDocument());
}
Also used : FLUXFAReportMessage(un.unece.uncefact.data.standard.fluxfareportmessage._3.FLUXFAReportMessage) IDType(un.unece.uncefact.data.standard.unqualifieddatatype._20.IDType) FAReportDocument(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FAReportDocument) Before(org.junit.Before)

Example 8 with IDType

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

the class FaReportDocumentMapper method getFluxReportDocument.

protected FluxReportDocumentEntity getFluxReportDocument(FLUXReportDocument fluxReportDocument, FaReportDocumentEntity faReportDocumentEntity) {
    if (fluxReportDocument == null) {
        return null;
    }
    FluxReportDocumentEntity fluxReportDocumentEntity = FluxReportDocumentMapper.INSTANCE.mapToFluxReportDocumentEntity(fluxReportDocument);
    if (fluxReportDocument.getOwnerFLUXParty() != null) {
        FluxPartyEntity fluxPartyEntity = FluxPartyMapper.INSTANCE.mapToFluxPartyEntity(fluxReportDocument.getOwnerFLUXParty());
        fluxPartyEntity.setFluxReportDocument(fluxReportDocumentEntity);
        fluxReportDocumentEntity.setFluxParty(fluxPartyEntity);
    }
    Set<FluxReportIdentifierEntity> reportIdentifierEntitySet = new HashSet<>();
    if (CollectionUtils.isNotEmpty(fluxReportDocument.getIDS())) {
        for (IDType idType : fluxReportDocument.getIDS()) {
            FluxReportIdentifierEntity fluxReportIdentifierEntity = FluxReportIdentifierMapper.INSTANCE.mapToFluxReportIdentifierEntity(idType);
            fluxReportIdentifierEntity.setFluxReportDocument(fluxReportDocumentEntity);
            reportIdentifierEntitySet.add(fluxReportIdentifierEntity);
        }
    }
    fluxReportDocumentEntity.setFluxReportIdentifiers(reportIdentifierEntitySet);
    fluxReportDocumentEntity.setFaReportDocument(faReportDocumentEntity);
    return fluxReportDocumentEntity;
}
Also used : FluxReportIdentifierEntity(eu.europa.ec.fisheries.ers.fa.entities.FluxReportIdentifierEntity) FluxReportDocumentEntity(eu.europa.ec.fisheries.ers.fa.entities.FluxReportDocumentEntity) FluxPartyEntity(eu.europa.ec.fisheries.ers.fa.entities.FluxPartyEntity) IDType(un.unece.uncefact.data.standard.unqualifieddatatype._20.IDType) HashSet(java.util.HashSet)

Example 9 with IDType

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

the class ActivityEntityToModelMapper method mapID.

private void mapID(VesselStorageCharacteristic target, VesselStorageCharacteristicsEntity source) {
    if (ObjectUtils.allNotNull(target, source)) {
        IDType idType = new IDType();
        idType.setSchemeID(source.getVesselSchemaId());
        idType.setValue(source.getVesselId());
        target.setID(idType);
    }
}
Also used : IDType(un.unece.uncefact.data.standard.unqualifieddatatype._20.IDType)

Example 10 with IDType

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

the class ActivityEntityToModelMapper method mapRelatedReportIDs.

private void mapRelatedReportIDs(FAReportDocument target, Set<FaReportIdentifierEntity> faReportIdentifiers) {
    if (CollectionUtils.isNotEmpty(faReportIdentifiers)) {
        List<IDType> idTypeList = new ArrayList<>();
        for (FaReportIdentifierEntity source : faReportIdentifiers) {
            IDType idType = new IDType();
            String faReportIdentifierId = source.getFaReportIdentifierId();
            String faReportIdentifierSchemeId = source.getFaReportIdentifierSchemeId();
            idType.setSchemeID(faReportIdentifierSchemeId);
            idType.setValue(faReportIdentifierId);
            idTypeList.add(idType);
        }
        target.setRelatedReportIDs(idTypeList);
    }
}
Also used : ArrayList(java.util.ArrayList) FaReportIdentifierEntity(eu.europa.ec.fisheries.ers.fa.entities.FaReportIdentifierEntity) IDType(un.unece.uncefact.data.standard.unqualifieddatatype._20.IDType)

Aggregations

IDType (un.unece.uncefact.data.standard.unqualifieddatatype._20.IDType)31 CodeType (un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType)14 ArrayList (java.util.ArrayList)9 DateTimeType (un.unece.uncefact.data.standard.unqualifieddatatype._20.DateTimeType)7 TextType (un.unece.uncefact.data.standard.unqualifieddatatype._20.TextType)7 HashSet (java.util.HashSet)5 FLUXParty (un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FLUXParty)5 DelimitedPeriod (un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.DelimitedPeriod)4 FLUXReportDocument (un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FLUXReportDocument)4 FAQueryParameter (un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FAQueryParameter)3 FLAPDocument (un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FLAPDocument)3 FaReportIdentifierEntity (eu.europa.ec.fisheries.ers.fa.entities.FaReportIdentifierEntity)2 FluxPartyIdentifierEntity (eu.europa.ec.fisheries.ers.fa.entities.FluxPartyIdentifierEntity)2 VesselIdentifierEntity (eu.europa.ec.fisheries.ers.fa.entities.VesselIdentifierEntity)2 SubscriptionDataCriteria (eu.europa.ec.fisheries.wsdl.subscription.module.SubscriptionDataCriteria)2 GregorianCalendar (java.util.GregorianCalendar)2 List (java.util.List)2 XMLGregorianCalendar (javax.xml.datatype.XMLGregorianCalendar)2 SneakyThrows (lombok.SneakyThrows)2 Before (org.junit.Before)2