branch develop updated (be04f4d -> d7ed5b6)
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 be04f4d [jgitflow-maven-plugin]Updating develop poms back to pre merge state new 9963a9e Separate D4 new 989575e Fix date format for the cruise new d7ed5b6 Merge branch 'develop' of gitlab.nuiton.org:codelutin/echobase into develop The 3 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 d7ed5b617fa9420ad507bf2e9a29ba55765b5467 Merge: 989575e be04f4d Author: Julien Ruchaud <julien.ruchaud@debux.org> Date: Thu Nov 24 17:12:04 2016 +0100 Merge branch 'develop' of gitlab.nuiton.org:codelutin/echobase into develop commit 989575e6efe0d16dc4580b61d7fc09b1353c3b82 Author: Julien Ruchaud <julien.ruchaud@debux.org> Date: Thu Nov 24 17:11:49 2016 +0100 Fix date format for the cruise commit 9963a9e2760f1732965889164bb256a15f96994b Author: Julien Ruchaud <julien.ruchaud@debux.org> Date: Thu Nov 24 12:35:04 2016 +0100 Separate D4 Summary of changes: .../service/atlantos/xml/XmlAccousticExport.java | 119 +++++++++++---------- .../service/atlantos/xml/XmlBioticExport.java | 4 +- 2 files changed, 64 insertions(+), 59 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 9963a9e2760f1732965889164bb256a15f96994b Author: Julien Ruchaud <julien.ruchaud@debux.org> Date: Thu Nov 24 12:35:04 2016 +0100 Separate D4 --- .../service/atlantos/xml/XmlAccousticExport.java | 115 +++++++++++---------- 1 file changed, 60 insertions(+), 55 deletions(-) diff --git a/echobase-services/src/main/java/fr/ifremer/echobase/services/service/atlantos/xml/XmlAccousticExport.java b/echobase-services/src/main/java/fr/ifremer/echobase/services/service/atlantos/xml/XmlAccousticExport.java index 56687be..2d5236d 100644 --- a/echobase-services/src/main/java/fr/ifremer/echobase/services/service/atlantos/xml/XmlAccousticExport.java +++ b/echobase-services/src/main/java/fr/ifremer/echobase/services/service/atlantos/xml/XmlAccousticExport.java @@ -126,53 +126,51 @@ public class XmlAccousticExport implements EchoBaseService { // EXPORT LOG exportLog(cell, position++, xmlCruise); -// List<Result> resultsWithoutD4 = new ArrayList<Result>(); -// Result resultForD4 = null; -// -// Collection<Result> results = cell.getResult(); -// for (Result result : results) { -// if ("NASC".equals(result.getDataMetadata().getName())) { -// -// if (result.getCategory().getEchotype().getName().equals("D4")) { -// resultForD4 = result; -// } else { -// resultsWithoutD4.add(result); -// } -// } -// } -// -// if (resultForD4 != null) { -// // EXPORT SAMPLE -// exportSample(voyage, cell, resultForD4, xmlCruise); -// -// // EXPORT DATA -// exportData(resultForD4, xmlCruise); -// xmlCruise.close("Sample"); -// } -// -// if (!resultsWithoutD4.isEmpty()) { -// // EXPORT SAMPLE -// exportSample(voyage, cell, null, xmlCruise); -// -// for (Result result : resultsWithoutD4) { -// // EXPORT DATA -// exportData(result, xmlCruise); -// } -// -// xmlCruise.close("Sample"); -// } + List<Result> resultsWithoutD4 = new ArrayList<Result>(); + Result resultForD4 = null; - // EXPORT SAMPLE - exportSample(voyage, cell, null, xmlCruise); - Collection<Result> results = cell.getResult(); for (Result result : results) { if ("NASC".equals(result.getDataMetadata().getName())) { + + if (result.getCategory().getEchotype().getName().equals("D4")) { + resultForD4 = result; + } else { + resultsWithoutD4.add(result); + } + } + } + + // EXPORT SAMPLE + if (resultForD4 != null && exportSample(voyage, cell, resultForD4, xmlCruise)) { + // EXPORT DATA + exportData(resultForD4, xmlCruise); + xmlCruise.close("Sample"); + } + + if (!resultsWithoutD4.isEmpty()) { + // EXPORT SAMPLE + exportSample(voyage, cell, null, xmlCruise); + + for (Result result : resultsWithoutD4) { // EXPORT DATA - exportData(result, xmlCruise); + exportData(result, xmlCruise); } + + xmlCruise.close("Sample"); } - xmlCruise.close("Sample"); + +// // EXPORT SAMPLE +// exportSample(voyage, cell, null, xmlCruise); +// +// Collection<Result> results = cell.getResult(); +// for (Result result : results) { +// if ("NASC".equals(result.getDataMetadata().getName())) { +// // EXPORT DATA +// exportData(result, xmlCruise); +// } +// } +// xmlCruise.close("Sample"); xmlCruise.close("Log"); } @@ -365,8 +363,7 @@ public class XmlAccousticExport implements EchoBaseService { "IDREF", vocabulary.getVocabularyCode("AC_LogOrigin_" + prefix)); } - public void exportSample(Voyage voyage, Cell cell, Result result, XmlWriter xml) throws IOException { - xml.open("Sample"); + public boolean exportSample(Voyage voyage, Cell cell, Result result, XmlWriter xml) throws IOException { // Utiliser la date de début du voyage Collection<Calibration> calibrations = cell.getDataProcessing().getDataAcquisition().getAcousticInstrument().getCalibration(); @@ -393,26 +390,32 @@ public class XmlAccousticExport implements EchoBaseService { prefix = "end"; } -// Float upperDepth = 10f; -// Float lowerDepth = 30f; -// -// if (result == null) { -// Data depthData = dataValues.get("ESDUstartDepth"); -// lowerDepth = depthData != null ? Float.parseFloat(depthData.getDataValue()) : 0f; -// -// if (lowerDepth >= 50) { -// upperDepth = 30f; -// } -// } - Float upperDepth = 10f; + Float lowerDepth = 30f; + Data depthData = dataValues.get("ESDUstartDepth"); - Float lowerDepth = depthData != null ? Float.parseFloat(depthData.getDataValue()) : 0f; + Float depth = depthData != null ? Float.parseFloat(depthData.getDataValue()) : 0f; + + if (result == null) { + lowerDepth = depth; + + if (depth >= 50) { + upperDepth = 30f; + } + } else if (depth <= 50) { + return false; + } + +// Float upperDepth = 10f; +// Data depthData = dataValues.get("ESDUstartDepth"); +// Float lowerDepth = depthData != null ? Float.parseFloat(depthData.getDataValue()) : 0f; if (upperDepth >= lowerDepth) { upperDepth = 0f; } + xml.open("Sample"); + xml.create("ChannelDepthUpper", upperDepth.intValue()); xml.create("ChannelDepthLower", @@ -437,6 +440,8 @@ public class XmlAccousticExport implements EchoBaseService { "IDREF", XmlAccousticExport.getFormatedTopiaId(cell.getDataProcessing())); xml.create("PingAxisIntervalOrigin", "IDREF", vocabulary.getVocabularyCode("AC_PingAxisIntervalOrigin_" + prefix)); + + return true; } public void exportData(Result result, XmlWriter xml) throws IOException { -- 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 989575e6efe0d16dc4580b61d7fc09b1353c3b82 Author: Julien Ruchaud <julien.ruchaud@debux.org> Date: Thu Nov 24 17:11:49 2016 +0100 Fix date format for the cruise --- .../echobase/services/service/atlantos/xml/XmlAccousticExport.java | 4 ++-- .../echobase/services/service/atlantos/xml/XmlBioticExport.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/echobase-services/src/main/java/fr/ifremer/echobase/services/service/atlantos/xml/XmlAccousticExport.java b/echobase-services/src/main/java/fr/ifremer/echobase/services/service/atlantos/xml/XmlAccousticExport.java index 2d5236d..1b717b1 100644 --- a/echobase-services/src/main/java/fr/ifremer/echobase/services/service/atlantos/xml/XmlAccousticExport.java +++ b/echobase-services/src/main/java/fr/ifremer/echobase/services/service/atlantos/xml/XmlAccousticExport.java @@ -323,9 +323,9 @@ public class XmlAccousticExport implements EchoBaseService { xml.create("Platform", "IDREF", vocabulary.getVocabularyCode(transect.getVessel().getCode(), "SHIPC_35HT")); xml.create("StartDate", - EchoBaseCsvUtil.ISO8611_DATETIME_FORMATTER.format(voyage.getStartDate())); + EchoBaseCsvUtil.ISO8611_DATE_FORMATTER.format(voyage.getStartDate())); xml.create("EndDate", - EchoBaseCsvUtil.ISO8611_DATETIME_FORMATTER.format(voyage.getEndDate())); + EchoBaseCsvUtil.ISO8611_DATE_FORMATTER.format(voyage.getEndDate())); xml.create("Organisation", "IDREF", vocabulary.getVocabularyCode(voyage.getMission().getInstitution(), "EDMO_541")); xml.create("LocalID", diff --git a/echobase-services/src/main/java/fr/ifremer/echobase/services/service/atlantos/xml/XmlBioticExport.java b/echobase-services/src/main/java/fr/ifremer/echobase/services/service/atlantos/xml/XmlBioticExport.java index 84d4771..c297ee5 100644 --- a/echobase-services/src/main/java/fr/ifremer/echobase/services/service/atlantos/xml/XmlBioticExport.java +++ b/echobase-services/src/main/java/fr/ifremer/echobase/services/service/atlantos/xml/XmlBioticExport.java @@ -179,9 +179,9 @@ public class XmlBioticExport implements EchoBaseService { xml.create("Platform", "IDREF", vocabulary.getVocabularyCode(vessel.getCode(), "SHIPC_35HT")); xml.create("StartDate", - EchoBaseCsvUtil.ISO8611_DATETIME_FORMATTER.format(voyage.getStartDate())); + EchoBaseCsvUtil.ISO8611_DATE_FORMATTER.format(voyage.getStartDate())); xml.create("EndDate", - EchoBaseCsvUtil.ISO8611_DATETIME_FORMATTER.format(voyage.getEndDate())); + EchoBaseCsvUtil.ISO8611_DATE_FORMATTER.format(voyage.getEndDate())); xml.create("Organisation", "IDREF", vocabulary.getVocabularyCode(voyage.getMission().getInstitution(), "EDMO_541")); xml.create("LocalID", -- 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 d7ed5b617fa9420ad507bf2e9a29ba55765b5467 Merge: 989575e be04f4d Author: Julien Ruchaud <julien.ruchaud@debux.org> Date: Thu Nov 24 17:12:04 2016 +0100 Merge branch 'develop' of gitlab.nuiton.org:codelutin/echobase into develop echobase-domain/pom.xml | 2 +- echobase-services/pom.xml | 2 +- echobase-ui/pom.xml | 2 +- pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm