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 e6d74ed5c595b1963b52cb1e5ba6a774faee8dde Author: Julien Ruchaud <julien.ruchaud@debux.org> Date: Wed Nov 23 10:35:30 2016 +0100 Fix for biology export --- .../service/atlantos/ExportAtlantosService.java | 2 +- .../service/atlantos/xml/XmlBioticExport.java | 8 ++-- .../VoyageCatchesBiometrySampleImportAction.java | 47 +++++++++++----------- .../ui/actions/exportAtlantos/Configure.java | 2 +- .../resources/i18n/echobase-ui_en_GB.properties | 22 +++++----- .../resources/i18n/echobase-ui_fr_FR.properties | 22 +++++----- src/site/rst/install.rst.vm | 3 ++ 7 files changed, 55 insertions(+), 51 deletions(-) diff --git a/echobase-services/src/main/java/fr/ifremer/echobase/services/service/atlantos/ExportAtlantosService.java b/echobase-services/src/main/java/fr/ifremer/echobase/services/service/atlantos/ExportAtlantosService.java index 5788627..089cfb1 100644 --- a/echobase-services/src/main/java/fr/ifremer/echobase/services/service/atlantos/ExportAtlantosService.java +++ b/echobase-services/src/main/java/fr/ifremer/echobase/services/service/atlantos/ExportAtlantosService.java @@ -144,7 +144,7 @@ public class ExportAtlantosService extends EchoBaseServiceSupport { model.incrementsProgress(); // Create Zip file - Path zipPath = Paths.get(basePath, "Atlantos_" + year + name + vesselCode + ".zip"); + Path zipPath = Paths.get(basePath, "ICES_" + year + name + vesselCode + ".zip"); File zipFile = zipPath.toFile(); EchoBaseIOUtil.compressZipFile(zipFile, tempDirectory, false); 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 43e8ab6..84d4771 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 @@ -396,15 +396,15 @@ public class XmlBioticExport implements EchoBaseService { // xml.create("StockCode", // "IDREF", ""); xml.create("FishID", - dataValues.get(SampleDataTypeImpl.SPECIMEN_INDEX)); + dataValues.get(SampleDataTypeImpl.SPECIMEN_INDEX).intValue()); xml.create("LengthCode", "IDREF", vocabulary.getVocabularyCode("AC_LengthCode_mm")); xml.create("IndividualLength", - dataValues.get("Lcm") != null ? dataValues.get("Lcm") * 10 : ""); + dataValues.get("Lcm") != null ? new Float(dataValues.get("Lcm") * 10).intValue() : 0); xml.create("WeightUnit", "IDREF", vocabulary.getVocabularyCode("AC_WeightUnit_gr")); xml.create("IndividualWeight", - dataValues.get("Weightg") != null ? dataValues.get("Weightg") : ""); + dataValues.get("Weightg") != null ? dataValues.get("Weightg").intValue() : 0); xml.create("IndividualSex", "IDREF", dataValues.get("Sex") != null ? vocabulary.getVocabularyCode("Sex_" + dataValues.get("Sex"), "AC_Sex_U") : vocabulary.getVocabularyCode("AC_Sex_U")); xml.create("IndividualMaturity", @@ -412,7 +412,7 @@ public class XmlBioticExport implements EchoBaseService { xml.create("MaturityScale", "IDREF", vocabulary.getVocabularyCode("AC_MaturityScale_M6")); xml.create("IndividualAge", - age); + age.intValue()); // xml.create("AgePlusGroup", // "IDREF", ""); xml.create("AgeSource", diff --git a/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/actions/VoyageCatchesBiometrySampleImportAction.java b/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/actions/VoyageCatchesBiometrySampleImportAction.java index b48ae5c..dd6f194 100644 --- a/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/actions/VoyageCatchesBiometrySampleImportAction.java +++ b/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/actions/VoyageCatchesBiometrySampleImportAction.java @@ -92,43 +92,44 @@ public class VoyageCatchesBiometrySampleImportAction extends VoyageCatchesImport doFlushTransaction(++rowNumber); Operation operation = row.getOperation(); + if (operation != null) { + + checkOperationWithTotalOrUnsortedSample(rowNumber, operationWithTotalOrUnsortedSample, operation); - checkOperationWithTotalOrUnsortedSample(rowNumber, operationWithTotalOrUnsortedSample, operation); + Species species = row.getSpecies(); - Species species = row.getSpecies(); + int numFish = row.getNumFish(); - int numFish = row.getNumFish(); + String sampleKey = operation.getId() + "_" + species.getBaracoudaCode() + "_" + numFish; - String sampleKey = operation.getId() + "_" + species.getBaracoudaCode() + "_" + numFish; + Sample sample = samples.get(sampleKey); - Sample sample = samples.get(sampleKey); + if (sample == null) { - if (sample == null) { + // create a new sample + sample = persistenceService.newSample(); - // create a new sample - sample = persistenceService.newSample(); + sample.setSampleType(sampleTypeIndividual); - sample.setSampleType(sampleTypeIndividual); + SpeciesCategory category = speciesCategoryCache.getSpeciesCategory(species, null, null, null, null, result); - SpeciesCategory category = speciesCategoryCache.getSpeciesCategory(species, null, null, null, null, result); + sample.setSpeciesCategory(category); - sample.setSpeciesCategory(category); + sample = addSample(operation, sample, result, rowNumber); - sample = addSample(operation, sample, result, rowNumber); + samples.put(sampleKey, sample); + } - samples.put(sampleKey, sample); - } - - addProcessedRow(result, row); + addProcessedRow(result, row); - SampleData sampleDataFishIndex = persistenceService.createSampleData(sampleDataTypeFishIndex, null, (float) numFish); - sample.addSampleData(sampleDataFishIndex); - addId(result, EchoBaseUserEntityEnum.SampleData, sampleDataFishIndex, rowNumber); - - SampleData sampleDataCreated = persistenceService.createSampleData(row.getSampleData()); - sample.addSampleData(sampleDataCreated); - addId(result, EchoBaseUserEntityEnum.SampleData, sampleDataCreated, rowNumber); + SampleData sampleDataFishIndex = persistenceService.createSampleData(sampleDataTypeFishIndex, null, (float) numFish); + sample.addSampleData(sampleDataFishIndex); + addId(result, EchoBaseUserEntityEnum.SampleData, sampleDataFishIndex, rowNumber); + SampleData sampleDataCreated = persistenceService.createSampleData(row.getSampleData()); + sample.addSampleData(sampleDataCreated); + addId(result, EchoBaseUserEntityEnum.SampleData, sampleDataCreated, rowNumber); + } } } diff --git a/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/exportAtlantos/Configure.java b/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/exportAtlantos/Configure.java index 3700d4f..3194022 100644 --- a/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/exportAtlantos/Configure.java +++ b/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/exportAtlantos/Configure.java @@ -73,7 +73,7 @@ public class Configure extends AbstractConfigureAction<ExportAtlantosConfigurati protected void prepareExecuteAction(ExportAtlantosConfiguration model) throws IOException { File tempDirectory = FileUtils.getTempDirectory(); File dataDirectory = new File(tempDirectory, - "echobase-atlantos-" + System.currentTimeMillis()); + "echobase-ices-" + System.currentTimeMillis()); FileUtil.createDirectoryIfNecessary(dataDirectory); model.setWorkingDirectory(dataDirectory); if (log.isInfoEnabled()) { diff --git a/echobase-ui/src/main/resources/i18n/echobase-ui_en_GB.properties b/echobase-ui/src/main/resources/i18n/echobase-ui_en_GB.properties index e77acc0..35e3c09 100644 --- a/echobase-ui/src/main/resources/i18n/echobase-ui_en_GB.properties +++ b/echobase-ui/src/main/resources/i18n/echobase-ui_en_GB.properties @@ -19,7 +19,7 @@ echobase.action.delete.selectedImport=Delete selected imports echobase.action.deleteConfiguration=Delete echobase.action.deleteEntity=Delete echobase.action.downloadEmbeddedApplicationFile=Download the portable database -echobase.action.downloadExportAtlantosFile=Download Atlantos export file +echobase.action.downloadExportAtlantosFile=Download ICES export file echobase.action.downloadExportCoserFile=Download Coser export file echobase.action.downloadExportDbFile=Download database export file echobase.action.export=Export @@ -272,8 +272,8 @@ echobase.error.login.wrongLogin=Le login est déjà utilisé echobase.error.mission.name.already.exist=The mission name already exists echobase.error.no.embeddedApplication.configurationFound=Portable database configuration not found echobase.error.no.embeddedApplication.exportFileFound=New portable database not found -echobase.error.no.exportAtlantos.configurationFound=Atlantos export configuration not found -echobase.error.no.exportAtlantos.exportFileFound=Atlantos archive not found +echobase.error.no.exportAtlantos.configurationFound=ICES export configuration not found +echobase.error.no.exportAtlantos.exportFileFound=ICES archive not found echobase.error.no.exportCoser.configurationFound=Coser export configuration not found echobase.error.no.exportCoser.exportFileFound=Coser archive not found echobase.error.no.exportDb.configurationFound=Database export configuration not found @@ -300,8 +300,8 @@ echobase.info.dbeditor.propertyDiffsResult=Data import results echobase.info.documentation=EchoBase online documentation echobase.info.downloadFiles=Download EchoBase or some import files echobase.info.echoR=EchoR project -echobase.info.exportAtlantos.failed=Atlantos export failed -echobase.info.exportAtlantos.succeded=Atlantos export successful +echobase.info.exportAtlantos.failed=ICES export failed +echobase.info.exportAtlantos.succeded=ICES export successful echobase.info.exportCoser.failed=Coser export failed echobase.info.exportCoser.succeded=Coser export successful echobase.info.exportDb.archive=Basename of the archive, extension <strong>.echobase</strong> will be added to it. @@ -376,7 +376,7 @@ echobase.legend.dbeditor.edit=Editing '%s' echobase.legend.dbeditor.show=Displaying '%s' echobase.legend.embeddedApplication.configuration=Portable database configuration echobase.legend.exportAtlantos.configure=Export configuration -echobase.legend.exportAtlantos.resume=Resume of Atlantos export +echobase.legend.exportAtlantos.resume=Resume of ICES export echobase.legend.exportCoser.configuration.files=Export configuration echobase.legend.exportCoser.resume=Resume of Coser export echobase.legend.exportDb.configuration.files=Export configuration @@ -405,7 +405,7 @@ echobase.menu.createEmbeddedApplication=Create a portable database echobase.menu.dashboard=Dashboard echobase.menu.editData=Modify data echobase.menu.export=Export data -echobase.menu.exportAtlantos=Atlantos export +echobase.menu.exportAtlantos=ICES export echobase.menu.exportCoser=Coser export echobase.menu.exportDb=Database export echobase.menu.importData=Import data @@ -421,7 +421,7 @@ echobase.message.createEmbedded.result=Portable application was successful in %s echobase.message.db.no.spatial.structure=The working database is not spatialized. echobase.message.db.no.spatial.support=The working database has no spatial support. echobase.message.download.link=If download did not start by itself, you can start it manually from this link\: -echobase.message.exportAtantos.result=Atlantos Export was successful (file %s) in %s. +echobase.message.exportAtantos.result=ICES Export was successful (file %s) in %s. echobase.message.exportCoser.result=Coser Export was successful (file %s) in %s. echobase.message.exportDb.result=Export of database (mode %s) was successful (file %s) in %s. echobase.message.gis.install=See the installation documentation. @@ -456,9 +456,9 @@ echobase.title.embeddedApplicationProgress=Creating the portable database echobase.title.embeddedApplicationResult=Results of the portable database creation echobase.title.entityModificationLogs=Change log echobase.title.export=SQL export -echobase.title.exportAtlantos=Atlantos export -echobase.title.exportAtlantosProgress=Atlantos export in progress -echobase.title.exportAtlantosResult=Atlantos export results +echobase.title.exportAtlantos=ICES export +echobase.title.exportAtlantosProgress=ICES export in progress +echobase.title.exportAtlantosResult=ICES export results echobase.title.exportCoser=Coser maps echobase.title.exportCoserProgress=Coser export in progress echobase.title.exportCoserResult=Coser export results diff --git a/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties b/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties index ce4920c..410c24c 100644 --- a/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties +++ b/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties @@ -19,7 +19,7 @@ echobase.action.delete.selectedImport=Supprimer les imports sélectionnés echobase.action.deleteConfiguration=Supprimer echobase.action.deleteEntity=Supprimer echobase.action.downloadEmbeddedApplicationFile=Télécharger l'application embarquée -echobase.action.downloadExportAtlantosFile=Télécharger le fichier d'export Atlantos +echobase.action.downloadExportAtlantosFile=Télécharger le fichier d'export ICES echobase.action.downloadExportCoserFile=Télécharger le fichier d'export Coser echobase.action.downloadExportDbFile=Télécharger le fichier d'export de la base complète echobase.action.export=Exporter @@ -273,8 +273,8 @@ echobase.error.login.wrongLogin=Le login est déjà utilisé echobase.error.mission.name.already.exist=Nom de mission déjà utilisé echobase.error.no.embeddedApplication.configurationFound=Configuration de création d'application embarquée non trouvée echobase.error.no.embeddedApplication.exportFileFound=Application embarquée générée non trouvée -echobase.error.no.exportAtlantos.configurationFound=Configuration de l'export Atlantos -echobase.error.no.exportAtlantos.exportFileFound=Archive d'export Atlantos introuvable +echobase.error.no.exportAtlantos.configurationFound=Configuration de l'export ICES +echobase.error.no.exportAtlantos.exportFileFound=Archive d'export ICES introuvable echobase.error.no.exportCoser.configurationFound=Configuration de l'export Coser echobase.error.no.exportCoser.exportFileFound=Archive d'export Coser introuvable echobase.error.no.exportDb.configurationFound=Configuration de l'export de la base non trouvée @@ -302,8 +302,8 @@ echobase.info.delete.entity=La donnée de type '%s' a été supprimée echobase.info.documentation=Documentation en ligne d'EchoBase echobase.info.downloadFiles=Télécharger l'application ou des fichiers d'imports echobase.info.echoR=Projet EchoR -echobase.info.exportAtlantos.failed=L'export Atlantos a échoué -echobase.info.exportAtlantos.succeded=L'export Atlantos a réussi +echobase.info.exportAtlantos.failed=L'export ICES a échoué +echobase.info.exportAtlantos.succeded=L'export ICES a réussi echobase.info.exportCoser.archive=Il s'agit du nom de l'archive, l'extension <strong>.zip</strong> sera automatiquement rajoutée. echobase.info.exportCoser.failed=L'export Coser a échoué echobase.info.exportCoser.succeded=L'export Coser a réussi @@ -379,7 +379,7 @@ echobase.legend.dbeditor.edit=Edition de '%s' echobase.legend.dbeditor.show=Visualisation de '%s' echobase.legend.embeddedApplication.configuration=Configuration de l'application embarquée echobase.legend.exportAtlantos.configure=Configuration de l'export -echobase.legend.exportAtlantos.resume=Résumé de l'export Atlantos +echobase.legend.exportAtlantos.resume=Résumé de l'export ICES echobase.legend.exportCoser.configuration.files=Configuration de l'export echobase.legend.exportCoser.resume=Résumé de l'export Coser echobase.legend.exportDb.configuration.files=Configuration de l'export @@ -408,7 +408,7 @@ echobase.menu.createEmbeddedApplication=Créer une application embarquée echobase.menu.dashboard=Tableau de bord echobase.menu.editData=Modifier les données echobase.menu.export=Exporter des données -echobase.menu.exportAtlantos=Exporter vers Atlantos +echobase.menu.exportAtlantos=Exporter vers ICES echobase.menu.exportCoser=Exporter vers Coser echobase.menu.exportDb=Exporter une base echobase.menu.importData=Importer des données @@ -424,7 +424,7 @@ echobase.message.createEmbedded.result=La création de l'application embarqué a echobase.message.db.no.spatial.structure=La base de travail que vous utilisez n'est pas spatialisée. echobase.message.db.no.spatial.support=La base de travail que vous utilisez ne possède pas de support spatiale. echobase.message.download.link=Si le téléchargement n'a pas démarré automatiquement, suivez ce lien \: -echobase.message.exportAtantos.result=L'export Atlantos a réussi (fichier %s) en %s +echobase.message.exportAtantos.result=L'export ICES a réussi (fichier %s) en %s echobase.message.exportCoser.result=L'export Coser a réussi (fichier %s) en %s echobase.message.exportDb.result=L'export de la base (mode %s) a réussi (fichier %s) en %s echobase.message.gis.install=Consulter la documentation d'installation. @@ -459,9 +459,9 @@ echobase.title.embeddedApplicationProgress=Création de l'application embarquée echobase.title.embeddedApplicationResult=Résultat de la création de l'application embarquée echobase.title.entityModificationLogs=Journal des modifications echobase.title.export=Export SQL -echobase.title.exportAtlantos=Export Atlantos -echobase.title.exportAtlantosProgress=Export Atlantos en cours -echobase.title.exportAtlantosResult=Résultats de l'export Atlantos +echobase.title.exportAtlantos=Export ICES +echobase.title.exportAtlantosProgress=Export ICES en cours +echobase.title.exportAtlantosResult=Résultats de l'export ICES echobase.title.exportCoser=Export Coser echobase.title.exportCoserProgress=Export Coser en cours echobase.title.exportCoserResult=Résultats de l'export Coser diff --git a/src/site/rst/install.rst.vm b/src/site/rst/install.rst.vm index 83ae1cd..428c559 100644 --- a/src/site/rst/install.rst.vm +++ b/src/site/rst/install.rst.vm @@ -191,6 +191,9 @@ Une fois l'application déployée, vous aurez la structure de répertoires suiva | | `-- postgresql-${postgresqlVersion}.jar | |-- logs | | `-- echobase.log + | |-- import-check-${timestamp} + | | |--{filenameWithoutExtension}.processed.csv.gz + | | `--{filenameWithoutExtension}.checked.csv.gz | `-- gis | |-- resources | | |-- France&Spain.shp -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.