use of un.unece.uncefact.data.standard.unqualifieddatatype._20.TextType in project UVMS-ActivityModule-APP by UnionVMS.
the class ActivityEntityToModelMapper method mapDescriptions.
private void mapDescriptions(FLUXCharacteristic target, FluxCharacteristicEntity source) {
if (ObjectUtils.allNotNull(target, source)) {
String description = source.getDescription();
String valueLanguageId = source.getValueLanguageId();
if (StringUtils.isNotEmpty(description) || StringUtils.isNotEmpty(valueLanguageId)) {
TextType textType = new TextType();
if (StringUtils.isNotEmpty(description)) {
textType.setValue(description);
}
if (StringUtils.isNotEmpty(valueLanguageId)) {
textType.setLanguageID(source.getValueLanguageId());
}
target.setDescriptions(Collections.singletonList(textType));
}
}
}
use of un.unece.uncefact.data.standard.unqualifieddatatype._20.TextType in project UVMS-ActivityModule-APP by UnionVMS.
the class ActivityEntityToModelMapper method setDescriptions.
private void setDescriptions(RegistrationLocation target, RegistrationLocationEntity source) {
if (ObjectUtils.allNotNull(target, source)) {
TextType textType = new TextType();
textType.setValue(source.getDescription());
textType.setLanguageID(source.getDescLanguageId());
target.setDescriptions(singletonList(textType));
}
}
use of un.unece.uncefact.data.standard.unqualifieddatatype._20.TextType in project UVMS-ActivityModule-APP by UnionVMS.
the class FluxPartyMapper method mapNamesAndLanguageId.
private void mapNamesAndLanguageId(FLUXParty target, String fluxPartyName, String nameLanguageId) {
if (ObjectUtils.allNotNull(target) && (StringUtils.isNotEmpty(fluxPartyName) || StringUtils.isNotEmpty(nameLanguageId))) {
TextType textType = new TextType();
if (StringUtils.isNotEmpty(fluxPartyName)) {
textType.setValue(fluxPartyName);
}
if (StringUtils.isNotEmpty(nameLanguageId)) {
textType.setLanguageID(fluxPartyName);
}
target.setNames(singletonList(textType));
}
}
use of un.unece.uncefact.data.standard.unqualifieddatatype._20.TextType 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;
}
use of un.unece.uncefact.data.standard.unqualifieddatatype._20.TextType in project UVMS-ActivityModule-APP by UnionVMS.
the class MapperUtil method getFluxReportDocument.
public static FLUXReportDocument getFluxReportDocument() {
List<IDType> ids = Arrays.asList(getIdType("flux_report_doc_1", "fhty58-gh586t-5tjf8-t58rjewe"));
IDType referencedID = getIdType("Ref ID 1", "fhty58-gh586t-5tjf8-t58rjewe");
DateTimeType creationDateTime = getDateTimeType("2016-07-01 11:15:00");
CodeType purposeCode = getCodeType("5", "FLUX_GP_PURPOSE");
final TextType purpose = getTextType("Purpose Text");
CodeType typeCode = getCodeType("FluxReportTypeCode", "fhty58-gh586t-5tjf8-t58rjewe");
FLUXParty ownerFLUXParty = new FLUXParty(Arrays.asList(getIdType("Owner flux party id 1", "58fjrut-tjfuri-586jte-5jfur")), Arrays.asList(getTextType("This is sample text for owner flux party")));
FLUXReportDocument fluxReportDocument = new FLUXReportDocument(ids, referencedID, creationDateTime, purposeCode, purpose, typeCode, ownerFLUXParty);
return fluxReportDocument;
}
Aggregations