This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository echobase. See https://gitlab.nuiton.org/codelutin/echobase.git commit 58a129ed9af569829976ae719b39025400a92180 Author: Tony CHEMIT <chemit@codelutin.com> Date: Fri Apr 29 12:23:48 2016 +0200 Suppression de la colonne units de l'import SubSample (See #8294) --- .../actions/VoyageCatchesSubSampleImportAction.java | 4 ---- .../csv/VoyageCatchesSubSampleImportExportModel.java | 5 +---- .../importdata/csv/VoyageCatchesSubSampleImportRow.java | 12 +----------- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/actions/VoyageCatchesSubSampleImportAction.java b/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/actions/VoyageCatchesSubSampleImportAction.java index b6bb2a8..495eafe 100644 --- a/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/actions/VoyageCatchesSubSampleImportAction.java +++ b/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/actions/VoyageCatchesSubSampleImportAction.java @@ -308,24 +308,20 @@ public class VoyageCatchesSubSampleImportAction extends VoyageCatchesImportDataA if (sampleDataTypeNumberAtLength.equals(sampleDataType)) { importedRow.setNumberAtLength(sampleData.getDataValue()); -// importedRow.setUnits(sampleDataType.getUnits()); } else if (sampleDataTypeNumberAtLength05cm.equals(sampleDataType)) { importedRow.setNumberAtLength(sampleData.getDataValue()); importedRow.setRound(5); -// importedRow.setUnits(sampleDataType.getUnits()); } else if (sampleDataTypeNumberAtLength1cm.equals(sampleDataType)) { importedRow.setNumberAtLength(sampleData.getDataValue()); importedRow.setRound(1); -// importedRow.setUnits(sampleDataType.getUnits()); } else if (sampleDataTypeWeightAtLength.equals(sampleDataType)) { importedRow.setWeightAtLength(sampleData.getDataValue()); - importedRow.setUnits(sampleDataType.getUnits()); } else { throw new IllegalStateException("Can't deal with this sampleData: " + sampleData); diff --git a/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/csv/VoyageCatchesSubSampleImportExportModel.java b/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/csv/VoyageCatchesSubSampleImportExportModel.java index c3e6e6d..376ae8b 100644 --- a/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/csv/VoyageCatchesSubSampleImportExportModel.java +++ b/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/csv/VoyageCatchesSubSampleImportExportModel.java @@ -54,8 +54,7 @@ public class VoyageCatchesSubSampleImportExportModel extends EchoBaseImportExpor model.newMandatoryColumn(Sample.PROPERTY_NUMBER_SAMPLED, EchoBaseCsvUtil.PRIMITIVE_INTEGER); model.newMandatoryColumn(VoyageCatchesSubSampleImportRow.PROPERTY_NUMBER_AT_LENGTH, EchoBaseCsvUtil.PRIMITIVE_FLOAT); model.newMandatoryColumn(VoyageCatchesSubSampleImportRow.PROPERTY_WEIGHT_AT_LENGTH, EchoBaseCsvUtil.NA_TO_FLOAT_PARSER_FORMATTER); -// model.newMandatoryColumn(VoyageCatchesSubSampleImportRow.PROPERTY_UNITS); - model.newIgnoredColumn(VoyageCatchesSubSampleImportRow.PROPERTY_UNITS); + model.newMandatoryColumn(VoyageCatchesSubSampleImportRow.PROPERTY_ROUND, EchoBaseCsvUtil.NA_TO_INTEGER_PARSER_FORMATTER); return model; @@ -64,7 +63,6 @@ public class VoyageCatchesSubSampleImportExportModel extends EchoBaseImportExpor public static VoyageCatchesSubSampleImportExportModel forExport(VoyageCatchesImportDataContext importDataContext) { VoyageCatchesSubSampleImportExportModel model = new VoyageCatchesSubSampleImportExportModel(importDataContext.getCsvSeparator()); -// model.newIgnoredColumn("subHaul"); model.newColumnForExport(EchoBaseCsvUtil.OPERATION_ID, VoyageCatchesTotalSampleImportRow.PROPERTY_OPERATION, EchoBaseCsvUtil.OPERATION_FORMATTER); model.newColumnForExport(Species.PROPERTY_BARACOUDA_CODE, VoyageCatchesTotalSampleImportRow.PROPERTY_SPECIES, EchoBaseCsvUtil.SPECIES_FORMATTER); model.newColumnForExport(VoyageCatchesSubSampleImportRow.PROPERTY_SIZE_CATEGORY, EchoBaseCsvUtil.SIZE_CATEGORY_FORMATTER); @@ -74,7 +72,6 @@ public class VoyageCatchesSubSampleImportExportModel extends EchoBaseImportExpor model.newColumnForExport(Sample.PROPERTY_NUMBER_SAMPLED, EchoBaseCsvUtil.PRIMITIVE_INTEGER); model.newColumnForExport(VoyageCatchesSubSampleImportRow.PROPERTY_NUMBER_AT_LENGTH, EchoBaseCsvUtil.PRIMITIVE_FLOAT); model.newColumnForExport(VoyageCatchesSubSampleImportRow.PROPERTY_WEIGHT_AT_LENGTH, EchoBaseCsvUtil.NA_TO_FLOAT_PARSER_FORMATTER); -// model.newColumnForExport(VoyageCatchesSubSampleImportRow.PROPERTY_UNITS); model.newColumnForExport(VoyageCatchesSubSampleImportRow.PROPERTY_ROUND, EchoBaseCsvUtil.NA_TO_INTEGER_PARSER_FORMATTER); return model; diff --git a/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/csv/VoyageCatchesSubSampleImportRow.java b/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/csv/VoyageCatchesSubSampleImportRow.java index d71c1ec..1844f28 100644 --- a/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/csv/VoyageCatchesSubSampleImportRow.java +++ b/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/csv/VoyageCatchesSubSampleImportRow.java @@ -49,9 +49,8 @@ public class VoyageCatchesSubSampleImportRow { public static final String PROPERTY_LENGTH_CLASS = "lengthClass"; - public static final String PROPERTY_UNITS = "units"; - public static final String PROPERTY_ROUND = "round"; + protected final Sample sample; protected Operation operation; @@ -62,7 +61,6 @@ public class VoyageCatchesSubSampleImportRow { protected Float weightAtLength; protected String lengthClass; protected Integer round; - protected String units; public static VoyageCatchesSubSampleImportRow of(Operation operation, Sample sample) { VoyageCatchesSubSampleImportRow row = new VoyageCatchesSubSampleImportRow(sample); @@ -117,14 +115,6 @@ public class VoyageCatchesSubSampleImportRow { this.round = round; } - public String getUnits() { - return units; - } - - public void setUnits(String units) { - this.units = units; - } - public Float getSampleWeight() { return sample.getSampleWeight(); } -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.