Search in sources :

Example 1 with RegistrationLocation

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

the class MapperUtil method getRegistrationEvent.

public static RegistrationEvent getRegistrationEvent() {
    List<TextType> descriptions = Arrays.asList(getTextType("This is test Text"));
    DateTimeType occurrenceDateTime = getDateTimeType("2016-07-01 11:15:00");
    RegistrationLocation relatedRegistrationLocation = getRegistrationLocation();
    RegistrationEvent registrationEvent = new RegistrationEvent(descriptions, occurrenceDateTime, relatedRegistrationLocation);
    return registrationEvent;
}
Also used : RegistrationLocation(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.RegistrationLocation) DateTimeType(un.unece.uncefact.data.standard.unqualifieddatatype._20.DateTimeType) RegistrationEvent(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.RegistrationEvent) TextType(un.unece.uncefact.data.standard.unqualifieddatatype._20.TextType)

Example 2 with RegistrationLocation

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

the class ActivityEntityToModelMapper method mapPurposeCode.

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

Example 3 with RegistrationLocation

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

the class ActivityEntityToModelMapper method mapRelatedRegistrationLocation.

private void mapRelatedRegistrationLocation(RegistrationEvent target, RegistrationLocationEntity source) {
    if (ObjectUtils.allNotNull(target, source)) {
        RegistrationLocation registrationLocation = new RegistrationLocation();
        setDescriptions(registrationLocation, source);
        mapCountryID(registrationLocation, source);
        setGeopoliticalRegionCode(registrationLocation, source);
        mapNames(registrationLocation, source);
        mapPurposeCode(registrationLocation, source);
        target.setRelatedRegistrationLocation(registrationLocation);
    }
}
Also used : RegistrationLocation(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.RegistrationLocation)

Example 4 with RegistrationLocation

use of un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.RegistrationLocation 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 5 with RegistrationLocation

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

the class ActivityEntityToModelMapper method mapNames.

private void mapNames(RegistrationLocation target, RegistrationLocationEntity source) {
    if (ObjectUtils.allNotNull(target, source)) {
        TextType textType = new TextType();
        textType.setValue(source.getName());
        textType.setLanguageID(source.getNameLanguageId());
        target.setNames(singletonList(textType));
    }
}
Also used : TextType(un.unece.uncefact.data.standard.unqualifieddatatype._20.TextType)

Aggregations

RegistrationLocation (un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.RegistrationLocation)4 TextType (un.unece.uncefact.data.standard.unqualifieddatatype._20.TextType)4 CodeType (un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType)3 IDType (un.unece.uncefact.data.standard.unqualifieddatatype._20.IDType)2 RegistrationLocationEntity (eu.europa.ec.fisheries.ers.fa.entities.RegistrationLocationEntity)1 Test (org.junit.Test)1 RegistrationEvent (un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.RegistrationEvent)1 DateTimeType (un.unece.uncefact.data.standard.unqualifieddatatype._20.DateTimeType)1