Search in sources :

Example 21 with CodeType

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

the class MapperUtil method getContactPerson.

public static ContactPerson getContactPerson() {
    TextType title = getTextType("MR");
    TextType givenName = getTextType("Test Name");
    TextType middleName = getTextType("Test Middle Name");
    TextType familyNamePrefix = getTextType("Test Prefix");
    TextType familyName = getTextType("Test Family Name");
    TextType nameSuffix = getTextType("Test Suffix");
    CodeType genderCode = getCodeType("Gender", "4ryf65-fhtfyd-thfey45-tu5r7ght");
    TextType alias = getTextType("Test Alias");
    // ContactPerson contactPerson = new ContactPerson();
    ContactPerson contactPerson = new ContactPerson(title, givenName, middleName, familyNamePrefix, familyName, nameSuffix, genderCode, alias, null, null, null, null, null, null, null);
    return contactPerson;
}
Also used : CodeType(un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType) ContactPerson(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.ContactPerson) TextType(un.unece.uncefact.data.standard.unqualifieddatatype._20.TextType)

Example 22 with CodeType

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

the class MapperUtil method getStandardFishingActivity.

private static FishingActivity getStandardFishingActivity() {
    List<IDType> ids = Arrays.asList(getIdType("Id_1", "fhr574fh-thrud754-kgitjf754-gjtufe89"));
    CodeType typeCode = getCodeType("FISHING_OPERATION", "FLUX_FA_TYPE");
    DateTimeType occurrenceDateTime = getDateTimeType("2016-07-01 11:15:00");
    CodeType reasonCode = getCodeType("Reason_code_1", "FA_REASON_DEPARTURE");
    CodeType vesselRelatedActivityCode = getCodeType("Vessel activity 1", "58thft-58fjd8-gt85eje-hjgute8");
    CodeType fisheryTypeCode = getCodeType("Fishing_Type_code 1", "FA_FISHERY");
    CodeType speciesTargetCode = getCodeType("Species code 1", "FAO_SPECIES");
    QuantityType operationsQuantity = getQuantityType(100);
    MeasureType fishingDurationMeasure = getMeasureType(500, "C62", "4hr2yf0-t583thf-6jgttue8-6jtie844");
    List<FLAPDocument> specifiedFLAPDocument = Arrays.asList(getFlapDocument());
    VesselStorageCharacteristic sourceVesselStorageCharacteristic = getVesselStorageCharacteristic();
    VesselStorageCharacteristic destinationVesselStorageCharacteristic = getVesselStorageCharacteristic();
    List<FACatch> specifiedFACatches = Arrays.asList(getFaCatch());
    List<FLUXLocation> relatedFLUXLocations = Arrays.asList(getFluxLocation());
    List<GearProblem> specifiedGearProblems = Arrays.asList(getGearProblem());
    List<FLUXCharacteristic> specifiedFLUXCharacteristics = Arrays.asList(getFluxCharacteristics());
    List<FishingGear> specifiedFishingGears = Arrays.asList(getFishingGear());
    List<DelimitedPeriod> specifiedDelimitedPeriods = Arrays.asList(getDelimitedPeriod());
    FishingTrip specifiedFishingTrip = getFishingTrip();
    List<VesselTransportMeans> relatedVesselTransportMeans = Arrays.asList(getVesselTransportMeans());
    // FishingActivity fishingActivity = new FishingActivity();
    FishingActivity fishingActivity = new FishingActivity(ids, typeCode, occurrenceDateTime, reasonCode, vesselRelatedActivityCode, fisheryTypeCode, speciesTargetCode, operationsQuantity, fishingDurationMeasure, specifiedFACatches, relatedFLUXLocations, specifiedGearProblems, specifiedFLUXCharacteristics, specifiedFishingGears, sourceVesselStorageCharacteristic, destinationVesselStorageCharacteristic, null, specifiedFLAPDocument, specifiedDelimitedPeriods, specifiedFishingTrip, relatedVesselTransportMeans);
    return fishingActivity;
}
Also used : DelimitedPeriod(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.DelimitedPeriod) FLAPDocument(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FLAPDocument) FishingGear(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FishingGear) MeasureType(un.unece.uncefact.data.standard.unqualifieddatatype._20.MeasureType) IDType(un.unece.uncefact.data.standard.unqualifieddatatype._20.IDType) GearProblem(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.GearProblem) FishingActivity(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FishingActivity) VesselStorageCharacteristic(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.VesselStorageCharacteristic) FLUXCharacteristic(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FLUXCharacteristic) VesselTransportMeans(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.VesselTransportMeans) DateTimeType(un.unece.uncefact.data.standard.unqualifieddatatype._20.DateTimeType) QuantityType(un.unece.uncefact.data.standard.unqualifieddatatype._20.QuantityType) FLUXLocation(un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FLUXLocation) 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 23 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() {
    new FLUXReportDocument();
    List<IDType> ids = Arrays.asList(getIdType("FLUX_REPORT_ID_1", "FLUX_SCHEME_ID1"));
    IDType referenceId = getIdType("REF_ID 1", "47rfh-5hry4-thfur75-4hf743");
    DateTimeType creationDateTime = getDateTimeType("2016-07-01 11:15:00");
    CodeType purposeCode = getCodeType("9", "FLUX_GP_PURPOSE");
    CodeType typeCode = getCodeType("type Code1", "fhr574fh-thrud754-kgitjf754-gjtufe89");
    List<IDType> ownerFluxPartyId = Arrays.asList(getIdType("Owner_flux_party_id_1", "flux_Party_scheme_id"));
    List<TextType> names = Arrays.asList(getTextType("fluxPartyOwnerName 1"));
    FLUXParty fluxParty = new FLUXParty(ownerFluxPartyId, names);
    FLUXReportDocument fluxReportDocument = new FLUXReportDocument(ids, referenceId, creationDateTime, purposeCode, getTextType("Purpose"), typeCode, fluxParty);
    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 24 with CodeType

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

use of org.geotoolkit.ows.xml.v110.CodeType in project sldeditor by robward-scisys.

the class SelectedProcessFunctionTest method testSetSelectedCustomFunction.

/**
 * Test method for {@link
 * com.sldeditor.rendertransformation.SelectedProcessFunction#setSelectedCustomFunction(net.opengis.wps10.ProcessDescriptionType)}.
 */
@SuppressWarnings({ "unchecked", "rawtypes" })
@Test
public void testSetSelectedCustomFunction() {
    ProcessDescriptionType process = Wps10FactoryImpl.init().createProcessDescriptionType();
    CodeType codeType = Ows11FactoryImpl.init().createCodeType();
    String expectedFunctionName = "JTS:area";
    codeType.setValue(expectedFunctionName);
    process.setIdentifier(codeType);
    InputDescriptionType inputDescription = Wps10FactoryImpl.init().createInputDescriptionType();
    CodeType codeType2 = Ows11FactoryImpl.init().createCodeType();
    codeType2.setValue("dummyParameter");
    inputDescription.setIdentifier(codeType2);
    inputDescription.setMinOccurs(BigInteger.valueOf(1));
    inputDescription.setMaxOccurs(BigInteger.valueOf(1));
    LiteralInputType literal = Wps10FactoryImpl.init().createLiteralInputType();
    DomainMetadataType domainType = Ows11FactoryImpl.init().createDomainMetadataType();
    domainType.setValue("xs:int");
    literal.setDefaultValue("1234");
    literal.setDataType(domainType);
    inputDescription.setLiteralData(literal);
    DataInputsType dataInputs = Wps10FactoryImpl.init().createDataInputsType();
    EList dataInputList = dataInputs.getInput();
    dataInputList.add(inputDescription);
    process.setDataInputs(dataInputs);
    LanguageStringType title = Ows11FactoryImpl.init().createLanguageStringType();
    title.setValue(expectedFunctionName);
    process.setTitle(title);
    SelectedProcessFunction obj = new SelectedProcessFunction();
    obj.setSelectedCustomFunction(process);
    assertFalse(obj.isBuiltInSelected());
    assertTrue(obj.getFunctionName().getLocalPart().compareTo(expectedFunctionName) == 0);
    assertEquals(1, obj.getRowCount());
    assertFalse(obj.extractParameters().isEmpty());
    obj.setSelectedCustomFunction(null);
    assertFalse(obj.isBuiltInSelected());
    assertNull(obj.getFunctionName());
    assertEquals(0, obj.getRowCount());
    assertTrue(obj.extractParameters().isEmpty());
}
Also used : DomainMetadataType(net.opengis.ows11.DomainMetadataType) SelectedProcessFunction(com.sldeditor.rendertransformation.SelectedProcessFunction) InputDescriptionType(net.opengis.wps10.InputDescriptionType) EList(org.eclipse.emf.common.util.EList) LanguageStringType(net.opengis.ows11.LanguageStringType) ProcessDescriptionType(net.opengis.wps10.ProcessDescriptionType) DataInputsType(net.opengis.wps10.DataInputsType) CodeType(net.opengis.ows11.CodeType) LiteralInputType(net.opengis.wps10.LiteralInputType) Test(org.junit.jupiter.api.Test)

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