use of org.geotoolkit.gml.xml.v321.MeasureType in project ddf by codice.
the class WfsFilterDelegate method buildDistanceBufferType.
private JAXBElement<DistanceBufferType> buildDistanceBufferType(JAXBElement<DistanceBufferType> dbt, String propertyName, String wkt, double distance) {
MeasureType measureType = new MeasureType();
measureType.setValue(distance);
// the filter adapter normalizes all distances to meters
measureType.setUom(Wfs20Constants.METERS);
dbt.getValue().setDistance(measureType);
dbt.getValue().setExpression(filterObjectFactory.createValueReference(propertyName));
dbt.getValue().setAny(createGeometryOperand(wkt));
return dbt;
}
use of org.geotoolkit.gml.xml.v321.MeasureType in project UVMS-ActivityModule-APP by UnionVMS.
the class ActivityEntityToModelMapper method mapValueMeasure.
private void mapValueMeasure(FLUXCharacteristic target, FluxCharacteristicEntity source) {
if (ObjectUtils.allNotNull(target, source)) {
Double valueMeasure = source.getValueMeasure();
String valueMeasureUnitCode = source.getValueMeasureUnitCode();
if (valueMeasure != null || StringUtils.isNotEmpty(valueMeasureUnitCode)) {
MeasureType measureType = new MeasureType();
if (valueMeasure != null) {
measureType.setValue(new BigDecimal(valueMeasure));
}
if (StringUtils.isNotEmpty(valueMeasureUnitCode)) {
measureType.setUnitCode(valueMeasureUnitCode);
}
target.setValueMeasure(measureType);
}
}
}
use of org.geotoolkit.gml.xml.v321.MeasureType in project UVMS-ActivityModule-APP by UnionVMS.
the class MapperUtil method getDelimitedPeriod.
public static DelimitedPeriod getDelimitedPeriod() {
DateTimeType startDate = getDateTimeType("2011-07-01 11:15:00");
DateTimeType endDate = getDateTimeType("2016-07-01 11:15:00");
MeasureType measureType = getMeasureType(500, "C62", "4rhfy5-fhtydr-tyfr85-ghtyd54");
DelimitedPeriod delimitedPeriod = new DelimitedPeriod(startDate, endDate, measureType);
return delimitedPeriod;
}
use of org.geotoolkit.gml.xml.v321.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;
}
use of org.geotoolkit.gml.xml.v321.MeasureType 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;
}
Aggregations