Search in sources :

Example 41 with CodeType

use of org.geotoolkit.gml.xml.v311.CodeType in project UVMS-ActivityModule-APP by UnionVMS.

the class ActivityEntityToModelMapper method mapFisheryTypeCode.

private void mapFisheryTypeCode(FishingActivity target, FishingActivityEntity source) {
    if (ObjectUtils.allNotNull(target, source) && (StringUtils.isNotEmpty(source.getFisheryTypeCode()) || StringUtils.isNotEmpty(source.getFisheryTypeCodeListId()))) {
        CodeType codeType = new CodeType();
        if (StringUtils.isNotEmpty(source.getFisheryTypeCode())) {
            codeType.setValue(source.getFisheryTypeCode());
        }
        if (StringUtils.isNotEmpty(source.getFisheryTypeCodeListId())) {
            codeType.setListID(source.getFisheryTypeCodeListId());
        }
        target.setFisheryTypeCode(codeType);
    }
}
Also used : CodeType(un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType)

Example 42 with CodeType

use of org.geotoolkit.gml.xml.v311.CodeType in project UVMS-ActivityModule-APP by UnionVMS.

the class MapperUtil method getRegistrationLocation.

public static RegistrationLocation getRegistrationLocation() {
    IDType countryID = getIdType("XEU", "TERRITORY");
    List<TextType> descriptions = Arrays.asList(getTextType("This is Test Text"));
    CodeType geopoliticalRegionCode = getCodeType("Region Code 1", "57tug6-tfu576-5tud75-t57e5td-56tdwe");
    List<IDType> ids = Arrays.asList(getIdType("ID 2", "fhtyr8-45jrf-5784fhrt-thf75"));
    List<TextType> names = Arrays.asList(getTextType("This is Test Name"));
    CodeType typeCode = getCodeType("Code type 1", "475rhf-587trhdy-thgy576-thfr64");
    RegistrationLocation registrationLocation = new RegistrationLocation(countryID, descriptions, geopoliticalRegionCode, ids, names, typeCode, null);
    return registrationLocation;
}
Also used : RegistrationLocation(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.RegistrationLocation) CodeType(un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType) IDType(un.unece.uncefact.data.standard.unqualifieddatatype._20.IDType) TextType(un.unece.uncefact.data.standard.unqualifieddatatype._20.TextType)

Example 43 with CodeType

use of org.geotoolkit.gml.xml.v311.CodeType in project UVMS-ActivityModule-APP by UnionVMS.

the class MapperUtil method getFluxLocation.

public static FLUXLocation getFluxLocation() {
    FLUXLocation fluxLocation = new FLUXLocation();
    CodeType typeCode = getCodeType("AREA", "FLUX_LOCATION_TYPE");
    IDType countryID = getIdType("XEU", "TERRITORY");
    CodeType regionalFisheriesManagementOrganizationCode = getCodeType("RFMO1", "fhty58-gh586t-5tjf8-t58rjewe");
    FLUXGeographicalCoordinate specifiedPhysicalFLUXGeographicalCoordinate = getFluxGeographicalCoordinate();
    IDType id = getIdType("25.5b", "FAO_AREA");
    CodeType geopoliticalRegionCode = getCodeType("Code type 2", "fhty258-g3h586t-5t4jf8-t58rjew5e");
    List<TextType> names = Arrays.asList(getTextType("This is sample name"));
    IDType sovereignRightsCountryID = getIdType("sovereign rights id 1", "fhty58-gh5486t-5t5jf8-t58rjewe");
    IDType jurisdictionCountryID = getIdType("jurisdiction country id 1", "fht1y58-gh5876t-5t3jf8-t58rjewe");
    List<FLUXCharacteristic> applicableFLUXCharacteristics = null;
    List<StructuredAddress> postalStructuredAddresses = Arrays.asList(getStructuredAddress());
    StructuredAddress physicalStructuredAddress = getStructuredAddress();
    fluxLocation.setTypeCode(typeCode);
    fluxLocation.setCountryID(countryID);
    fluxLocation.setRegionalFisheriesManagementOrganizationCode(regionalFisheriesManagementOrganizationCode);
    fluxLocation.setSpecifiedPhysicalFLUXGeographicalCoordinate(specifiedPhysicalFLUXGeographicalCoordinate);
    fluxLocation.setID(id);
    fluxLocation.setGeopoliticalRegionCode(geopoliticalRegionCode);
    fluxLocation.setNames(names);
    fluxLocation.setSovereignRightsCountryID(sovereignRightsCountryID);
    fluxLocation.setJurisdictionCountryID(jurisdictionCountryID);
    fluxLocation.setApplicableFLUXCharacteristics(applicableFLUXCharacteristics);
    fluxLocation.setPostalStructuredAddresses(postalStructuredAddresses);
    fluxLocation.setPhysicalStructuredAddress(physicalStructuredAddress);
    return fluxLocation;
}
Also used : FLUXGeographicalCoordinate(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FLUXGeographicalCoordinate) FLUXLocation(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FLUXLocation) CodeType(un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType) StructuredAddress(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.StructuredAddress) IDType(un.unece.uncefact.data.standard.unqualifieddatatype._20.IDType) FLUXCharacteristic(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FLUXCharacteristic) TextType(un.unece.uncefact.data.standard.unqualifieddatatype._20.TextType)

Example 44 with CodeType

use of org.geotoolkit.gml.xml.v311.CodeType in project UVMS-ActivityModule-APP by UnionVMS.

the class MapperUtil method getGearProblem.

public static GearProblem getGearProblem() {
    CodeType typeCode = getCodeType("Code Type 1", "fhty58-gh586t-5tjf8-t58rjewe");
    QuantityType affectedQuantity = getQuantityType(222);
    List<CodeType> recoveryMeasureCodes = Arrays.asList(getCodeType("Quantity Code 1", "57t3yf-ght43yrf-ght56yru-ght7565h"));
    List<FishingGear> relatedFishingGears = Arrays.asList(getFishingGear());
    GearProblem gearProblem = new GearProblem(typeCode, affectedQuantity, recoveryMeasureCodes, Arrays.asList(getFluxLocation()), relatedFishingGears);
    return gearProblem;
}
Also used : GearProblem(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.GearProblem) QuantityType(un.unece.uncefact.data.standard.unqualifieddatatype._20.QuantityType) FishingGear(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FishingGear) CodeType(un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType)

Example 45 with CodeType

use of org.geotoolkit.gml.xml.v311.CodeType 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

CodeType (un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType)46 IDType (un.unece.uncefact.data.standard.unqualifieddatatype._20.IDType)15 ArrayList (java.util.ArrayList)13 TextType (un.unece.uncefact.data.standard.unqualifieddatatype._20.TextType)10 DateTimeType (un.unece.uncefact.data.standard.unqualifieddatatype._20.DateTimeType)9 BigDecimal (java.math.BigDecimal)7 CGlobal (com.helger.commons.CGlobal)6 ValueEnforcer (com.helger.commons.ValueEnforcer)6 CollectionHelper (com.helger.commons.collection.CollectionHelper)6 EqualsHelper (com.helger.commons.equals.EqualsHelper)6 ErrorList (com.helger.commons.error.list.ErrorList)6 IErrorList (com.helger.commons.error.list.IErrorList)6 MathHelper (com.helger.commons.math.MathHelper)6 ETriState (com.helger.commons.state.ETriState)6 StringHelper (com.helger.commons.string.StringHelper)6 Serializable (java.io.Serializable)6 LocalDate (java.time.LocalDate)6 Consumer (java.util.function.Consumer)6 Nonnull (javax.annotation.Nonnull)6 Nullable (javax.annotation.Nullable)6