Search in sources :

Example 16 with TextType

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));
        }
    }
}
Also used : TextType(un.unece.uncefact.data.standard.unqualifieddatatype._20.TextType)

Example 17 with 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));
    }
}
Also used : TextType(un.unece.uncefact.data.standard.unqualifieddatatype._20.TextType)

Example 18 with 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));
    }
}
Also used : TextType(un.unece.uncefact.data.standard.unqualifieddatatype._20.TextType)

Example 19 with 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;
}
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) CodeType(un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType) MeasureType(un.unece.uncefact.data.standard.unqualifieddatatype._20.MeasureType) GearCharacteristic(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.GearCharacteristic) TextType(un.unece.uncefact.data.standard.unqualifieddatatype._20.TextType)

Example 20 with TextType

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;
}
Also used : FLUXReportDocument(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FLUXReportDocument) DateTimeType(un.unece.uncefact.data.standard.unqualifieddatatype._20.DateTimeType) CodeType(un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType) IDType(un.unece.uncefact.data.standard.unqualifieddatatype._20.IDType) FLUXParty(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FLUXParty) TextType(un.unece.uncefact.data.standard.unqualifieddatatype._20.TextType)

Aggregations

TextType (un.unece.uncefact.data.standard.unqualifieddatatype._20.TextType)19 CodeType (un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType)10 IDType (un.unece.uncefact.data.standard.unqualifieddatatype._20.IDType)7 DateTimeType (un.unece.uncefact.data.standard.unqualifieddatatype._20.DateTimeType)6 BooleanType (net.opengis.swe.x20.BooleanType)3 CategoryType (net.opengis.swe.x20.CategoryType)3 CountRangeType (net.opengis.swe.x20.CountRangeType)3 CountType (net.opengis.swe.x20.CountType)3 DataArrayType (net.opengis.swe.x20.DataArrayType)3 DataRecordType (net.opengis.swe.x20.DataRecordType)3 QuantityRangeType (net.opengis.swe.x20.QuantityRangeType)3 QuantityType (net.opengis.swe.x20.QuantityType)3 TextType (net.opengis.swe.x20.TextType)3 TimeRangeType (net.opengis.swe.x20.TimeRangeType)3 TimeType (net.opengis.swe.x20.TimeType)3 VectorType (net.opengis.swe.x20.VectorType)3 CategoryRangeType (net.opengis.swe.x20.CategoryRangeType)2 DataArrayDocument (net.opengis.swe.x20.DataArrayDocument)2 DataChoiceType (net.opengis.swe.x20.DataChoiceType)2 DataRecordDocument (net.opengis.swe.x20.DataRecordDocument)2