Search in sources :

Example 51 with CodeType

use of org.geotoolkit.ows.xml.v110.CodeType 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)

Example 52 with CodeType

use of org.geotoolkit.ows.xml.v110.CodeType in project UVMS-ActivityModule-APP by UnionVMS.

the class MapperUtil method getContactParty.

public static ContactParty getContactParty() {
    ContactParty contactParty = new ContactParty();
    CodeType roleCode = getCodeType("MASTER", "FLUX_CONTACT_ ROLE");
    contactParty.setRoleCodes(Arrays.asList(roleCode));
    contactParty.setSpecifiedContactPersons(Arrays.asList(getContactPerson()));
    contactParty.setSpecifiedStructuredAddresses(Arrays.asList(getStructuredAddress()));
    return contactParty;
}
Also used : CodeType(un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType) ContactParty(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.ContactParty)

Example 53 with CodeType

use of org.geotoolkit.ows.xml.v110.CodeType in project UVMS-ActivityModule-APP by UnionVMS.

the class GearProblemMapper method mapToGearProblemRecoveries.

protected Set<GearProblemRecoveryEntity> mapToGearProblemRecoveries(List<CodeType> codeTypes, GearProblemEntity gearProblemEntity) {
    if (codeTypes == null || codeTypes.isEmpty()) {
        Collections.emptySet();
    }
    Set<GearProblemRecoveryEntity> gearProblemRecoveries = new HashSet<>();
    for (CodeType codeType : codeTypes) {
        GearProblemRecoveryEntity gearProblemRecovery = GearProblemMapper.INSTANCE.mapToGearProblemRecoveryEntity(codeType);
        gearProblemRecovery.setGearProblem(gearProblemEntity);
        gearProblemRecoveries.add(gearProblemRecovery);
    }
    return gearProblemRecoveries;
}
Also used : GearProblemRecoveryEntity(eu.europa.ec.fisheries.ers.fa.entities.GearProblemRecoveryEntity) CodeType(un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType) HashSet(java.util.HashSet)

Example 54 with CodeType

use of org.geotoolkit.ows.xml.v110.CodeType in project UVMS-ActivityModule-APP by UnionVMS.

the class ContactPartyMapper method getContactPartyRoles.

protected Set<ContactPartyRoleEntity> getContactPartyRoles(List<CodeType> codeTypes, ContactPartyEntity contactPartyEntity) {
    if (CollectionUtils.isEmpty(codeTypes)) {
        return Collections.emptySet();
    }
    Set<ContactPartyRoleEntity> contactPartyRoles = new HashSet<>();
    for (CodeType codeType : codeTypes) {
        ContactPartyRoleEntity contactPartyRoleEntity = ContactPartyMapper.INSTANCE.mapToContactPartyRoleEntity(codeType);
        contactPartyRoleEntity.setContactParty(contactPartyEntity);
        contactPartyRoles.add(contactPartyRoleEntity);
    }
    return contactPartyRoles;
}
Also used : CodeType(un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType) ContactPartyRoleEntity(eu.europa.ec.fisheries.ers.fa.entities.ContactPartyRoleEntity) HashSet(java.util.HashSet)

Example 55 with CodeType

use of org.geotoolkit.ows.xml.v110.CodeType in project UVMS-ActivityModule-APP by UnionVMS.

the class BaseMapper method mapToSizeDistributionClassCodes.

public static Set<SizeDistributionClassCodeEntity> mapToSizeDistributionClassCodes(List<CodeType> codeTypes, SizeDistributionEntity sizeDistributionEntity) {
    if (codeTypes == null || codeTypes.isEmpty()) {
        Collections.emptySet();
    }
    Set<SizeDistributionClassCodeEntity> classCodes = new HashSet<>();
    for (CodeType codeType : codeTypes) {
        SizeDistributionClassCodeEntity entity = SizeDistributionMapper.INSTANCE.mapToSizeDistributionClassCodeEntity(codeType);
        entity.setSizeDistribution(sizeDistributionEntity);
        classCodes.add(entity);
    }
    return classCodes;
}
Also used : SizeDistributionClassCodeEntity(eu.europa.ec.fisheries.ers.fa.entities.SizeDistributionClassCodeEntity) CodeType(un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType) Sets.newHashSet(com.google.common.collect.Sets.newHashSet) HashSet(java.util.HashSet)

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