use of un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.RegistrationEvent 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;
}
use of un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.RegistrationEvent 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);
}
}
use of un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.RegistrationEvent in project UVMS-ActivityModule-APP by UnionVMS.
the class ActivityEntityToModelMapper method mapOccurrenceDateTime.
private void mapOccurrenceDateTime(RegistrationEvent target, Date source) {
if (ObjectUtils.allNotNull(target, source)) {
DateTimeType dateTimeType = new DateTimeType();
dateTimeType.setDateTime(DateUtils.dateToXmlGregorian(source));
target.setOccurrenceDateTime(dateTimeType);
}
}
use of un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.RegistrationEvent in project UVMS-ActivityModule-APP by UnionVMS.
the class ActivityEntityToModelMapper method mapRegistrationEvent.
private void mapRegistrationEvent(VesselTransportMeans target, RegistrationEventEntity source) {
if (ObjectUtils.allNotNull(target, source)) {
RegistrationEvent registrationEvent = new RegistrationEvent();
mapOccurrenceDateTime(registrationEvent, source.getOccurrenceDatetime());
mapDescription(registrationEvent, source.getDescription(), source.getDescLanguageId());
mapRelatedRegistrationLocation(registrationEvent, source.getRegistrationLocation());
target.setSpecifiedRegistrationEvents(singletonList(registrationEvent));
}
}
use of un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.RegistrationEvent in project UVMS-ActivityModule-APP by UnionVMS.
the class ActivityEntityToModelMapper method mapDescription.
private void mapDescription(RegistrationEvent target, String description, String descLanguageId) {
if (ObjectUtils.allNotNull(target) && StringUtils.isNotEmpty(description) || StringUtils.isNotEmpty(descLanguageId)) {
TextType textType = new TextType();
if (StringUtils.isNotEmpty(description)) {
textType.setValue(description);
}
if (StringUtils.isNotEmpty(descLanguageId)) {
textType.setLanguageID(descLanguageId);
}
target.setDescriptions(Collections.singletonList(textType));
}
}
Aggregations