Search in sources :

Example 11 with MeasureType

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

the class MapperUtil method getFaCatch.

public static FACatch getFaCatch() {
    CodeType speciesCode = getCodeType("ONBOARD", "FAO_SPECIES");
    QuantityType unitQuantity = getQuantityType(100);
    MeasureType weightMeasure = getMeasureType(123, "C62", "586jhg-5htuf95-5jfit-5jtier8");
    CodeType weighingMeansCode = getCodeType("Weighing means code 1", "5854tt5-gjtdir-5j85tui-589git");
    CodeType usageCode = getCodeType("Usage code 1", "58thft-58fjd8-gt85eje-hjgute8");
    CodeType typeCode = getCodeType("Type code 1", "FA_CATCH_TYPE");
    final List<FishingTrip> relatedFishingTrips = Arrays.asList(getFishingTrip());
    SizeDistribution specifiedSizeDistribution = getSizeDistribution();
    List<AAPStock> relatedAAPStocks = Arrays.asList(getAapStock());
    List<AAPProcess> appliedAAPProcesses = Arrays.asList(getAapProcess());
    List<SalesBatch> relatedSalesBatches = null;
    List<FLUXLocation> specifiedFLUXLocations = Arrays.asList(getFluxLocation());
    List<FishingGear> usedFishingGears = Arrays.asList(getFishingGear());
    List<FLUXCharacteristic> applicableFLUXCharacteristics = Arrays.asList(getFluxCharacteristics());
    List<FLUXLocation> destinationFLUXLocations = Arrays.asList(getFluxLocation());
    FACatch faCatch = new FACatch(speciesCode, unitQuantity, weightMeasure, weighingMeansCode, usageCode, typeCode, relatedFishingTrips, specifiedSizeDistribution, relatedAAPStocks, appliedAAPProcesses, relatedSalesBatches, specifiedFLUXLocations, usedFishingGears, applicableFLUXCharacteristics, destinationFLUXLocations);
    return faCatch;
}
Also used : SizeDistribution(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.SizeDistribution) FishingGear(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FishingGear) MeasureType(un.unece.uncefact.data.standard.unqualifieddatatype._20.MeasureType) AAPStock(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.AAPStock) FLUXCharacteristic(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FLUXCharacteristic) SalesBatch(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.SalesBatch) QuantityType(un.unece.uncefact.data.standard.unqualifieddatatype._20.QuantityType) FLUXLocation(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FLUXLocation) AAPProcess(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.AAPProcess) FishingTrip(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FishingTrip) CodeType(un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType) FACatch(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FACatch)

Example 12 with MeasureType

use of un.unece.uncefact.data.standard.unqualifieddatatype._18.MeasureType in project arctic-sea by 52North.

the class GmlEncoderv321 method createMeasureType.

protected MeasureType createMeasureType(QuantityValue quantityValue) throws EncodingException {
    if (!quantityValue.isSetValue()) {
        throw missingValueParameter(MeasureType.class.getName());
    }
    MeasureType measureType = MeasureType.Factory.newInstance(getXmlOptions());
    measureType.setDoubleValue(quantityValue.getValue().doubleValue());
    measureType.setUom(Optional.ofNullable(quantityValue.getUnit()).filter(Predicates.not(String::isEmpty)).orElse(OGCConstants.UNKNOWN));
    return measureType;
}
Also used : MeasureType(net.opengis.gml.x32.MeasureType)

Aggregations

MeasureType (un.unece.uncefact.data.standard.unqualifieddatatype._20.MeasureType)9 CodeType (un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType)5 QuantityType (un.unece.uncefact.data.standard.unqualifieddatatype._20.QuantityType)5 BigDecimal (java.math.BigDecimal)4 FLUXLocation (un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FLUXLocation)4 DateTimeType (un.unece.uncefact.data.standard.unqualifieddatatype._20.DateTimeType)4 FLUXCharacteristic (un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FLUXCharacteristic)3 DelimitedPeriod (un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.DelimitedPeriod)2 FACatch (un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FACatch)2 FLAPDocument (un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FLAPDocument)2 FishingGear (un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FishingGear)2 FishingTrip (un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FishingTrip)2 SizeDistribution (un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.SizeDistribution)2 IndicatorType (un.unece.uncefact.data.standard.unqualifieddatatype._20.IndicatorType)2 MobileTerminalType (eu.europa.ec.fisheries.schema.mobileterminal.types.v1.MobileTerminalType)1 AbstractRestServiceTest (eu.europa.ec.fisheries.uvms.docker.validation.common.AbstractRestServiceTest)1 Asset (eu.europa.ec.fisheries.wsdl.asset.types.Asset)1 ArrayList (java.util.ArrayList)1 Date (java.util.Date)1 GregorianCalendar (java.util.GregorianCalendar)1