branch develop updated (38dcf19 -> 260dd19)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository echobase. See https://gitlab.nuiton.org/codelutin/echobase.git from 38dcf19 [jgitflow-maven-plugin]Updating develop poms back to pre merge state new 5d3377b Add forgotten columns (refs #8370) new 260dd19 Add forgotten columns (refs #8370) The 2 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 260dd19d3f7e533d186daa3499f31d2566d8d8bd Author: Julien Ruchaud <julien.ruchaud@debux.org> Date: Wed Jun 29 19:07:47 2016 +0200 Add forgotten columns (refs #8370) commit 5d3377b0a44edc7fe3d62c7ad722e176d49a89fa Author: Julien Ruchaud <julien.ruchaud@debux.org> Date: Wed Jun 29 18:37:43 2016 +0200 Add forgotten columns (refs #8370) Summary of changes: .../actions/VoyageAcousticsImportAction.java | 25 ++++++++++++++------- .../importdata/VoyageAcousticImportServiceIT.java | 2 +- .../import-data/acoustic/movies_small.csv.gz | Bin 6972 -> 7963 bytes 3 files changed, 18 insertions(+), 9 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 develop in repository echobase. See https://gitlab.nuiton.org/codelutin/echobase.git commit 5d3377b0a44edc7fe3d62c7ad722e176d49a89fa Author: Julien Ruchaud <julien.ruchaud@debux.org> Date: Wed Jun 29 18:37:43 2016 +0200 Add forgotten columns (refs #8370) --- .../actions/VoyageAcousticsImportAction.java | 33 +++++++++++---------- .../importdata/VoyageAcousticImportServiceIT.java | 2 +- .../import-data/acoustic/movies_small.csv.gz | Bin 6972 -> 6500 bytes 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/actions/VoyageAcousticsImportAction.java b/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/actions/VoyageAcousticsImportAction.java index f2049e6..00835ba 100644 --- a/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/actions/VoyageAcousticsImportAction.java +++ b/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/actions/VoyageAcousticsImportAction.java @@ -53,6 +53,7 @@ import fr.ifremer.echobase.services.service.importdata.ImportDataFileResult; import fr.ifremer.echobase.services.service.importdata.TransectNotFoundException; import fr.ifremer.echobase.services.service.importdata.TransitNotFoundException; import fr.ifremer.echobase.services.service.importdata.configurations.VoyageAcousticsImportConfiguration; +import fr.ifremer.echobase.services.service.importdata.contexts.ImportDataContextSupport; import fr.ifremer.echobase.services.service.importdata.contexts.VoyageAcousticsImportDataContext; import fr.ifremer.echobase.services.service.importdata.csv.VoyageAcousticImportExportModel; import fr.ifremer.echobase.services.service.importdata.csv.VoyageAcousticImportRow; @@ -441,7 +442,7 @@ public class VoyageAcousticsImportAction extends VoyageAcousticsImportDataAction 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())); } @@ -484,8 +485,6 @@ public class VoyageAcousticsImportAction extends VoyageAcousticsImportDataAction } } - int esduRowCellNum = 0; - for (Cell elementaryCell : elementaryCells) { VoyageAcousticImportRow elementaryRow = VoyageAcousticImportRow.ofElementaryCell(processingTemplate, dataAcquisition, dataProcessing, elementaryCell, radialNumberDataMetadata); @@ -503,8 +502,12 @@ public class VoyageAcousticsImportAction extends VoyageAcousticsImportDataAction 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)); @@ -556,15 +559,11 @@ public class VoyageAcousticsImportAction extends VoyageAcousticsImportDataAction elementaryRow.setEsduCellDataDepth(esduRow.getEsduCellDataDepth()); addImportedRow(result, elementaryRow); - - esduRowCellNum = elementaryRow.getCellNum() + 1; - } - esduRow.setCellNum(esduRowCellNum); + esduRow.setCellNum(elementaryCells.size()); addImportedRow(result, esduRow); - } private DataAcquisition getDataAcquisition(Transect transect, AcousticInstrument instrument, boolean addDataAcquisition) { @@ -611,7 +610,7 @@ public class VoyageAcousticsImportAction extends VoyageAcousticsImportDataAction // 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()); @@ -672,6 +671,10 @@ public class VoyageAcousticsImportAction extends VoyageAcousticsImportDataAction 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); @@ -848,7 +851,7 @@ public class VoyageAcousticsImportAction extends VoyageAcousticsImportDataAction 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(VoyageAcousticsImportDataContext importDataContext) { @@ -867,7 +870,7 @@ public class VoyageAcousticsImportAction extends VoyageAcousticsImportDataAction numberOfSamplesEchoIntegratedDataMetadata = dataMetadatasByName.get("NumberOfSamplesEchoIntegrated"); depthRefSurfaceStartDataMetadata = dataMetadatasByName.get("DepthRefSurfaceStart"); depthRefSurfaceEndDataMetadata = dataMetadatasByName.get("DepthRefSurfaceEnd"); -// depthRefBottomStartDataMetadata = dataMetadatasByName.get("DepthRefBottomStart"); + depthRefBottomStartDataMetadata = dataMetadatasByName.get("DepthRefBottomStart"); depthRefBottomEndDataMetadata = dataMetadatasByName.get("DepthRefBottomEnd"); } @@ -915,8 +918,8 @@ public class VoyageAcousticsImportAction extends VoyageAcousticsImportDataAction 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/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..4010675 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>.
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 260dd19d3f7e533d186daa3499f31d2566d8d8bd Author: Julien Ruchaud <julien.ruchaud@debux.org> Date: Wed Jun 29 19:07:47 2016 +0200 Add forgotten columns (refs #8370) --- .../actions/VoyageAcousticsImportAction.java | 8 +++++++- .../import-data/acoustic/movies_small.csv.gz | Bin 6500 -> 7963 bytes 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/actions/VoyageAcousticsImportAction.java b/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/actions/VoyageAcousticsImportAction.java index 00835ba..4642df2 100644 --- a/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/actions/VoyageAcousticsImportAction.java +++ b/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/actions/VoyageAcousticsImportAction.java @@ -485,6 +485,8 @@ public class VoyageAcousticsImportAction extends VoyageAcousticsImportDataAction } } + int esduRowCellNum = 0; + for (Cell elementaryCell : elementaryCells) { VoyageAcousticImportRow elementaryRow = VoyageAcousticImportRow.ofElementaryCell(processingTemplate, dataAcquisition, dataProcessing, elementaryCell, radialNumberDataMetadata); @@ -559,11 +561,15 @@ public class VoyageAcousticsImportAction extends VoyageAcousticsImportDataAction elementaryRow.setEsduCellDataDepth(esduRow.getEsduCellDataDepth()); addImportedRow(result, elementaryRow); + + esduRowCellNum = elementaryRow.getCellNum() + 1; + } - esduRow.setCellNum(elementaryCells.size()); + esduRow.setCellNum(esduRowCellNum); addImportedRow(result, esduRow); + } private DataAcquisition getDataAcquisition(Transect transect, AcousticInstrument instrument, boolean addDataAcquisition) { 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 4010675..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