branch develop updated (33c0f201 -> 42e3fd05)
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 33c0f201 Clarify pom new 42e3fd05 fixes #9717 : Le champ "LengthClass" des lignes "biology" ne devrait pas être égal à zéro dans l'export biotic CIEM 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 42e3fd050b65ff033a3eb8f8f75cc78495b473be Author: Jean Couteau <jean.couteau@gmail.com> Date: Wed Feb 21 16:25:28 2018 +0100 fixes #9717 : Le champ "LengthClass" des lignes "biology" ne devrait pas être égal à zéro dans l'export biotic CIEM refs #9685 : Les fichiers xml biotic et acoustic de thalassa PELGAS2015 ne s'importent plus dans le portail ICES Summary of changes: .../service/atlantos/xml/XmlBioticExport.java | 42 ++++++++++++++++++---- 1 file changed, 35 insertions(+), 7 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 42e3fd050b65ff033a3eb8f8f75cc78495b473be Author: Jean Couteau <jean.couteau@gmail.com> Date: Wed Feb 21 16:25:28 2018 +0100 fixes #9717 : Le champ "LengthClass" des lignes "biology" ne devrait pas être égal à zéro dans l'export biotic CIEM refs #9685 : Les fichiers xml biotic et acoustic de thalassa PELGAS2015 ne s'importent plus dans le portail ICES --- .../service/atlantos/xml/XmlBioticExport.java | 42 ++++++++++++++++++---- 1 file changed, 35 insertions(+), 7 deletions(-) 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 cbc2c34d..1edb9fda 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 @@ -341,6 +341,11 @@ public class XmlBioticExport implements EchoBaseService { String numberAtLength = sampleDataValues.get(SampleDataTypeImpl.NUMBER_AT_LENGTH); String weightAtLength = sampleDataValues.get(SampleDataTypeImpl.WEIGHT_AT_LENGTHKG); + double subSamplingFactor = 0; + if (weightBySize != null){ + subSamplingFactor = weightBySize / subsample.getSampleWeight(); + } + xml.create("DataType", "IDREF", vocabulary.getVocabularyCode("AC_CatchDataType_R")); xml.create("SpeciesCode", @@ -360,7 +365,7 @@ public class XmlBioticExport implements EchoBaseService { xml.create("WeightUnit", "IDREF", vocabulary.getVocabularyCode("AC_WeightUnit_kg")); xml.create("SpeciesCategoryWeight", - weight != null ? weight.intValue() : 0); + weight != null ? weight : 0); /*xml.create("SpeciesCategory", "IDREF", vocabulary.getVocabularyCode(category.getSizeCategoryLabel(), "AC_CatchCategory_1")); */ @@ -368,20 +373,43 @@ public class XmlBioticExport implements EchoBaseService { xml.create("SubsampledNumber", subsample.getNumberSampled()); xml.create("SubsamplingFactor", - weightBySize != null ? weightBySize / subsample.getSampleWeight() : 0); - xml.create("SubsampleWeight", - subsample.getSampleWeight()); + subSamplingFactor); + + if ((int)subSamplingFactor==1) { + xml.create("SubsampleWeight", + weight != null ? weight.intValue() : 0); + } else { + xml.create("SubsampleWeight", + subsample.getSampleWeight()); + + } xml.create("LengthCode", "IDREF", vocabulary.getVocabularyCode("AC_LengthCode_mm")); - xml.create("LengthClass", - lengthClassValue.intValue()); + if (lengthClassValue.intValue()!= 0) { + xml.create("LengthClass", + lengthClassValue.intValue()); + } xml.create("LengthType", "IDREF", vocabulary.getVocabularyCode("AC_LengthMeasurementType_1")); xml.create("NumberAtLength", numberAtLength != null ? numberAtLength : 0); +// if (lengthClassValue.intValue()== 0) { +// xml.create("NumberAtLength", +// subsample.getNumberSampled()); +// } else { +// xml.create("NumberAtLength", +// numberAtLength != null ? numberAtLength : 0); +// } xml.create("WeightAtLength", weightAtLength != null ? weightAtLength : 0); +// if (numberAtLength != null){ +// xml.create("NumberAtLength", numberAtLength); +// } +// +// if (weightAtLength != null) { +// xml.create("WeightAtLength", weightAtLength); +// } } public void exportBiology(Sample individualSample, XmlWriter xml) throws IOException { @@ -408,7 +436,7 @@ public class XmlBioticExport implements EchoBaseService { xml.create("LengthCode", "IDREF", vocabulary.getVocabularyCode("AC_LengthCode_mm")); xml.create("LengthClass", - dataValues.get("Lcm") != null ? new Float(dataValues.get("Lcm") * 10).intValue() : 0); + dataValues.get("LTmm1") != null ? dataValues.get("LTmm1").intValue(): 0); xml.create("WeightUnit", "IDREF", vocabulary.getVocabularyCode("AC_WeightUnit_gr")); xml.create("IndividualWeight", -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm