Search in sources :

Example 1 with TextType

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

the class ActivityEntityToModelMapper method mapNames.

private void mapNames(VesselTransportMeans target, String name) {
    if (ObjectUtils.allNotNull(target)) {
        TextType textType = new TextType();
        textType.setValue(name);
        target.setNames(singletonList(textType));
    }
}
Also used : TextType(un.unece.uncefact.data.standard.unqualifieddatatype._20.TextType)

Example 2 with TextType

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

the class ActivityEntityToModelMapper method mapValues.

private void mapValues(FLUXCharacteristic target, FluxCharacteristicEntity source) {
    if (ObjectUtils.allNotNull(target, source)) {
        String valueText = source.getValueText();
        if (StringUtils.isNotEmpty(valueText)) {
            TextType textType = new TextType();
            textType.setValue(valueText);
            target.setValues(Collections.singletonList(textType));
        }
    }
}
Also used : TextType(un.unece.uncefact.data.standard.unqualifieddatatype._20.TextType)

Example 3 with TextType

use of un.unece.uncefact.data.standard.unqualifieddatatype._100.TextType 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 4 with TextType

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

the class MapperUtil method getTextType.

private static TextType getTextType(String value) {
    TextType textType = new TextType();
    textType.setValue(value);
    return textType;
}
Also used : TextType(un.unece.uncefact.data.standard.unqualifieddatatype._20.TextType)

Example 5 with TextType

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

the class MapperUtil method getFluxCharacteristics.

public static FLUXCharacteristic getFluxCharacteristics() {
    CodeType typeCode = getCodeType("Code 1", "57t3yf-ght43yrf-ght56yru-ght7565h");
    List<TextType> descriptions = Arrays.asList(getTextType("This is test description"));
    MeasureType valueMeasure = getMeasureType(333, "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 Value 1", "57tr4t3yf-ght43yrf-ght56yr5u-ght75365h");
    List<TextType> values = Arrays.asList(getTextType("This is sample value"));
    QuantityType valueQuantity = getQuantityType(123);
    List<FLUXLocation> specifiedFLUXLocations = null;
    List<FLAPDocument> relatedFLAPDocuments = Arrays.asList(getFlapDocument());
    FLUXCharacteristic fluxCharacteristic = new FLUXCharacteristic(typeCode, descriptions, valueMeasure, valueDateTime, valueIndicator, valueCode, values, valueQuantity, specifiedFLUXLocations, relatedFLAPDocuments);
    return fluxCharacteristic;
}
Also used : DateTimeType(un.unece.uncefact.data.standard.unqualifieddatatype._20.DateTimeType) IndicatorType(un.unece.uncefact.data.standard.unqualifieddatatype._20.IndicatorType) QuantityType(un.unece.uncefact.data.standard.unqualifieddatatype._20.QuantityType) FLUXLocation(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FLUXLocation) FLAPDocument(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FLAPDocument) CodeType(un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType) MeasureType(un.unece.uncefact.data.standard.unqualifieddatatype._20.MeasureType) FLUXCharacteristic(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FLUXCharacteristic) TextType(un.unece.uncefact.data.standard.unqualifieddatatype._20.TextType)

Aggregations

TextType (un.unece.uncefact.data.standard.unqualifieddatatype._100.TextType)21 TextType (un.unece.uncefact.data.standard.unqualifieddatatype._20.TextType)19 Nullable (javax.annotation.Nullable)18 FormattedDateTimeType (un.unece.uncefact.data.standard.qualifieddatatype._100.FormattedDateTimeType)12 BinaryObjectType (un.unece.uncefact.data.standard.unqualifieddatatype._100.BinaryObjectType)12 IDType (un.unece.uncefact.data.standard.unqualifieddatatype._100.IDType)12 BigDecimal (java.math.BigDecimal)10 CodeType (un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType)10 CGlobal (com.helger.commons.CGlobal)9 ValueEnforcer (com.helger.commons.ValueEnforcer)9 CollectionHelper (com.helger.commons.collection.CollectionHelper)9 EqualsHelper (com.helger.commons.equals.EqualsHelper)9 ErrorList (com.helger.commons.error.list.ErrorList)9 IErrorList (com.helger.commons.error.list.IErrorList)9 MathHelper (com.helger.commons.math.MathHelper)9 ETriState (com.helger.commons.state.ETriState)9 StringHelper (com.helger.commons.string.StringHelper)9 Serializable (java.io.Serializable)9 LocalDate (java.time.LocalDate)9 Consumer (java.util.function.Consumer)9