branch feature/8180 updated (4b96b1f -> b47af30)
This is an automated email from the git hooks/post-receive script. New change to branch feature/8180 in repository echobase. See https://gitlab.nuiton.org/codelutin/echobase.git from 4b96b1f Create basic import AncillaryInstrumentation for Mooring new b47af30 Add forgotten columns (refs #8370) The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit b47af301a055796ef3a6d9d3715a35508006a419 Author: Julien Ruchaud <julien.ruchaud@debux.org> Date: Wed Jun 29 19:00:08 2016 +0200 Add forgotten columns (refs #8370) Summary of changes: .../actions/ImportAcousticsActionSupport.java | 24 ++++++++++++++------- .../importdata/MooringAcousticImportServiceIT.java | 2 +- .../importdata/VoyageAcousticImportServiceIT.java | 2 +- .../import-data/acoustic/movies_small.csv.gz | Bin 6972 -> 7963 bytes 4 files changed, 18 insertions(+), 10 deletions(-) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/8180 in repository echobase. See https://gitlab.nuiton.org/codelutin/echobase.git commit b47af301a055796ef3a6d9d3715a35508006a419 Author: Julien Ruchaud <julien.ruchaud@debux.org> Date: Wed Jun 29 19:00:08 2016 +0200 Add forgotten columns (refs #8370) --- .../actions/ImportAcousticsActionSupport.java | 24 ++++++++++++++------- .../importdata/MooringAcousticImportServiceIT.java | 2 +- .../importdata/VoyageAcousticImportServiceIT.java | 2 +- .../import-data/acoustic/movies_small.csv.gz | Bin 6972 -> 7963 bytes 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/actions/ImportAcousticsActionSupport.java b/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/actions/ImportAcousticsActionSupport.java index e8e714d..7fe92f2 100644 --- a/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/actions/ImportAcousticsActionSupport.java +++ b/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/actions/ImportAcousticsActionSupport.java @@ -428,7 +428,7 @@ public abstract class ImportAcousticsActionSupport<M extends ImportAcousticsConf esduRow.setEsduCellDataDepth(data.getDataValue()); } { - Data data = esduCellDataByMeta.get(dataMetadataProvider.getDepthRefSurfaceStartDataMetadata()); + Data data = esduCellDataByMeta.get(dataMetadataProvider.getDepthRefStartDataMetadata(false)); Preconditions.checkNotNull(data); esduRow.setCellDepthStart(Float.valueOf(data.getDataValue())); } @@ -490,8 +490,12 @@ public abstract class ImportAcousticsActionSupport<M extends ImportAcousticsConf elementaryRow.setCellLongitude(Float.valueOf(data.getDataValue())); } { - Data data = elementaryCellDataByMeta.get(dataMetadataProvider.getDepthRefSurfaceStartDataMetadata()); - Preconditions.checkState(data == null, "Elementary cell can't use depthRefSurface dataMeta"); + Data data = elementaryCellDataByMeta.get(dataMetadataProvider.getDepthRefStartDataMetadata(true)); + if (data == null) { + data = elementaryCellDataByMeta.get(dataMetadataProvider.getDepthRefStartDataMetadata(false)); + } + Preconditions.checkNotNull(data); + elementaryRow.setCellDepthStart(Float.valueOf(data.getDataValue())); } { Data data = elementaryCellDataByMeta.get(dataMetadataProvider.getDepthRefEndDataMetadata(true)); @@ -575,7 +579,7 @@ public abstract class ImportAcousticsActionSupport<M extends ImportAcousticsConf // create depth start data dataValue = String.valueOf(row.getCellDepthStart()); - createCellData(cell, dataMetadataProvider.getDepthRefSurfaceStartDataMetadata(), dataValue, dataQuality, importResult, false, rowNumber); + createCellData(cell, dataMetadataProvider.getDepthRefStartDataMetadata(false), dataValue, dataQuality, importResult, false, rowNumber); // create Time Start data dataValue = cellDateFormat.format(row.getCellDateStart()); @@ -636,6 +640,10 @@ public abstract class ImportAcousticsActionSupport<M extends ImportAcousticsConf dataValue = String.valueOf(row.getCellLongitude()); createCellData(cell, dataMetadataProvider.getLongitudeDataMetadata(), dataValue, dataQuality, importResult, false, rowNumber); + // create depth start data + dataValue = String.valueOf(row.getCellDepthStart()); + createCellData(cell, dataMetadataProvider.getDepthRefStartDataMetadata(surface), dataValue, dataQuality, importResult, false, rowNumber); + // create depth end data dataValue = String.valueOf(row.getCellDepthEnd()); createCellData(cell, dataMetadataProvider.getDepthRefEndDataMetadata(surface), dataValue, dataQuality, importResult, false, rowNumber); @@ -811,7 +819,7 @@ public abstract class ImportAcousticsActionSupport<M extends ImportAcousticsConf private final DataMetadata numberOfSamplesEchoIntegratedDataMetadata; private final DataMetadata depthRefSurfaceStartDataMetadata; private final DataMetadata depthRefSurfaceEndDataMetadata; - // private final DataMetadata depthRefBottomStartDataMetadata; + private final DataMetadata depthRefBottomStartDataMetadata; private final DataMetadata depthRefBottomEndDataMetadata; public DataMetadataProvider(C importDataContext) { @@ -830,7 +838,7 @@ public abstract class ImportAcousticsActionSupport<M extends ImportAcousticsConf numberOfSamplesEchoIntegratedDataMetadata = dataMetadatasByName.get("NumberOfSamplesEchoIntegrated"); depthRefSurfaceStartDataMetadata = dataMetadatasByName.get("DepthRefSurfaceStart"); depthRefSurfaceEndDataMetadata = dataMetadatasByName.get("DepthRefSurfaceEnd"); -// depthRefBottomStartDataMetadata = dataMetadatasByName.get("DepthRefBottomStart"); + depthRefBottomStartDataMetadata = dataMetadatasByName.get("DepthRefBottomStart"); depthRefBottomEndDataMetadata = dataMetadatasByName.get("DepthRefBottomEnd"); } @@ -878,8 +886,8 @@ public abstract class ImportAcousticsActionSupport<M extends ImportAcousticsConf return numberOfSamplesEchoIntegratedDataMetadata; } - public DataMetadata getDepthRefSurfaceStartDataMetadata() { - return depthRefSurfaceStartDataMetadata; + public DataMetadata getDepthRefStartDataMetadata(boolean surface) { + return surface ? depthRefSurfaceStartDataMetadata : depthRefBottomStartDataMetadata; } public DataMetadata getDepthRefEndDataMetadata(boolean surface) { diff --git a/echobase-services/src/test/java/fr/ifremer/echobase/services/service/importdata/MooringAcousticImportServiceIT.java b/echobase-services/src/test/java/fr/ifremer/echobase/services/service/importdata/MooringAcousticImportServiceIT.java index f12bdf6..7a24f9a 100644 --- a/echobase-services/src/test/java/fr/ifremer/echobase/services/service/importdata/MooringAcousticImportServiceIT.java +++ b/echobase-services/src/test/java/fr/ifremer/echobase/services/service/importdata/MooringAcousticImportServiceIT.java @@ -96,7 +96,7 @@ public class MooringAcousticImportServiceIT extends AbstractImportDataServiceIT< // int nbData = fixtures.NB_DATA(); int nbCell = 289; - int nbData = 2885; + int nbData = 3154; ImportDataFileResult importDataFileResult = Iterables.get(result.getImportResults(), 0); diff --git a/echobase-services/src/test/java/fr/ifremer/echobase/services/service/importdata/VoyageAcousticImportServiceIT.java b/echobase-services/src/test/java/fr/ifremer/echobase/services/service/importdata/VoyageAcousticImportServiceIT.java index 8146b3a..aacf2ac 100644 --- a/echobase-services/src/test/java/fr/ifremer/echobase/services/service/importdata/VoyageAcousticImportServiceIT.java +++ b/echobase-services/src/test/java/fr/ifremer/echobase/services/service/importdata/VoyageAcousticImportServiceIT.java @@ -97,7 +97,7 @@ public class VoyageAcousticImportServiceIT extends AbstractImportDataServiceIT<V // int nbData = fixtures.NB_DATA(); int nbCell = 289; - int nbData = 2885; + int nbData = 3154; ImportDataFileResult importDataFileResult = Iterables.get(result.getImportResults(), 0); diff --git a/echobase-services/src/test/resources/import-data/acoustic/movies_small.csv.gz b/echobase-services/src/test/resources/import-data/acoustic/movies_small.csv.gz index 62e9e22..bd26598 100644 Binary files a/echobase-services/src/test/resources/import-data/acoustic/movies_small.csv.gz and b/echobase-services/src/test/resources/import-data/acoustic/movies_small.csv.gz differ -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm