branch develop updated (44d2f2e -> d4eec9d)
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 44d2f2e #8743 Add export biology new d4eec9d #8743 Fix on specie only to get individual 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 d4eec9d1742f7d3a7516b4fdfece7f02ecf37d29 Author: Julien Ruchaud <julien.ruchaud@debux.org> Date: Mon Nov 7 18:34:39 2016 +0100 #8743 Fix on specie only to get individual sample Summary of changes: .../services/service/atlantos/xml/VocabularyExport.java | 4 ++-- .../services/service/atlantos/xml/XmlBioticExport.java | 17 +++++++++++------ 2 files changed, 13 insertions(+), 8 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 d4eec9d1742f7d3a7516b4fdfece7f02ecf37d29 Author: Julien Ruchaud <julien.ruchaud@debux.org> Date: Mon Nov 7 18:34:39 2016 +0100 #8743 Fix on specie only to get individual sample --- .../services/service/atlantos/xml/VocabularyExport.java | 4 ++-- .../services/service/atlantos/xml/XmlBioticExport.java | 17 +++++++++++------ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/echobase-services/src/main/java/fr/ifremer/echobase/services/service/atlantos/xml/VocabularyExport.java b/echobase-services/src/main/java/fr/ifremer/echobase/services/service/atlantos/xml/VocabularyExport.java index 5396120..ae9eb22 100644 --- a/echobase-services/src/main/java/fr/ifremer/echobase/services/service/atlantos/xml/VocabularyExport.java +++ b/echobase-services/src/main/java/fr/ifremer/echobase/services/service/atlantos/xml/VocabularyExport.java @@ -130,8 +130,8 @@ public class VocabularyExport implements EchoBaseService { String tag = this.vocabularyTags.remove(prefix); if (tag != null) { - // Only AC_WeightUnit contains two values - if (tag.equals("AC_WeightUnit")) { + // Only WeightUnit contains two values + if (tag.equals("WeightUnit")) { this.writer.open(tag); this.writer.create("Code", 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 f7f3dd6..50c2457 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 @@ -128,12 +128,11 @@ public class XmlBioticExport implements EchoBaseService { if ("Individual".equals(name)) { SpeciesCategory category = sample.getSpeciesCategory(); String code = category.getSpecies().getBaracoudaCode(); - String size = code + "#" + category.getSizeCategoryLabel(); - List<Sample> individualSamples = individuals.get(size); + List<Sample> individualSamples = individuals.get(code); if (individualSamples == null) { individualSamples = new ArrayList<Sample>(); - individuals.put(size, individualSamples); + individuals.put(code, individualSamples); } individualSamples.add(sample); @@ -152,7 +151,7 @@ public class XmlBioticExport implements EchoBaseService { // EXPORT CATCH exportCatch(sample, weightBySize, weight, number, xmlCruise); - List<Sample> individualSamples = individuals.get(size); + List<Sample> individualSamples = individuals.remove(code); if (individualSamples != null) { for (Sample individualSample : individualSamples) { // EXPORT BIOLOGY @@ -374,7 +373,6 @@ public class XmlBioticExport implements EchoBaseService { } public void exportBiology(Sample individualSample, XmlWriter xml) throws IOException { - xml.open("Biology"); Map<String, Float> dataValues = new HashMap<String, Float>(); Collection<SampleData> datas = individualSample.getSampleData(); @@ -384,6 +382,13 @@ public class XmlBioticExport implements EchoBaseService { dataValues.put(name, value); } + Float age = dataValues.get("Age"); + if (age == null || age == -1) { + return; + } + + xml.open("Biology"); + // xml.create("StockCode", // "IDREF", ""); xml.create("FishID", @@ -403,7 +408,7 @@ public class XmlBioticExport implements EchoBaseService { xml.create("MaturityScale", "IDREF", vocabulary.getVocabularyCode("AC_MaturityScale_M6")); xml.create("IndividualAge", - dataValues.get("Age") != null ? dataValues.get("Age") : ""); + age); // xml.create("AgePlusGroup", // "IDREF", ""); xml.create("AgeSource", -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm