branch develop updated (53bf52b -> ef5deef)
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 53bf52b Correct export atlantos new ef5deef Fix unique sample 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 ef5deefd681944b222b6c59fb0d8d27dcffe7d69 Author: Julien Ruchaud <julien.ruchaud@debux.org> Date: Mon Nov 21 16:47:17 2016 +0100 Fix unique sample Summary of changes: .../service/atlantos/xml/XmlAccousticExport.java | 75 +++++++++++++++++----- .../service/atlantos/xml/XmlBioticExport.java | 2 + 2 files changed, 60 insertions(+), 17 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 ef5deefd681944b222b6c59fb0d8d27dcffe7d69 Author: Julien Ruchaud <julien.ruchaud@debux.org> Date: Mon Nov 21 16:47:17 2016 +0100 Fix unique sample --- .../service/atlantos/xml/XmlAccousticExport.java | 75 +++++++++++++++++----- .../service/atlantos/xml/XmlBioticExport.java | 2 + 2 files changed, 60 insertions(+), 17 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 26c335f..5379027 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,18 +126,53 @@ 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"); +// } + + // EXPORT SAMPLE + exportSample(voyage, cell, null, xmlCruise); + Collection<Result> results = cell.getResult(); for (Result result : results) { if ("NASC".equals(result.getDataMetadata().getName())) { - - // EXPORT SAMPLE - exportSample(voyage, cell, result, xmlCruise); - // EXPORT DATA - exportData(result, xmlCruise); - xmlCruise.close("Sample"); + exportData(result, xmlCruise); } } + xmlCruise.close("Sample"); xmlCruise.close("Log"); } @@ -354,22 +389,28 @@ public class XmlAccousticExport implements EchoBaseService { }); String prefix = "start"; - String depthRefSurfaceMeta = "DepthRefSurfaceStart"; if (!dataValues.containsKey("LatitudeStart")) { prefix = "end"; - depthRefSurfaceMeta = "DepthRefSurfaceEnd"; } + +// Float upperDepth = 10f; +// Float lowerDepth = 30f; +// +// if (result == null) { +// Data depthData = dataValues.get("ESDUstartDepth"); +// lowerDepth = Float.parseFloat(depthData.getDataValue()); +// +// if (lowerDepth >= 50) { +// upperDepth = 30f; +// } +// } - Float lowerDepth = 10f; - Data depthRefSurfaceData = dataValues.get(depthRefSurfaceMeta); + Float upperDepth = 10f; + Data depthData = dataValues.get("ESDUstartDepth"); + Float lowerDepth = Float.parseFloat(depthData.getDataValue()); - Float upperDepth = depthRefSurfaceData != null ? Float.parseFloat(depthRefSurfaceData.getDataValue()) : 0f; - if (upperDepth >= 50) { - if (result.getCategory().getEchotype().getName().equals("D4")) { - upperDepth = 30f; - } else { - lowerDepth = 30f; - } + if (upperDepth >= lowerDepth) { + upperDepth = 0f; } xml.create("ChannelDepthUpper", 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 ec8c76c..5f034d6 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 @@ -344,6 +344,8 @@ public class XmlBioticExport implements EchoBaseService { "IDREF", vocabulary.getVocabularyCode("SpecWoRMS_" + category.getSpecies().getWormsCode())); xml.create("SpeciesValidity", "IDREF", vocabulary.getVocabularyCode("AC_SpeciesValidity_1")); + xml.create("SampleNumber", + 1); xml.create("SpeciesTotalNumber", number); xml.create("WeightUnit", -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm