Search in sources :

Example 1 with SizeDistribution

use of un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.SizeDistribution in project UVMS-ActivityModule-APP by UnionVMS.

the class SizeDistributionMapperTest method testSizeDistributionMapper.

@Test
public void testSizeDistributionMapper() {
    SizeDistribution sizeDistribution = MapperUtil.getSizeDistribution();
    SizeDistributionEntity sizeDistributionEntity = SizeDistributionMapper.INSTANCE.mapToSizeDistributionEntity(sizeDistribution);
    assertEquals(sizeDistribution.getCategoryCode().getValue(), sizeDistributionEntity.getCategoryCode());
    assertEquals(sizeDistribution.getCategoryCode().getListID(), sizeDistributionEntity.getCategoryCodeListId());
    assertEquals(sizeDistribution.getClassCodes().get(0).getValue(), sizeDistributionEntity.getSizeDistributionClassCode().iterator().next().getClassCode());
    assertEquals(sizeDistribution.getClassCodes().get(0).getListID(), sizeDistributionEntity.getSizeDistributionClassCode().iterator().next().getClassCodeListId());
    assertNull(sizeDistributionEntity.getFaCatch());
}
Also used : SizeDistribution(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.SizeDistribution) SizeDistributionEntity(eu.europa.ec.fisheries.ers.fa.entities.SizeDistributionEntity) Test(org.junit.Test)

Example 2 with SizeDistribution

use of un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.SizeDistribution in project UVMS-ActivityModule-APP by UnionVMS.

the class MapperUtil method getSizeDistribution.

public static SizeDistribution getSizeDistribution() {
    CodeType categoryCode = getCodeType("S6", "FA_BFT_SIZE_CATEGORY");
    List<CodeType> classCodes = Arrays.asList(getCodeType("LSC", "FISH_SIZE_CLASS"));
    SizeDistribution sizeDistribution = new SizeDistribution(categoryCode, classCodes);
    return sizeDistribution;
}
Also used : SizeDistribution(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.SizeDistribution) CodeType(un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType)

Example 3 with SizeDistribution

use of un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.SizeDistribution in project UVMS-ActivityModule-APP by UnionVMS.

the class MapperUtil method getSizeDistribution.

private static SizeDistribution getSizeDistribution(CodeType catagoryCode, CodeType classCode) {
    SizeDistribution sizeDistribution = new SizeDistribution();
    sizeDistribution.setCategoryCode(catagoryCode);
    sizeDistribution.setClassCodes(Arrays.asList(classCode));
    return sizeDistribution;
}
Also used : SizeDistribution(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.SizeDistribution)

Example 4 with SizeDistribution

use of un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.SizeDistribution in project UVMS-ActivityModule-APP by UnionVMS.

the class MapperUtil method getAapProduct.

public static AAPProduct getAapProduct() {
    CodeType speciesCode = getCodeType("Species 1", "qbdcg-3fhr5-rd4kd5-er5tgd5k");
    QuantityType quantityType = getQuantityType(123);
    MeasureType measureType = getMeasureType(123, "C62", "qbdcg-3fhr5-rd4kd5-er5tgd5k");
    CodeType weighingMeansCode = getCodeType("Weighing Means 1", "qbd43cg-3fhr5t65-rd4kd5rt4-er5tgd5k");
    CodeType usageCode = getCodeType("Usage Code 1", "qbd43cg-3fhr5t65-rd4kd5rt4-er5tgd5k");
    QuantityType packagingUnitQuantity = getQuantityType(1234);
    CodeType packagingTypeCode = getCodeType("packaging type 1", "FISH_PACKAGING");
    MeasureType packagingUnitAverageWeightMeasure = getMeasureType(123, "C62", "qbdcg-3fhr5-rd4kd5-er5tgd5k");
    SalesPrice totalSalesPrice = getSalesPrice(getAmountType(123, "qbd43cg-3fhr5t65-rd4kd5rt4-er5tgd5k", "1"));
    SizeDistribution specifiedSizeDistribution = getSizeDistribution(getCodeType("catagory 1", "qbd43cg-3fhr5t65-rd4kd5rt4-er5tgd5k"), getCodeType("class code1", "qbd43cg-3fhr5t65-rd45674-er5tgd5k"));
    AAPProduct aapProduct = new AAPProduct(speciesCode, quantityType, measureType, weighingMeansCode, usageCode, packagingUnitQuantity, packagingTypeCode, packagingUnitAverageWeightMeasure, null, totalSalesPrice, specifiedSizeDistribution, null, null);
    return aapProduct;
}
Also used : SalesPrice(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.SalesPrice) QuantityType(un.unece.uncefact.data.standard.unqualifieddatatype._20.QuantityType) SizeDistribution(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.SizeDistribution) AAPProduct(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.AAPProduct) CodeType(un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType) MeasureType(un.unece.uncefact.data.standard.unqualifieddatatype._20.MeasureType)

Example 5 with SizeDistribution

use of un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.SizeDistribution 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)

Aggregations

SizeDistribution (un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.SizeDistribution)5 CodeType (un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType)3 MeasureType (un.unece.uncefact.data.standard.unqualifieddatatype._20.MeasureType)2 QuantityType (un.unece.uncefact.data.standard.unqualifieddatatype._20.QuantityType)2 SizeDistributionEntity (eu.europa.ec.fisheries.ers.fa.entities.SizeDistributionEntity)1 Test (org.junit.Test)1 AAPProcess (un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.AAPProcess)1 AAPProduct (un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.AAPProduct)1 AAPStock (un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.AAPStock)1 FACatch (un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FACatch)1 FLUXCharacteristic (un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FLUXCharacteristic)1 FLUXLocation (un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FLUXLocation)1 FishingGear (un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FishingGear)1 FishingTrip (un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FishingTrip)1 SalesBatch (un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.SalesBatch)1 SalesPrice (un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.SalesPrice)1