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 943c4a4ec5c1f34addc3d88a7c9ad46f34d23eb9 Author: Julien Ruchaud <julien.ruchaud@debux.org> Date: Wed Jul 6 09:58:03 2016 +0200 Use too elementary cell --- .../ifremer/echobase/services/csv/CellValueParser.java | 18 +++++++++--------- src/site/en/rst/importData.rst | 4 +++- src/site/rst/importData.rst | 4 +++- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/CellValueParser.java b/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/CellValueParser.java index 50ec8d1..577b197 100644 --- a/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/CellValueParser.java +++ b/echobase-services/src/main/java/fr/ifremer/echobase/services/csv/CellValueParser.java @@ -48,39 +48,39 @@ public class CellValueParser implements ValueParser<Cell> { } @Override - public Cell parse(String esduCellId) throws ParseException { + public Cell parse(String cellId) throws ParseException { // get esdu cell - Cell result = getEsduCell(esduCellId); + Cell result = getCell(cellId); if (result == null) { //FIXME USe a real exception - throw new ImportRuntimeException("Can not found esdu cell [" + esduCellId + "]"); + throw new ImportRuntimeException("Can not found esdu cell [" + cellId + "]"); } return result; } - protected Cell getEsduCell(String esduCellId) throws ParseException { + protected Cell getCell(String cellId) throws ParseException { - Cell result = esduCellMap.get(esduCellId); + Cell result = esduCellMap.get(cellId); if (result == null && cellDAO != null) { try { - List<Cell> cells = cellDAO.forNameEquals(esduCellId).findAll(); + List<Cell> cells = cellDAO.forNameEquals(cellId).findAll(); if (CollectionUtils.isEmpty(cells)) { //FIXME USe a real exception - throw new ImportRuntimeException("Can not find esdu cell with name " + esduCellId); + throw new ImportRuntimeException("Can not find cell with name " + cellId); } //TODO Should check this cell is in voyage ? result = cells.get(0); // store it in cache - esduCellMap.put(esduCellId, result); + esduCellMap.put(cellId, result); } catch (TopiaException e) { //FIXME USe a real exception - throw new ImportRuntimeException("Can not find esdu cell with name " + esduCellId); + throw new ImportRuntimeException("Can not find cell with name " + cellId); } } return result; diff --git a/src/site/en/rst/importData.rst b/src/site/en/rst/importData.rst index 54560c5..e82d848 100644 --- a/src/site/en/rst/importData.rst +++ b/src/site/en/rst/importData.rst @@ -55,8 +55,10 @@ Columns format +---------------+---------------------------------------------------------------+ | (date) |ISO date format: *yyyy-MM-dd HH:mm:ss.SSSS* | +---------------+---------------------------------------------------------------+ -| (esdu cell) |esdu cell name: <date>_<depth> | +| (esdu cell) |esdu cell name: <date>_<depth>[_(S|B)] | | | with date format yyyy-MM-dd HH:mm:ss.SSSS | +| | with depth for depth number | +| | with S (surface) or B (bottom) for the elementary cell | +---------------+---------------------------------------------------------------+ Important diff --git a/src/site/rst/importData.rst b/src/site/rst/importData.rst index cb06213..f6b3b59 100644 --- a/src/site/rst/importData.rst +++ b/src/site/rst/importData.rst @@ -54,8 +54,10 @@ Format des colonnes +---------------+---------------------------------------------------------------+ | (date) |unique format de date : *yyyy-MM-dd HH:mm:ss.SSSS* | +---------------+---------------------------------------------------------------+ -| (esdu cell) |nom de cellule esdu : <date>_<depth> | +| (esdu cell) |nom de cellule esdu : <date>_<depth>[_(S|B)] | | | avec date au format yyyy-MM-dd HH:mm:ss.SSSS | +| | avec depth pour le numéro de profondeur | +| | avec S (surface) ou B (bottom) pour les cellules élémentaires | +---------------+---------------------------------------------------------------+ Notes importantes -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.