Tony CHEMIT pushed to branch develop-9.0.x at ultreiaio / ird-observe Commits: bca4db5f by Tony Chemit at 2022-11-12T14:41:10+01:00 [UI REFERENTIELS] Envisager un auto-trim droite et gauche sur les champs alphanumériques - See #1544 Nettoyage par migration de tous les champs texte - Closes #2529 - - - - - fbed49a2 by Tony Chemit at 2022-11-12T14:41:10+01:00 Test fixtures - [UI REFERENTIELS] Envisager un auto-trim droite et gauche sur les champs alphanumériques - See #1544 - - - - - 0d869f9d by Tony Chemit at 2022-11-12T14:41:10+01:00 Test fixtures - Renommage speciesFate - - - - - f1d614cd by Tony Chemit at 2022-11-12T14:41:10+01:00 SetCatch - MEttre minWeight et maxWeight sur la meme ligne du formulaire - - - - - df3efb6f by Tony Chemit at 2022-11-12T14:41:10+01:00 Revert "FIXME - Do not drop table until release time" This reverts commit 73c88a1f12625a827361ececc852b783e4a0941d. - - - - - 22 changed files: - client/datasource/editor/ps/src/main/i18n/getters/jaxx.getter - client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/observation/SetCatchUI.jaxx - core/api/services/src/main/i18n/getters/labels.getter - core/persistence/java/src/main/java/fr/ird/observe/entities/data/ps/common/TripSpi.java - core/persistence/resources/src/main/java/fr/ird/observe/persistence/avdth/data/DataWriter.java - core/persistence/resources/src/main/java/fr/ird/observe/spi/migration/v9/DataSourceMigrationForVersion_9_0.java - core/persistence/resources/src/main/java/fr/ird/observe/spi/migration/v9/DiscardedTargetCatchRecord.java - + core/persistence/resources/src/main/java/fr/ird/observe/spi/migration/v9/FixCommentHelper.java - + core/persistence/resources/src/main/java/fr/ird/observe/spi/migration/v9/FixStringHelper.java - core/persistence/resources/src/main/java/fr/ird/observe/spi/migration/v9/NotDiscardedTargetCatchRecord.java - core/persistence/resources/src/main/resources/db/migration/v9/9.0/99_2_drop_tables-H2.sql - core/persistence/resources/src/main/resources/db/migration/v9/9.0/99_2_drop_tables-PG.sql - core/services/i18n/src/main/i18n/translations/services_en_GB.properties - core/services/i18n/src/main/i18n/translations/services_es_ES.properties - core/services/i18n/src/main/i18n/translations/services_fr_FR.properties - core/services/test/src/main/resources/fixtures/fr/ird/observe/services/service/ValidateService-dataResult.json - core/services/test/src/main/resources/fixtures/fr/ird/observe/services/service/ValidateService-referentialResult.json - model/src/main/models/Observe/dto/class/i18nLabels.properties - model/src/main/models/Observe/dto/class/i18nOverrideLabels.properties - + toolkit/api/src/main/java/fr/ird/observe/dto/StringCleaner.java - toolkit/api/src/main/java/fr/ird/observe/persistence/SqlHelper.java - toolkit/persistence/src/main/java/fr/ird/observe/spi/context/DataDtoEntityContext.java Changes: ===================================== client/datasource/editor/ps/src/main/i18n/getters/jaxx.getter ===================================== @@ -186,6 +186,7 @@ observe.data.ps.observation.Catch.catchWeight observe.data.ps.observation.Catch.maxWeight observe.data.ps.observation.Catch.meanLength observe.data.ps.observation.Catch.meanWeight +observe.data.ps.observation.Catch.minMaxWeight observe.data.ps.observation.Catch.minWeight observe.data.ps.observation.Catch.reasonForDiscard observe.data.ps.observation.Catch.totalCount ===================================== client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/observation/SetCatchUI.jaxx ===================================== @@ -125,10 +125,13 @@ </row> <row> <cell> - <JLabel id='minWeightLabel'/> + <JLabel id='minMaxWeightLabel'/> </cell> <cell weightx='1'> - <NumberEditor id='minWeight' styleClass="float2"/> + <JPanel layout="{new GridLayout()}"> + <NumberEditor id='minWeight' styleClass="float2"/> + <NumberEditor id='maxWeight' styleClass="float2"/> + </JPanel> </cell> </row> <row> @@ -139,15 +142,6 @@ <NumberEditor id='meanWeight' styleClass="float2"/> </cell> </row> - <row> - <cell> - <JLabel id='maxWeightLabel'/> - </cell> - <cell weightx='1'> - <NumberEditor id='maxWeight' styleClass="float2"/> - </cell> - </row> - <!-- taille moyenne --> <row> <cell> ===================================== core/api/services/src/main/i18n/getters/labels.getter ===================================== @@ -1038,6 +1038,7 @@ observe.data.ps.observation.Catch.meanWeight observe.data.ps.observation.Catch.meanWeight.short observe.data.ps.observation.Catch.meanWeightComputed.computed.tip observe.data.ps.observation.Catch.meanWeightComputed.observed.tip +observe.data.ps.observation.Catch.minMaxWeight observe.data.ps.observation.Catch.minWeight observe.data.ps.observation.Catch.minWeight.short observe.data.ps.observation.Catch.reasonForDiscard ===================================== core/persistence/java/src/main/java/fr/ird/observe/entities/data/ps/common/TripSpi.java ===================================== @@ -45,6 +45,7 @@ import fr.ird.observe.entities.referential.ps.common.AcquisitionStatus; import fr.ird.observe.entities.referential.ps.common.ObservedSystem; import fr.ird.observe.entities.referential.ps.common.Program; import fr.ird.observe.entities.referential.ps.logbook.WellContentStatus; +import fr.ird.observe.persistence.SqlHelper; import fr.ird.observe.spi.service.ServiceContext; import io.ultreia.java4all.util.Dates; import io.ultreia.java4all.util.sql.SqlScriptWriter; @@ -330,8 +331,8 @@ public class TripSpi extends GeneratedTripSpi { toId(observationsDataQuality), toId(observer), commentFormat.apply(observationsComment), - escapeString(formsUrl), - escapeString(reportsUrl), + SqlHelper.escapeString(formsUrl), + SqlHelper.escapeString(reportsUrl), newId); } ===================================== core/persistence/resources/src/main/java/fr/ird/observe/persistence/avdth/data/DataWriter.java ===================================== @@ -77,7 +77,7 @@ public abstract class DataWriter<E extends DataEntity, R extends DataReader<E>> } public static String escapeString(String comment) { - return DataDtoEntityContext.escapeString(comment); + return SqlHelper.escapeString(comment); } public static String roundFloat2(Float comment) { ===================================== core/persistence/resources/src/main/java/fr/ird/observe/spi/migration/v9/DataSourceMigrationForVersion_9_0.java ===================================== @@ -23,7 +23,8 @@ package fr.ird.observe.spi.migration.v9; */ import com.google.auto.service.AutoService; -import fr.ird.observe.spi.context.DataDtoEntityContext; +import fr.ird.observe.dto.StringCleaner; +import fr.ird.observe.persistence.SqlHelper; import fr.ird.observe.spi.migration.ByMajorMigrationVersionResource; import io.ultreia.java4all.util.Version; import io.ultreia.java4all.util.sql.SqlQuery; @@ -254,6 +255,7 @@ public class DataSourceMigrationForVersion_9_0 extends ByMajorMigrationVersionRe executor.addScript("96", "add_referential_ps_common_ObservedSystem_finalize"); } } + private void migrateCatches(MigrationVersionResourceExecutor executor) { Function<String, String> commentFormat = executor.commentFormat(); @@ -395,7 +397,7 @@ public class DataSourceMigrationForVersion_9_0 extends ByMajorMigrationVersionRe sample.topiaId, sample.topiaVersion, sample.topiaCreateDate, - DataDtoEntityContext.escapeString(sample.homeId), + SqlHelper.escapeString(StringCleaner.ALL.apply(sample.homeId)), stringFormat.apply(sample.comment), sample.set, sample.lastUpdateDate @@ -564,31 +566,39 @@ public class DataSourceMigrationForVersion_9_0 extends ByMajorMigrationVersionRe sampleMeasure.topiaId, sampleMeasure.topiaVersion, sampleMeasure.topiaCreateDate, - DataDtoEntityContext.escapeString(sampleMeasure.homeId == null ? null : sampleMeasure.homeId.replaceAll("'", "")), + SqlHelper.escapeString(sampleMeasure.homeId == null ? null : sampleMeasure.homeId.replaceAll("'", "")), sampleMeasure.length, sampleMeasure.isLengthComputed, - DataDtoEntityContext.escapeString(sampleMeasure.picturesReferences == null ? null : sampleMeasure.picturesReferences.replaceAll("'", "")), + SqlHelper.escapeString(sampleMeasure.picturesReferences == null ? null : sampleMeasure.picturesReferences.replaceAll("'", "")), sampleMeasure.weight, sampleMeasure.isWeightComputed, sampleMeasure.count, sampleMeasure.acquisitionMode, - DataDtoEntityContext.escapeString(sampleMeasure.species), + SqlHelper.escapeString(sampleMeasure.species), sampleId, - DataDtoEntityContext.escapeString(sampleMeasure.sex), + SqlHelper.escapeString(sampleMeasure.sex), sampleMeasure.lastUpdateDate, - DataDtoEntityContext.escapeString(sampleMeasure.sizeMeasureType), - DataDtoEntityContext.escapeString(sampleMeasure.weightMeasureType), - DataDtoEntityContext.escapeString(sampleMeasure.tagNumber), - DataDtoEntityContext.escapeString(sampleMeasure.speciesFate), + SqlHelper.escapeString(sampleMeasure.sizeMeasureType), + SqlHelper.escapeString(sampleMeasure.weightMeasureType), + SqlHelper.escapeString(sampleMeasure.tagNumber), + SqlHelper.escapeString(sampleMeasure.speciesFate), sampleMeasure.sample_idx, - DataDtoEntityContext.escapeString(sampleMeasure.lengthMeasureMethod), - DataDtoEntityContext.escapeString(sampleMeasure.weightMeasureMethod) + SqlHelper.escapeString(sampleMeasure.lengthMeasureMethod), + SqlHelper.escapeString(sampleMeasure.weightMeasureMethod) )); } } @Override public void generateFinalizeSqlScript(MigrationVersionResourceExecutor executor) { + long stringFixedCount = new FixStringHelper(executor).execute(); + if (stringFixedCount > 0) { + log.warn(String.format("Fix %s string rows(s).", stringFixedCount)); + } + long commentFixedCount = new FixCommentHelper(executor).execute(); + if (commentFixedCount > 0) { + log.warn(String.format("Fix %s comment rows(s).", commentFixedCount)); + } migrateIdx(executor, "ps_observation", "catch", "set"); migrateIdx(executor, "ps_observation", "SampleMeasure", "sample"); } ===================================== core/persistence/resources/src/main/java/fr/ird/observe/spi/migration/v9/DiscardedTargetCatchRecord.java ===================================== @@ -22,6 +22,8 @@ package fr.ird.observe.spi.migration.v9; * #L% */ +import fr.ird.observe.dto.StringCleaner; +import fr.ird.observe.persistence.SqlHelper; import fr.ird.observe.spi.context.DataDtoEntityContext; import java.sql.Connection; @@ -56,19 +58,19 @@ public class DiscardedTargetCatchRecord { public static PreparedStatement prepareStatement(Connection connection) throws SQLException { return connection.prepareStatement("SELECT" + - /* 01 */ " REPLACE(tc.topiaId, '.TargetCatch', '.Catch')," + - /* 02 */ " tc.topiaVersion + 1," + - /* 03 */ " tc.topiaCreateDate," + - /* 04 */ " tc.homeId," + - /* 05 */ " tc.catchWeight," + - /* 06 */ " tc.weightCategory," + - /* 07 */ " tc.comment," + - /* 08 */ " tc.reasonForDiscard," + - /* 09 */ " tc.set," + - /* 10 */ " tc.lastUpdateDate," + - /* 11 */ " tc.well," + - /* 12 */ " -tc.set_idx," + - /* 13 */ " tc.weightMeasureMethod" + + /* 01 */ " REPLACE(tc.topiaId, '.TargetCatch', '.Catch')," + + /* 02 */ " tc.topiaVersion + 1," + + /* 03 */ " tc.topiaCreateDate," + + /* 04 */ " tc.homeId," + + /* 05 */ " tc.catchWeight," + + /* 06 */ " tc.weightCategory," + + /* 07 */ " tc.comment," + + /* 08 */ " tc.reasonForDiscard," + + /* 09 */ " tc.set," + + /* 10 */ " tc.lastUpdateDate," + + /* 11 */ " tc.well," + + /* 12 */ " -tc.set_idx," + + /* 13 */ " tc.weightMeasureMethod" + " FROM ps_observation.TargetCatch tc" + " WHERE tc.discarded"); } @@ -132,24 +134,24 @@ public class DiscardedTargetCatchRecord { "%17$s, " + "%18$s" + ");", - /*1*/ DataDtoEntityContext.escapeString(id), + /*1*/ SqlHelper.escapeString(id), /*2*/ topiaVersion, /*3*/ DataDtoEntityContext.timestamp(topiaCreateDate), - /*4*/ DataDtoEntityContext.escapeString(homeId), + /*4*/ SqlHelper.escapeString(StringCleaner.ALL.apply(homeId)), /*5*/ catchWeight, /*6*/ weightCategoryRecord.getMinWeight(), /*7*/ weightCategoryRecord.getMaxWeight(), /*8*/ null, /*9*/ getComment(weightCategoryRecord, commentFormat), - /*10*/ DataDtoEntityContext.escapeString(reasonForDiscardId), - /*11*/ DataDtoEntityContext.escapeString(weightCategoryRecord.getSpeciesId()), - /*12*/ DataDtoEntityContext.escapeString(DataSourceMigrationForVersion_9_0.SPECIES_FATE_5), - /*13*/ DataDtoEntityContext.escapeString(setId), + /*10*/ SqlHelper.escapeString(reasonForDiscardId), + /*11*/ SqlHelper.escapeString(weightCategoryRecord.getSpeciesId()), + /*12*/ SqlHelper.escapeString(DataSourceMigrationForVersion_9_0.SPECIES_FATE_5), + /*13*/ SqlHelper.escapeString(setId), /*14*/ DataDtoEntityContext.timestamp(lastUpdateDate), - /*15*/ DataDtoEntityContext.escapeString(getWell()), + /*15*/ SqlHelper.escapeString(StringCleaner.ALL.apply(well)), /*16*/ setIdx, - /*17*/ DataDtoEntityContext.escapeString(weightMeasureMethodId == null ? "fr.ird.referential.common.WeightMeasureMethod#666#03" : weightCategoryId), - /*18*/ DataDtoEntityContext.escapeString(DataSourceMigrationForVersion_9_0.INFORMATION_SOURCE_O) + /*17*/ SqlHelper.escapeString(weightMeasureMethodId == null ? "fr.ird.referential.common.WeightMeasureMethod#666#03" : weightCategoryId), + /*18*/ SqlHelper.escapeString(DataSourceMigrationForVersion_9_0.INFORMATION_SOURCE_O) ); } @@ -160,14 +162,4 @@ public class DiscardedTargetCatchRecord { return stringFormat.apply(comment + "\n" + weightCategoryRecord.toComment()); } - public String getWell() { - String result = well; - if (result!=null) { - result = well.trim(); - if (well.startsWith("'")) { - result = result.substring(1); - } - } - return result; - } } ===================================== core/persistence/resources/src/main/java/fr/ird/observe/spi/migration/v9/FixCommentHelper.java ===================================== @@ -0,0 +1,133 @@ +package fr.ird.observe.spi.migration.v9; + +/*- + * #%L + * ObServe Core :: Persistence :: Resources + * %% + * Copyright (C) 2008 - 2022 IRD, Ultreia.io + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.nuiton.topia.service.migration.resources.MigrationVersionResourceExecutor; + +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.util.Objects; +import java.util.concurrent.atomic.AtomicLong; +import java.util.function.Function; + +/** + * To auto-trim string comment fields. + * <p> + * <strong>Note:</strong> If fixed value is empty or blank then set {@code null} value. + * <p> + * Created on 11/11/2022. + * + * @author Tony Chemit - dev@tchemit.fr + * @since 9.0.17 + */ +public class FixCommentHelper { + + private static final Logger log = LogManager.getLogger(FixCommentHelper.class); + + private final MigrationVersionResourceExecutor executor; + private final AtomicLong count = new AtomicLong(); + private final Function<String, String> commentFormat; + + public FixCommentHelper(MigrationVersionResourceExecutor executor) { + this.executor = Objects.requireNonNull(executor); + commentFormat = executor.commentFormat(); + } + + public long execute() { + + fixField("common.Vessel", "comment"); + + fixField("ll_common.GearUseFeatures", "comment"); + fixField("ll_common.Program", "comment"); + fixField("ll_common.Trip", "generalComment"); + fixField("ll_common.Trip", "logbookComment"); + fixField("ll_common.Trip", "observationsComment"); + + fixField("ll_landing.Landing", "comment"); + + fixField("ll_logbook.Activity", "comment"); + fixField("ll_logbook.Catch", "comment"); + fixField("ll_logbook.Set", "comment"); + fixField("ll_logbook.Sample", "comment"); + + fixField("ll_observation.Activity", "comment"); + fixField("ll_observation.Branchline", "comment"); + fixField("ll_observation.Catch", "comment"); + fixField("ll_observation.Set", "comment"); + + fixField("ps_common.GearUseFeatures", "comment"); + fixField("ps_common.Program", "comment"); + fixField("ps_common.Trip", "generalComment"); + fixField("ps_common.Trip", "logbookComment"); + fixField("ps_common.Trip", "observationsComment"); + + fixField("ps_localmarket.Batch", "origin"); + fixField("ps_localmarket.Sample", "comment"); + fixField("ps_localmarket.SampleSpecies", "comment"); + fixField("ps_localmarket.Survey", "comment"); + + fixField("ps_logbook.Activity", "comment"); + fixField("ps_logbook.Catch", "comment"); + fixField("ps_logbook.FloatingObject", "comment"); + fixField("ps_logbook.Route", "comment"); + fixField("ps_logbook.Sample", "comment"); + fixField("ps_logbook.SampleSpecies", "comment"); + fixField("ps_logbook.TransmittingBuoy", "comment"); + + fixField("ps_observation.Activity", "comment"); + fixField("ps_observation.Catch", "comment"); + fixField("ps_observation.FloatingObject", "comment"); + fixField("ps_observation.NonTargetCatchRelease", "comment"); + fixField("ps_observation.Route", "comment"); + fixField("ps_observation.Set", "comment"); + fixField("ps_observation.TransmittingBuoy", "comment"); + return count.get(); + } + + public void fixField(String gav, String field) { + + executor.doSqlWork(connection -> { + try (PreparedStatement statement = connection.prepareStatement(String.format("SELECT topiaId, %2$s FROM %1$s WHERE %2$s IS NOT NULL", gav, field))) { + try (ResultSet resultSet = statement.executeQuery()) { + while (resultSet.next()) { + String fieldValue = resultSet.getString(2); + String fixFieldValue = fieldValue.trim(); + if (!fieldValue.equals(fixFieldValue)) { + if (fixFieldValue.isEmpty()) { + fixFieldValue = null; + } + String id = resultSet.getString(1); + String finalFieldValue = commentFormat.apply(fixFieldValue); + log.info(String.format("Fix comment field %s.%s[%s] from\n[%s]\nto\n[%s]", gav, field, id, fieldValue, fixFieldValue)); + executor.writeSql(String.format("UPDATE %s SET %s = %s WHERE topiaId = '%s';", gav, field, finalFieldValue, id)); + count.incrementAndGet(); + } + } + } + } + }); + + } +} ===================================== core/persistence/resources/src/main/java/fr/ird/observe/spi/migration/v9/FixStringHelper.java ===================================== @@ -0,0 +1,264 @@ +package fr.ird.observe.spi.migration.v9; + +/*- + * #%L + * ObServe Core :: Persistence :: Resources + * %% + * Copyright (C) 2008 - 2022 IRD, Ultreia.io + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + +import fr.ird.observe.dto.StringCleaner; +import fr.ird.observe.persistence.SqlHelper; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.nuiton.topia.service.migration.resources.MigrationVersionResourceExecutor; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.Collections; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.TreeSet; +import java.util.concurrent.atomic.AtomicLong; + +/** + * To auto-trim string fields and remove any {@code '} characters inside it. + * <p> + * <strong>Note:</strong> If fixed value is empty or blank then set {@code null} value. + * <p> + * Created on 11/11/2022. + * + * @author Tony Chemit - dev@tchemit.fr + * @since 9.0.17 + */ +public class FixStringHelper { + + private static final Logger log = LogManager.getLogger(FixStringHelper.class); + + private final MigrationVersionResourceExecutor executor; + private final AtomicLong count = new AtomicLong(); + + public FixStringHelper(MigrationVersionResourceExecutor executor) { + this.executor = Objects.requireNonNull(executor); + } + + static class FixStringEntityModel { + + private final String gav; + private final Map<String, StringCleaner> fieldsActions; + private final Set<String> fieldsDeleteIfNull; + + static FixStringEntityModel on(String gav, StringCleaner cleaner, String firstField, String... fields) { + return new FixStringEntityModel(gav).add(cleaner, firstField, fields); + } + + static FixStringEntityModel onI18n(String gav, StringCleaner cleaner, String firstField, String... fields) { + return on(gav, StringCleaner.TRIM, "label1", "label2", "label3").add(cleaner, firstField, fields); + } + + private FixStringEntityModel(String gav) { + this.gav = gav; + this.fieldsActions = new TreeMap<>(); + this.fieldsDeleteIfNull = new TreeSet<>(); + } + + FixStringEntityModel add(StringCleaner cleaner, String firstField, String... fields) { + fieldsActions.put(firstField, cleaner); + for (String field : fields) { + fieldsActions.put(field, cleaner); + } + return this; + } + + FixStringEntityModel deleteIfNull(String firstField, String... fields) { + fieldsDeleteIfNull.add(firstField); + Collections.addAll(fieldsDeleteIfNull, fields); + return this; + } + + } + + public long execute() { + executor.doSqlWork(connection -> { + execute(connection, FixStringEntityModel.onI18n("common.Country", StringCleaner.ALL, "code", "iso2Code", "iso3Code")); + execute(connection, FixStringEntityModel.onI18n("common.DataQuality", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("common.FpaZone", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("common.Gear", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("common.GearCharacteristic", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("common.GearCharacteristicType", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("common.Harbour", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.on("common.LengthLengthParameter", StringCleaner.ALL, "coefficients", "inputOutputFormula", "outputInputFormula")); + execute(connection, FixStringEntityModel.onI18n("common.LengthMeasureMethod", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.on("common.LengthWeightParameter", StringCleaner.ALL, "coefficients", "lengthWeightFormula", "weightLengthFormula")); + execute(connection, FixStringEntityModel.onI18n("common.Ocean", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("common.Organism", StringCleaner.ALL, "code")); + // not removing single quotes + execute(connection, FixStringEntityModel.on("common.Person", StringCleaner.TRIM, "firstName", "lastName")); + execute(connection, FixStringEntityModel.onI18n("common.Sex", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.on("common.ShipOwner", StringCleaner.ALL, "code", "label")); + execute(connection, FixStringEntityModel.onI18n("common.SizeMeasureType", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("common.Species", StringCleaner.ALL, "scientificLabel")); + execute(connection, FixStringEntityModel.onI18n("common.SpeciesGroup", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("common.SpeciesGroupReleaseMode", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("common.SpeciesList", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("common.Vessel", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("common.VesselType", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.on("common.VesselSizeCategory", StringCleaner.ALL, "code", "capacityLabel", "gaugeLabel")); + execute(connection, FixStringEntityModel.onI18n("common.WeightMeasureMethod", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("common.WeightMeasureType", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("common.Wind", StringCleaner.ALL, "code")); + + execute(connection, FixStringEntityModel.onI18n("ll_common.BaitSettingStatus", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ll_common.BaitType", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ll_common.CatchFate", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ll_common.HealthStatus", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ll_common.HookSize", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ll_common.HookType", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ll_common.LightsticksColor", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ll_common.LightsticksType", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ll_common.LineType", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ll_common.MitigationType", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ll_common.ObservationMethod", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ll_common.OnBoardProcessing", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ll_common.Program", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ll_common.SettingShape", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ll_common.TripType", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ll_common.VesselActivity", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ll_common.WeightDeterminationMethod", StringCleaner.ALL, "code")); + + execute(connection, FixStringEntityModel.onI18n("ll_landing.Company", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ll_landing.Conservation", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ll_landing.DataSource", StringCleaner.ALL, "code")); + + execute(connection, FixStringEntityModel.onI18n("ll_observation.BaitHaulingStatus", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ll_observation.EncounterType", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ll_observation.HookPosition", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ll_observation.ItemHorizontalPosition", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ll_observation.ItemVerticalPosition", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ll_observation.MaturityStatus", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.on("ll_observation.SensorBrand", StringCleaner.ALL, "brandName", "code")); + execute(connection, FixStringEntityModel.onI18n("ll_observation.SensorDataFormat", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ll_observation.SensorType", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ll_observation.StomachFullness", StringCleaner.ALL, "code")); + + execute(connection, FixStringEntityModel.onI18n("ps_common.AcquisitionStatus", StringCleaner.ALL, "code")); + // not set to null if empty (special value FOB has an empty code) + execute(connection, FixStringEntityModel.onI18n("ps_common.ObjectMaterial", StringCleaner.REMOVE_SINGLE_QUOTE_AND_TRIM, "code")); + execute(connection, FixStringEntityModel.onI18n("ps_common.ObjectMaterialType", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ps_common.ObjectOperation", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ps_common.ObservedSystem", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ps_common.Program", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ps_common.ReasonForNoFishing", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ps_common.ReasonForNullSet", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ps_common.SampleType", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ps_common.SchoolType", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ps_common.SpeciesFate", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ps_common.TransmittingBuoyOperation", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ps_common.TransmittingBuoyOwnership", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ps_common.TransmittingBuoyType", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ps_common.VesselActivity", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ps_common.WeightCategory", StringCleaner.ALL, "code")); + + execute(connection, FixStringEntityModel.onI18n("ps_landing.Destination", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ps_landing.Fate", StringCleaner.ALL, "code")); + + execute(connection, FixStringEntityModel.onI18n("ps_localmarket.BatchComposition", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ps_localmarket.BatchWeightType", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ps_localmarket.Packaging", StringCleaner.ALL, "code")); + + execute(connection, FixStringEntityModel.onI18n("ps_logbook.InformationSource", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ps_logbook.SampleQuality", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ps_logbook.SetSuccessStatus", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ps_logbook.WellContentStatus", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ps_logbook.WellSamplingConformity", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ps_logbook.WellSamplingStatus", StringCleaner.ALL, "code")); + + execute(connection, FixStringEntityModel.onI18n("ps_observation.DetectionMode", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ps_observation.InformationSource", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ps_observation.NonTargetCatchReleaseConformity", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ps_observation.NonTargetCatchReleaseStatus", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ps_observation.NonTargetCatchReleasingTime", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ps_observation.ReasonForDiscard", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ps_observation.SpeciesStatus", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.onI18n("ps_observation.SurroundingActivity", StringCleaner.ALL, "code")); + + execute(connection, FixStringEntityModel.on("ll_common.GearUseFeaturesMeasurement", StringCleaner.ALL, "measurementValue").deleteIfNull("measurementValue")); + execute(connection, FixStringEntityModel.on("ll_common.Trip", StringCleaner.ALL, "ersId", "homeId")); + + execute(connection, FixStringEntityModel.on("ll_logbook.Catch", StringCleaner.ALL, "photoReferences", "tagNumber")); + execute(connection, FixStringEntityModel.on("ll_logbook.SamplePart", StringCleaner.ALL, "tagNumber")); + execute(connection, FixStringEntityModel.on("ll_logbook.Set", StringCleaner.ALL, "homeId")); + + execute(connection, FixStringEntityModel.on("ll_observation.Catch", StringCleaner.ALL, "photoReferences", "tagNumber")); + execute(connection, FixStringEntityModel.on("ll_observation.SensorUsed", StringCleaner.ALL, "sensorSerialNo")); + execute(connection, FixStringEntityModel.on("ll_observation.Set", StringCleaner.ALL, "homeId")); + execute(connection, FixStringEntityModel.on("ll_observation.Tdr", StringCleaner.ALL, "serialNo")); + + execute(connection, FixStringEntityModel.on("ps_common.GearUseFeaturesMeasurement", StringCleaner.ALL, "measurementValue").deleteIfNull("measurementValue")); + execute(connection, FixStringEntityModel.on("ps_common.Trip", StringCleaner.ALL, "ersId", "formsUrl", "homeId", "reportsUrl")); + + execute(connection, FixStringEntityModel.on("ps_localmarket.Sample", StringCleaner.ALL, "number")); + + execute(connection, FixStringEntityModel.on("ps_logbook.Catch", StringCleaner.ALL, "well")); + execute(connection, FixStringEntityModel.on("ps_logbook.FloatingObject", StringCleaner.ALL, "supportVesselName")); + execute(connection, FixStringEntityModel.on("ps_logbook.Sample", StringCleaner.ALL, "well")); + execute(connection, FixStringEntityModel.on("ps_logbook.TransmittingBuoy", StringCleaner.ALL, "code")); + execute(connection, FixStringEntityModel.on("ps_logbook.WellPlan", StringCleaner.ALL, "well")); + + execute(connection, FixStringEntityModel.on("ps_observation.Activity", StringCleaner.ALL, "ersId")); + execute(connection, FixStringEntityModel.on("ps_observation.FloatingObject", StringCleaner.ALL, "supportVesselName")); + execute(connection, FixStringEntityModel.on("ps_observation.SampleMeasure", StringCleaner.ALL, "picturesReferences", "tagNumber")); + execute(connection, FixStringEntityModel.on("ps_observation.Set", StringCleaner.ALL, "supportVesselName")); + execute(connection, FixStringEntityModel.on("ps_observation.TransmittingBuoy", StringCleaner.ALL, "code")); + }); + return count.get(); + } + + void execute(Connection connection, FixStringEntityModel model) throws SQLException { + for (Map.Entry<String, StringCleaner> entry : model.fieldsActions.entrySet()) { + execute(connection, model.gav, entry.getKey(), entry.getValue(), model.fieldsDeleteIfNull.contains(entry.getKey())); + } + } + + void execute(Connection connection, String gav, String field, StringCleaner cleaner, boolean deleteIfNull) throws SQLException { + try (PreparedStatement statement = connection.prepareStatement(String.format("SELECT topiaId, %2$s FROM %1$s WHERE %2$s IS NOT NULL", gav, field))) { + try (ResultSet resultSet = statement.executeQuery()) { + while (resultSet.next()) { + String fieldValue = resultSet.getString(2); + String fixFieldValue = cleaner.apply(fieldValue); + if (!fieldValue.equals(fixFieldValue)) { + String id = resultSet.getString(1); + if (deleteIfNull && fixFieldValue == null) { + log.warn(String.format("Delete row since field is empty %s.%s[%s] (was '%s')", gav, field, id, fieldValue)); + executor.writeSql(String.format("DELETE FROM %1$s WHERE topiaId = '%2$s';", gav, id)); + } else { + log.info(String.format("Fix string field %s.%s[%s] from\n[%s]\n to\n[%s]", gav, field, id, fieldValue, fixFieldValue)); + String finalFieldValue = SqlHelper.escapeString(fixFieldValue); + executor.writeSql(String.format("UPDATE %1$s SET %2$s = %3$s WHERE topiaId = '%4$s';", gav, field, finalFieldValue, id)); + } + count.incrementAndGet(); + } + } + } + } + } +} ===================================== core/persistence/resources/src/main/java/fr/ird/observe/spi/migration/v9/NotDiscardedTargetCatchRecord.java ===================================== @@ -22,6 +22,8 @@ package fr.ird.observe.spi.migration.v9; * #L% */ +import fr.ird.observe.dto.StringCleaner; +import fr.ird.observe.persistence.SqlHelper; import fr.ird.observe.spi.context.DataDtoEntityContext; import java.sql.Connection; @@ -42,19 +44,19 @@ class NotDiscardedTargetCatchRecord { public static PreparedStatement prepareStatement(Connection connection) throws SQLException { return connection.prepareStatement("SELECT" + - /* 01 */ " REPLACE(tc.topiaId, '.TargetCatch', '.Catch')," + - /* 02 */ " tc.topiaVersion + 1," + - /* 03 */ " tc.topiaCreateDate," + - /* 04 */ " tc.homeId," + - /* 05 */ " tc.catchWeight," + - /* 06 */ " tc.weightCategory," + - /* 07 */ " tc.comment," + - /* 08 */ " tc.set," + - /* 09 */ " tc.lastUpdateDate," + - /* 10 */ " tc.well," + - /* 11 */ " -tc.set_idx," + - /* 12 */ " tc.weightMeasureMethod," + - /* 13 */ " s.targetcatchcompositionestimatedbyobserver " + + /* 01 */ " REPLACE(tc.topiaId, '.TargetCatch', '.Catch')," + + /* 02 */ " tc.topiaVersion + 1," + + /* 03 */ " tc.topiaCreateDate," + + /* 04 */ " tc.homeId," + + /* 05 */ " tc.catchWeight," + + /* 06 */ " tc.weightCategory," + + /* 07 */ " tc.comment," + + /* 08 */ " tc.set," + + /* 09 */ " tc.lastUpdateDate," + + /* 10 */ " tc.well," + + /* 11 */ " -tc.set_idx," + + /* 12 */ " tc.weightMeasureMethod," + + /* 13 */ " s.targetcatchcompositionestimatedbyobserver " + " FROM ps_observation.TargetCatch tc INNER JOIN ps_observation.set s on s.topiaId = tc.set" + " WHERE NOT tc.discarded AND NOT ( weightCategory IS NULL AND catchweight IS NULL AND well IS NULL AND broughtondeck IS NULL AND reasonfordiscard IS NULL )"); } @@ -131,24 +133,24 @@ class NotDiscardedTargetCatchRecord { "%16$s, " + "%17$s, " + "%18$s);", - /*1*/ DataDtoEntityContext.escapeString(id), + /*1*/ SqlHelper.escapeString(id), /*2*/ topiaVersion, /*3*/ DataDtoEntityContext.timestamp(topiaCreateDate), - /*4*/ DataDtoEntityContext.escapeString(homeId), + /*4*/ SqlHelper.escapeString(StringCleaner.ALL.apply(homeId)), /*5*/ catchWeight, /*6*/ weightCategoryRecord.getMinWeight(), /*7*/ weightCategoryRecord.getMaxWeight(), /*8*/ null, /*9*/ getComment(weightCategoryRecord, commentFormat), /*10*/ null, - /*11*/ DataDtoEntityContext.escapeString(weightCategoryRecord.getSpeciesId()), - /*12*/ DataDtoEntityContext.escapeString("10".equals(weightCategoryRecord.getCode()) ? DataSourceMigrationForVersion_9_0.SPECIES_FATE_15 : DataSourceMigrationForVersion_9_0.SPECIES_FATE_6), - /*13*/ DataDtoEntityContext.escapeString(setId), + /*11*/ SqlHelper.escapeString(weightCategoryRecord.getSpeciesId()), + /*12*/ SqlHelper.escapeString("10".equals(weightCategoryRecord.getCode()) ? DataSourceMigrationForVersion_9_0.SPECIES_FATE_15 : DataSourceMigrationForVersion_9_0.SPECIES_FATE_6), + /*13*/ SqlHelper.escapeString(setId), /*14*/ DataDtoEntityContext.timestamp(lastUpdateDate), - /*15*/ DataDtoEntityContext.escapeString(getWell()), + /*15*/ SqlHelper.escapeString(StringCleaner.ALL.apply(well)), /*16*/ setIdx, - /*17*/ DataDtoEntityContext.escapeString(weightMeasureMethodId == null ? "fr.ird.referential.common.WeightMeasureMethod#666#03" : weightCategoryId), - /*18*/ DataDtoEntityContext.escapeString(targetCatchCompositionEstimatedByObserver ? DataSourceMigrationForVersion_9_0.INFORMATION_SOURCE_P : DataSourceMigrationForVersion_9_0.INFORMATION_SOURCE_U) + /*17*/ SqlHelper.escapeString(weightMeasureMethodId == null ? "fr.ird.referential.common.WeightMeasureMethod#666#03" : weightCategoryId), + /*18*/ SqlHelper.escapeString(targetCatchCompositionEstimatedByObserver ? DataSourceMigrationForVersion_9_0.INFORMATION_SOURCE_P : DataSourceMigrationForVersion_9_0.INFORMATION_SOURCE_U) ); } @@ -158,16 +160,4 @@ class NotDiscardedTargetCatchRecord { } return stringFormat.apply(comment + "\n" + weightCategoryRecord.toComment()); } - - - public String getWell() { - String result = well; - if (result!=null) { - result = well.trim(); - if (well.startsWith("'")) { - result = result.substring(1); - } - } - return result; - } } ===================================== core/persistence/resources/src/main/resources/db/migration/v9/9.0/99_2_drop_tables-H2.sql ===================================== @@ -25,12 +25,12 @@ ALTER TABLE ps_observation.Set DROP COLUMN targetdiscardcatchcompositionestimate ALTER TABLE ll_common.Trip DROP COLUMN program; ALTER TABLE ps_common.Trip DROP COLUMN program; --- DROP TABLE ps_observation.NonTargetLength; --- DROP TABLE ps_observation.NonTargetSample; --- DROP TABLE ps_observation.NonTargetCatch; --- DROP TABLE ps_observation.TargetCatch; --- DROP TABLE ps_observation.TargetSample; --- DROP TABLE ps_observation.TargetLength; +DROP TABLE ps_observation.NonTargetLength; +DROP TABLE ps_observation.NonTargetSample; +DROP TABLE ps_observation.NonTargetCatch; +DROP TABLE ps_observation.TargetCatch; +DROP TABLE ps_observation.TargetSample; +DROP TABLE ps_observation.TargetLength; DROP TABLE ps_observation.ReasonForNullSet; DROP TABLE ps_observation.ReasonForNoFishing; DROP TABLE ps_observation.WeightCategory; ===================================== core/persistence/resources/src/main/resources/db/migration/v9/9.0/99_2_drop_tables-PG.sql ===================================== @@ -25,12 +25,12 @@ ALTER TABLE ps_observation.Set DROP COLUMN targetdiscardcatchcompositionestimate ALTER TABLE ll_common.Trip DROP COLUMN program CASCADE; ALTER TABLE ps_common.Trip DROP COLUMN program CASCADE; --- DROP TABLE ps_observation.NonTargetLength CASCADE; --- DROP TABLE ps_observation.NonTargetSample CASCADE; --- DROP TABLE ps_observation.NonTargetCatch CASCADE; --- DROP TABLE ps_observation.TargetLength CASCADE; --- DROP TABLE ps_observation.TargetSample CASCADE; --- DROP TABLE ps_observation.TargetCatch CASCADE; +DROP TABLE ps_observation.NonTargetLength CASCADE; +DROP TABLE ps_observation.NonTargetSample CASCADE; +DROP TABLE ps_observation.NonTargetCatch CASCADE; +DROP TABLE ps_observation.TargetLength CASCADE; +DROP TABLE ps_observation.TargetSample CASCADE; +DROP TABLE ps_observation.TargetCatch CASCADE; DROP TABLE ps_observation.ReasonForNullSet CASCADE; DROP TABLE ps_observation.ReasonForNoFishing CASCADE; DROP TABLE ps_observation.WeightCategory CASCADE; ===================================== core/services/i18n/src/main/i18n/translations/services_en_GB.properties ===================================== @@ -1244,6 +1244,7 @@ observe.data.ps.observation.Catch.meanWeight.short=Mean weight observe.data.ps.observation.Catch.meanWeight.validation.notFilled=Weight or mean size must be filled. observe.data.ps.observation.Catch.meanWeightComputed.computed.tip=Mean weight was computed (%s) observe.data.ps.observation.Catch.meanWeightComputed.observed.tip=Mean weight was observed +observe.data.ps.observation.Catch.minMaxWeight=Lower / upper weight limit (in kg) observe.data.ps.observation.Catch.minWeight=Lower weight limit (in kg) observe.data.ps.observation.Catch.minWeight.short=Min weight (in kg) observe.data.ps.observation.Catch.reasonForDiscard=Reason for discard ===================================== core/services/i18n/src/main/i18n/translations/services_es_ES.properties ===================================== @@ -1244,6 +1244,7 @@ observe.data.ps.observation.Catch.meanWeight.short=Peso medio observe.data.ps.observation.Catch.meanWeight.validation.notFilled=Debe seleccionar uno de los dos valores (peso medio o talla media). observe.data.ps.observation.Catch.meanWeightComputed.computed.tip=El peso medio se calculó observe.data.ps.observation.Catch.meanWeightComputed.observed.tip=El peso medio se observó +observe.data.ps.observation.Catch.minMaxWeight=Lower / upper weight limit (in kg) TODO observe.data.ps.observation.Catch.minWeight=Lower weight limit (in kg) TODO observe.data.ps.observation.Catch.minWeight.short=Max weight (in kg) observe.data.ps.observation.Catch.reasonForDiscard=Razón del descarte ===================================== core/services/i18n/src/main/i18n/translations/services_fr_FR.properties ===================================== @@ -1244,6 +1244,7 @@ observe.data.ps.observation.Catch.meanWeight.short=Poids moy observe.data.ps.observation.Catch.meanWeight.validation.notFilled=Une des deux valeurs (poids moyen ou taille moyenne) devrait être renseignée. observe.data.ps.observation.Catch.meanWeightComputed.computed.tip=Le poids moyen a été calculé (%s) observe.data.ps.observation.Catch.meanWeightComputed.observed.tip=Le poids moyen a été observé +observe.data.ps.observation.Catch.minMaxWeight=Borne de poids inférieure / supérieure (en kg) observe.data.ps.observation.Catch.minWeight=Borne de poids inférieure (en kg) observe.data.ps.observation.Catch.minWeight.short=Poids min (en kg) observe.data.ps.observation.Catch.reasonForDiscard=Raison rejet ===================================== core/services/test/src/main/resources/fixtures/fr/ird/observe/services/service/ValidateService-dataResult.json ===================================== @@ -43828,7 +43828,7 @@ "topiaVersion": 16, "topiaCreateDate": "2009-04-15T00:00:00.009Z" }, - "speciesFateLabel": "Conservé (en cuve, poisson séché ou salé)", + "speciesFateLabel": "Conservé à destination de la conserverie", "catchWeight": 1.0, "well": "2", "id": "fr.ird.data.ps.observation.Catch#1554060786914#0.3899957341641852", @@ -43874,7 +43874,7 @@ "topiaVersion": 16, "topiaCreateDate": "2009-04-15T00:00:00.004Z" }, - "speciesFateLabel": "Conservé (en cuve, poisson séché ou salé)", + "speciesFateLabel": "Conservé à destination de la conserverie", "catchWeight": 1.0, "well": "2", "id": "fr.ird.data.ps.observation.Catch#1554060786914#0.455212337619455", @@ -43920,7 +43920,7 @@ "topiaVersion": 16, "topiaCreateDate": "2009-04-15T00:00:00.010Z" }, - "speciesFateLabel": "Conservé (en cuve, poisson séché ou salé)", + "speciesFateLabel": "Conservé à destination de la conserverie", "catchWeight": 16.0, "well": "1", "id": "fr.ird.data.ps.observation.Catch#1554228692388#0.40195828823649804", @@ -43966,7 +43966,7 @@ "topiaVersion": 15, "topiaCreateDate": "2009-04-15T00:00:00.001Z" }, - "speciesFateLabel": "Conservé (en cuve, poisson séché ou salé)", + "speciesFateLabel": "Conservé à destination de la conserverie", "catchWeight": 1.0, "well": "1", "id": "fr.ird.data.ps.observation.Catch#1554228692388#0.5827043409961202", @@ -44012,7 +44012,7 @@ "topiaVersion": 15, "topiaCreateDate": "2009-04-15T00:00:00.001Z" }, - "speciesFateLabel": "Conservé (en cuve, poisson séché ou salé)", + "speciesFateLabel": "Conservé à destination de la conserverie", "catchWeight": 4.0, "well": "1", "id": "fr.ird.data.ps.observation.Catch#1554228964667#0.3873882731438876", @@ -44058,7 +44058,7 @@ "topiaVersion": 16, "topiaCreateDate": "2009-04-15T00:00:00.010Z" }, - "speciesFateLabel": "Conservé (en cuve, poisson séché ou salé)", + "speciesFateLabel": "Conservé à destination de la conserverie", "catchWeight": 27.0, "well": "1", "id": "fr.ird.data.ps.observation.Catch#1554228964667#0.6898347092973715", @@ -44104,7 +44104,7 @@ "topiaVersion": 15, "topiaCreateDate": "2009-04-15T00:00:00.001Z" }, - "speciesFateLabel": "Conservé (en cuve, poisson séché ou salé)", + "speciesFateLabel": "Conservé à destination de la conserverie", "catchWeight": 1.0, "well": "4", "id": "fr.ird.data.ps.observation.Catch#1554228964683#0.5525193499129678", @@ -44150,7 +44150,7 @@ "topiaVersion": 16, "topiaCreateDate": "2009-04-15T00:00:00.010Z" }, - "speciesFateLabel": "Conservé (en cuve, poisson séché ou salé)", + "speciesFateLabel": "Conservé à destination de la conserverie", "catchWeight": 39.0, "well": "4", "id": "fr.ird.data.ps.observation.Catch#1554228964683#0.6111969202426193", @@ -44196,7 +44196,7 @@ "topiaVersion": 16, "topiaCreateDate": "2009-04-15T00:00:00.010Z" }, - "speciesFateLabel": "Conservé (en cuve, poisson séché ou salé)", + "speciesFateLabel": "Conservé à destination de la conserverie", "catchWeight": 15.0, "well": "4", "id": "fr.ird.data.ps.observation.Catch#1554229020077#0.06929838028483837", @@ -44242,7 +44242,7 @@ "topiaVersion": 16, "topiaCreateDate": "2009-04-15T00:00:00.010Z" }, - "speciesFateLabel": "Conservé (en cuve, poisson séché ou salé)", + "speciesFateLabel": "Conservé à destination de la conserverie", "catchWeight": 25.0, "well": "2", "id": "fr.ird.data.ps.observation.Catch#1554229020077#0.764944972601716", @@ -44288,7 +44288,7 @@ "topiaVersion": 15, "topiaCreateDate": "2009-04-15T00:00:00.001Z" }, - "speciesFateLabel": "Conservé (en cuve, poisson séché ou salé)", + "speciesFateLabel": "Conservé à destination de la conserverie", "catchWeight": 1.0, "well": "3", "id": "fr.ird.data.ps.observation.Catch#1554659569269#0.5089206009917716", @@ -44334,7 +44334,7 @@ "topiaVersion": 16, "topiaCreateDate": "2009-04-15T00:00:00.010Z" }, - "speciesFateLabel": "Conservé (en cuve, poisson séché ou salé)", + "speciesFateLabel": "Conservé à destination de la conserverie", "catchWeight": 53.0, "well": "3", "id": "fr.ird.data.ps.observation.Catch#1554659569269#0.9595940690443661", @@ -44470,7 +44470,7 @@ "topiaVersion": 19, "topiaCreateDate": "2009-04-15T00:00:00.005Z" }, - "speciesFateLabel": "Conservé (en cuve, poisson séché ou salé)", + "speciesFateLabel": "Conservé à destination de la conserverie", "catchWeight": 12.0, "well": "3T", "id": "fr.ird.data.ps.observation.Catch#1612860304046#0.051529228859696796", ===================================== core/services/test/src/main/resources/fixtures/fr/ird/observe/services/service/ValidateService-referentialResult.json ===================================== @@ -10711,7 +10711,7 @@ }, "startDate": "1970-01-01T00:00:00.000Z", "lengthWeightFormula": "a * Math.pow(L, b)", - "weightLengthFormula": "Math.pow(P/a, 1/b) ", + "weightLengthFormula": "Math.pow(P/a, 1/b)", "sizeMeasureType": { "code": "DW", "label": "Disk Width", @@ -10751,9 +10751,9 @@ "sexLabel": "Indéterminé", "species": { "code": "248", - "label": "Mantes, diables de mer nca ", + "label": "Mantes, diables de mer nca", "faoCode": "MAN", - "scientificLabel": "Mobulidae ", + "scientificLabel": "Mobulidae", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499468646#0.710986209334806", "weightMeasureTypeId": "fr.ird.referential.common.WeightMeasureType#1239832686139#0.2", "speciesGroupId": "fr.ird.referential.common.SpeciesGroup#1445863056144#0.9820877553253712", @@ -10771,7 +10771,7 @@ }, "startDate": "1970-01-01T00:00:00.000Z", "lengthWeightFormula": "a * Math.pow(L, b)", - "weightLengthFormula": " Math.pow(P/a, 1/b) ", + "weightLengthFormula": "Math.pow(P/a, 1/b)", "sizeMeasureType": { "code": "DW", "label": "Disk Width", @@ -10831,7 +10831,7 @@ }, "startDate": "1970-01-01T00:00:00.000Z", "lengthWeightFormula": "a * Math.pow(L, b)", - "weightLengthFormula": "Math.pow(P/a, 1/b) ", + "weightLengthFormula": "Math.pow(P/a, 1/b)", "sizeMeasureType": { "code": "FL", "label": "Fork Length", @@ -10871,7 +10871,7 @@ "sexLabel": "Indéterminé", "species": { "code": "376", - "label": "Rémora des espadons ", + "label": "Rémora des espadons", "faoCode": "REY", "scientificLabel": "Remora brachyptera", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", @@ -10890,7 +10890,7 @@ "topiaCreateDate": "2010-07-24T00:00:00.161Z" }, "startDate": "1970-01-01T00:00:00.000Z", - "lengthWeightFormula": "a * Math.pow(L, b) ", + "lengthWeightFormula": "a * Math.pow(L, b)", "weightLengthFormula": "Math.pow(P/a, 1/b)", "sizeMeasureType": { "code": "TL", @@ -10931,7 +10931,7 @@ "sexLabel": "Indéterminé", "species": { "code": "375", - "label": "Rémora des marlins ", + "label": "Rémora des marlins", "faoCode": "REZ", "scientificLabel": "Remora osteochir", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", @@ -10950,8 +10950,8 @@ "topiaCreateDate": "2010-07-24T00:00:00.164Z" }, "startDate": "1970-01-01T00:00:00.000Z", - "lengthWeightFormula": "a * Math.pow(L, b) ", - "weightLengthFormula": "Math.pow(P/a, 1/b) ", + "lengthWeightFormula": "a * Math.pow(L, b)", + "weightLengthFormula": "Math.pow(P/a, 1/b)", "sizeMeasureType": { "code": "TL", "label": "Total Length", @@ -11010,8 +11010,8 @@ "topiaCreateDate": "2010-07-24T00:00:00.160Z" }, "startDate": "1970-01-01T00:00:00.000Z", - "lengthWeightFormula": "a * Math.pow(L, b) ", - "weightLengthFormula": "Math.pow(P/a, 1/b) ", + "lengthWeightFormula": "a * Math.pow(L, b)", + "weightLengthFormula": "Math.pow(P/a, 1/b)", "sizeMeasureType": { "code": "FL", "label": "Fork Length", @@ -11071,7 +11071,7 @@ }, "startDate": "1970-01-01T00:00:00.000Z", "lengthWeightFormula": "a * Math.pow(L, b)", - "weightLengthFormula": "Math.pow(P/a, 1/b) ", + "weightLengthFormula": "Math.pow(P/a, 1/b)", "sizeMeasureType": { "code": "FL", "label": "Fork Length", @@ -11173,7 +11173,7 @@ "code": "0", "label": "Famille Clupeidae", "faoCode": "CLP", - "scientificLabel": "Clupeidae ", + "scientificLabel": "Clupeidae", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", "weightMeasureTypeId": "fr.ird.referential.common.WeightMeasureType#1239832686139#0.2", "speciesGroupId": "fr.ird.referential.common.SpeciesGroup#1239832683689#0.12092280503502995", @@ -11231,7 +11231,7 @@ "code": "0", "label": "Famille Clupeidae", "faoCode": "CLP", - "scientificLabel": "Clupeidae ", + "scientificLabel": "Clupeidae", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", "weightMeasureTypeId": "fr.ird.referential.common.WeightMeasureType#1239832686139#0.2", "speciesGroupId": "fr.ird.referential.common.SpeciesGroup#1239832683689#0.12092280503502995", @@ -11306,7 +11306,7 @@ "topiaCreateDate": "2012-06-14T00:00:00.193Z" }, "startDate": "1970-01-01T00:00:00.000Z", - "lengthWeightFormula": "a * Math.pow(L, b) ", + "lengthWeightFormula": "a * Math.pow(L, b)", "weightLengthFormula": "Math.pow(P/a, 1/b)", "sizeMeasureType": { "code": "FL", @@ -11366,7 +11366,7 @@ "topiaCreateDate": "2012-06-14T00:00:00.193Z" }, "startDate": "1970-01-01T00:00:00.000Z", - "lengthWeightFormula": "a * Math.pow(L, b) ", + "lengthWeightFormula": "a * Math.pow(L, b)", "weightLengthFormula": "Math.pow(P/a, 1/b)", "sizeMeasureType": { "code": "FL", @@ -11422,8 +11422,8 @@ "topiaCreateDate": "2011-06-22T00:00:00.188Z" }, "startDate": "1970-01-01T00:00:00.000Z", - "lengthWeightFormula": "a * Math.pow(L, b) ", - "weightLengthFormula": "Math.pow(P/a, 1/b) ", + "lengthWeightFormula": "a * Math.pow(L, b)", + "weightLengthFormula": "Math.pow(P/a, 1/b)", "sizeMeasureType": { "code": "TL", "label": "Total Length", @@ -11478,8 +11478,8 @@ "topiaCreateDate": "2011-06-22T00:00:00.188Z" }, "startDate": "1970-01-01T00:00:00.000Z", - "lengthWeightFormula": "a * Math.pow(L, b) ", - "weightLengthFormula": "Math.pow(P/a, 1/b) ", + "lengthWeightFormula": "a * Math.pow(L, b)", + "weightLengthFormula": "Math.pow(P/a, 1/b)", "sizeMeasureType": { "code": "TL", "label": "Total Length", @@ -11519,7 +11519,7 @@ "sexLabel": "Indéterminé", "species": { "code": "0", - "label": "Rémora commun ", + "label": "Rémora commun", "faoCode": "EHN", "scientificLabel": "Echeneis naucrates", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", @@ -11534,7 +11534,7 @@ "topiaCreateDate": "2011-06-22T00:00:00.080Z" }, "startDate": "1970-01-01T00:00:00.000Z", - "lengthWeightFormula": "a * Math.pow(L, b) ", + "lengthWeightFormula": "a * Math.pow(L, b)", "weightLengthFormula": "Math.pow(P/a, 1/b)", "sizeMeasureType": { "code": "TL", @@ -11575,7 +11575,7 @@ "sexLabel": "Indéterminé", "species": { "code": "0", - "label": "Rémora commun ", + "label": "Rémora commun", "faoCode": "EHN", "scientificLabel": "Echeneis naucrates", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", @@ -11590,7 +11590,7 @@ "topiaCreateDate": "2011-06-22T00:00:00.080Z" }, "startDate": "1970-01-01T00:00:00.000Z", - "lengthWeightFormula": "a * Math.pow(L, b) ", + "lengthWeightFormula": "a * Math.pow(L, b)", "weightLengthFormula": "Math.pow(P/a, 1/b)", "sizeMeasureType": { "code": "TL", @@ -11648,7 +11648,7 @@ "topiaCreateDate": "2011-06-22T00:00:00.142Z" }, "startDate": "1970-01-01T00:00:00.000Z", - "lengthWeightFormula": "a * Math.pow(L, b) ", + "lengthWeightFormula": "a * Math.pow(L, b)", "weightLengthFormula": "Math.pow(P/a, 1/b)", "sizeMeasureType": { "code": "TL", @@ -11706,7 +11706,7 @@ "topiaCreateDate": "2011-06-22T00:00:00.142Z" }, "startDate": "1970-01-01T00:00:00.000Z", - "lengthWeightFormula": "a * Math.pow(L, b) ", + "lengthWeightFormula": "a * Math.pow(L, b)", "weightLengthFormula": "Math.pow(P/a, 1/b)", "sizeMeasureType": { "code": "TL", @@ -11747,7 +11747,7 @@ "sexLabel": "Indéterminé", "species": { "code": "321", - "label": "Porc-épic boubou ", + "label": "Porc-épic boubou", "faoCode": "DIY", "scientificLabel": "Diodon hystrix", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", @@ -13489,7 +13489,7 @@ "sexLabel": "Indéterminé", "species": { "code": "340", - "label": "Calicagère bleue ", + "label": "Calicagère bleue", "faoCode": "KYC", "scientificLabel": "Kyphosus cinerascens", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499465700#0.0902433863375336", @@ -13549,7 +13549,7 @@ "sexLabel": "Indéterminé", "species": { "code": "334", - "label": "Kyphosus calicagères nca ", + "label": "Kyphosus calicagères nca", "faoCode": "KYP", "scientificLabel": "Kyphosus spp", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499465700#0.0902433863375336", @@ -13609,7 +13609,7 @@ "sexLabel": "Indéterminé", "species": { "code": "334", - "label": "Kyphosus calicagères nca ", + "label": "Kyphosus calicagères nca", "faoCode": "KYP", "scientificLabel": "Kyphosus spp", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499465700#0.0902433863375336", @@ -13729,7 +13729,7 @@ "sexLabel": "Indéterminé", "species": { "code": "359", - "label": "Sériole limon ", + "label": "Sériole limon", "faoCode": "YTL", "scientificLabel": "Seriola rivoliana", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499465700#0.0902433863375336", @@ -13789,7 +13789,7 @@ "sexLabel": "Indéterminé", "species": { "code": "359", - "label": "Sériole limon ", + "label": "Sériole limon", "faoCode": "YTL", "scientificLabel": "Seriola rivoliana", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499465700#0.0902433863375336", @@ -13909,7 +13909,7 @@ "sexLabel": "Indéterminé", "species": { "code": "312", - "label": "Comète maquereau ", + "label": "Comète maquereau", "faoCode": "MSD", "scientificLabel": "Decapterus macarellus", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499465700#0.0902433863375336", @@ -13969,7 +13969,7 @@ "sexLabel": "Indéterminé", "species": { "code": "312", - "label": "Comète maquereau ", + "label": "Comète maquereau", "faoCode": "MSD", "scientificLabel": "Decapterus macarellus", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499465700#0.0902433863375336", @@ -14389,7 +14389,7 @@ "sexLabel": "Indéterminé", "species": { "code": "367", - "label": "Carangue paia ", + "label": "Carangue paia", "faoCode": "URU", "scientificLabel": "Uraspis uraspis", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499465700#0.0902433863375336", @@ -14749,7 +14749,7 @@ "sexLabel": "Indéterminé", "species": { "code": "315", - "label": "Carangue des îles ", + "label": "Carangue des îles", "faoCode": "NGT", "scientificLabel": "Carangoides orthogrammus", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499465700#0.0902433863375336", @@ -15049,7 +15049,7 @@ "sexLabel": "Indéterminé", "species": { "code": "345", - "label": "Compère océanique ", + "label": "Compère océanique", "faoCode": "LGH", "scientificLabel": "Lagocephalus lagocephalus", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", @@ -15109,7 +15109,7 @@ "sexLabel": "Indéterminé", "species": { "code": "345", - "label": "Compère océanique ", + "label": "Compère océanique", "faoCode": "LGH", "scientificLabel": "Lagocephalus lagocephalus", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", @@ -15289,7 +15289,7 @@ "sexLabel": "Indéterminé", "species": { "code": "346", - "label": "Croupia roche ", + "label": "Croupia roche", "faoCode": "LOB", "scientificLabel": "Lobotes surinamensis", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", @@ -15409,7 +15409,7 @@ "sexLabel": "Indéterminé", "species": { "code": "346", - "label": "Croupia roche ", + "label": "Croupia roche", "faoCode": "LOB", "scientificLabel": "Lobotes surinamensis", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", @@ -17682,7 +17682,7 @@ "sexLabel": "Indéterminé", "species": { "code": "321", - "label": "Porc-épic boubou ", + "label": "Porc-épic boubou", "faoCode": "DIY", "scientificLabel": "Diodon hystrix", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", @@ -17982,7 +17982,7 @@ "sexLabel": "Indéterminé", "species": { "code": "316", - "label": "Carangue vorace ", + "label": "Carangue vorace", "faoCode": "CXS", "scientificLabel": "Caranx sexfasciatus", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499465700#0.0902433863375336", @@ -18343,7 +18343,7 @@ "sexLabel": "Indéterminé", "species": { "code": "304", - "label": "Baliste cabri ", + "label": "Baliste cabri", "faoCode": "TRG", "scientificLabel": "Balistes carolinensis", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", @@ -18403,7 +18403,7 @@ "sexLabel": "Indéterminé", "species": { "code": "341", - "label": "Calicagère blanche ", + "label": "Calicagère blanche", "faoCode": "KYS", "scientificLabel": "Kyphosus sectatrix", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499465700#0.0902433863375336", @@ -18463,7 +18463,7 @@ "sexLabel": "Indéterminé", "species": { "code": "352", - "label": "Poules d\u0027eau ", + "label": "Poules d\u0027eau", "faoCode": "BAT", "scientificLabel": "Platax spp", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", @@ -19903,7 +19903,7 @@ "sexLabel": "Indéterminé", "species": { "code": "309", - "label": "Orphie plate ", + "label": "Orphie plate", "faoCode": "BAF", "scientificLabel": "Ablennes hians", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499465700#0.0902433863375336", @@ -19963,7 +19963,7 @@ "sexLabel": "Indéterminé", "species": { "code": "309", - "label": "Orphie plate ", + "label": "Orphie plate", "faoCode": "BAF", "scientificLabel": "Ablennes hians", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499465700#0.0902433863375336", @@ -20263,7 +20263,7 @@ "sexLabel": "Indéterminé", "species": { "code": "364", - "label": "Aiguille crocodile ", + "label": "Aiguille crocodile", "faoCode": "BTS", "scientificLabel": "Tylosurus crocodilus", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", @@ -20323,7 +20323,7 @@ "sexLabel": "Indéterminé", "species": { "code": "364", - "label": "Aiguille crocodile ", + "label": "Aiguille crocodile", "faoCode": "BTS", "scientificLabel": "Tylosurus crocodilus", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", @@ -20813,9 +20813,9 @@ "sexLabel": "Indéterminé", "species": { "code": "324", - "label": "Rémora ", + "label": "Rémora", "faoCode": "HTL", - "scientificLabel": "Phtheirichthys lineatus ", + "scientificLabel": "Phtheirichthys lineatus", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", "weightMeasureTypeId": "fr.ird.referential.common.WeightMeasureType#1239832686139#0.2", "speciesGroupId": "fr.ird.referential.common.SpeciesGroup#1239832683689#0.12092280503502995", @@ -20933,9 +20933,9 @@ "sexLabel": "Indéterminé", "species": { "code": "324", - "label": "Rémora ", + "label": "Rémora", "faoCode": "HTL", - "scientificLabel": "Phtheirichthys lineatus ", + "scientificLabel": "Phtheirichthys lineatus", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", "weightMeasureTypeId": "fr.ird.referential.common.WeightMeasureType#1239832686139#0.2", "speciesGroupId": "fr.ird.referential.common.SpeciesGroup#1239832683689#0.12092280503502995", @@ -20993,7 +20993,7 @@ "sexLabel": "Indéterminé", "species": { "code": "331", - "label": "Demi-bec volant ", + "label": "Demi-bec volant", "faoCode": "EXQ", "scientificLabel": "Euleptorhamphus velox", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", @@ -21353,7 +21353,7 @@ "sexLabel": "Indéterminé", "species": { "code": "368", - "label": "Comètes nca ", + "label": "Comètes nca", "faoCode": "SDX", "scientificLabel": "Decapterus spp", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499465700#0.0902433863375336", @@ -21413,7 +21413,7 @@ "sexLabel": "Indéterminé", "species": { "code": "368", - "label": "Comètes nca ", + "label": "Comètes nca", "faoCode": "SDX", "scientificLabel": "Decapterus spp", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499465700#0.0902433863375336", @@ -30074,7 +30074,7 @@ "sexLabel": "Indéterminé", "species": { "code": "210", - "label": "Renards de mer nca ", + "label": "Renards de mer nca", "faoCode": "THR", "scientificLabel": "Alopias spp", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", @@ -30134,7 +30134,7 @@ "sexLabel": "Indéterminé", "species": { "code": "210", - "label": "Renards de mer nca ", + "label": "Renards de mer nca", "faoCode": "THR", "scientificLabel": "Alopias spp", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", @@ -31346,7 +31346,7 @@ "sexLabel": "Indéterminé", "species": { "code": "230", - "label": "Requins-scies nca ", + "label": "Requins-scies nca", "faoCode": "PWS", "scientificLabel": "Pristiophorus spp", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", @@ -31406,7 +31406,7 @@ "sexLabel": "Indéterminé", "species": { "code": "230", - "label": "Requins-scies nca ", + "label": "Requins-scies nca", "faoCode": "PWS", "scientificLabel": "Pristiophorus spp", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", @@ -31466,7 +31466,7 @@ "sexLabel": "Indéterminé", "species": { "code": "232", - "label": "Anges de mer nca ", + "label": "Anges de mer nca", "faoCode": "ASK", "scientificLabel": "Squatinidae", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499468646#0.710986209334806", @@ -31526,7 +31526,7 @@ "sexLabel": "Indéterminé", "species": { "code": "232", - "label": "Anges de mer nca ", + "label": "Anges de mer nca", "faoCode": "ASK", "scientificLabel": "Squatinidae", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499468646#0.710986209334806", @@ -32006,7 +32006,7 @@ "sexLabel": "Indéterminé", "species": { "code": "372", - "label": "Luvar ", + "label": "Luvar", "faoCode": "LVM", "scientificLabel": "Luvarus imperialis", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499465700#0.0902433863375336", @@ -32066,7 +32066,7 @@ "sexLabel": "Indéterminé", "species": { "code": "376", - "label": "Rémora des espadons ", + "label": "Rémora des espadons", "faoCode": "REY", "scientificLabel": "Remora brachyptera", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", @@ -32126,7 +32126,7 @@ "sexLabel": "Indéterminé", "species": { "code": "375", - "label": "Rémora des marlins ", + "label": "Rémora des marlins", "faoCode": "REZ", "scientificLabel": "Remora osteochir", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", @@ -32366,9 +32366,9 @@ "sexLabel": "Indéterminé", "species": { "code": "248", - "label": "Mantes, diables de mer nca ", + "label": "Mantes, diables de mer nca", "faoCode": "MAN", - "scientificLabel": "Mobulidae ", + "scientificLabel": "Mobulidae", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499468646#0.710986209334806", "weightMeasureTypeId": "fr.ird.referential.common.WeightMeasureType#1239832686139#0.2", "speciesGroupId": "fr.ird.referential.common.SpeciesGroup#1445863056144#0.9820877553253712", @@ -35440,7 +35440,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "Alicia ", + "firstName": "Alicia", "lastName": "Moreno", "captain": false, "observer": true, @@ -35521,7 +35521,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "J. ", + "firstName": "J.", "lastName": "Quinquis", "captain": false, "observer": true, @@ -35548,7 +35548,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "Cristina ", + "firstName": "Cristina", "lastName": "Ortiz", "captain": false, "observer": true, @@ -35602,7 +35602,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "Laura ", + "firstName": "Laura", "lastName": "Quintero", "captain": false, "observer": true, @@ -35629,7 +35629,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "P. ", + "firstName": "P.", "lastName": "Ragot", "captain": false, "observer": true, @@ -35683,7 +35683,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "Susana ", + "firstName": "Susana", "lastName": "Razquin", "captain": false, "observer": true, @@ -35710,7 +35710,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "F. ", + "firstName": "F.", "lastName": "Ruchon", "captain": false, "observer": true, @@ -35737,7 +35737,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "Rafael Sánchez ", + "firstName": "Rafael Sánchez", "lastName": "Robles", "captain": false, "observer": true, @@ -35791,7 +35791,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "Miriam ", + "firstName": "Miriam", "lastName": "Rodriguez", "captain": false, "observer": true, @@ -35818,7 +35818,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "V. ", + "firstName": "V.", "lastName": "Rigolet", "captain": false, "observer": true, @@ -35953,7 +35953,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "Sonia ", + "firstName": "Sonia", "lastName": "Vega", "captain": false, "observer": true, @@ -35980,7 +35980,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "Eva Mº del Rio ", + "firstName": "Eva Mº del Rio", "lastName": "Zarraga", "captain": false, "observer": true, @@ -36007,7 +36007,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "Virgilia ", + "firstName": "Virgilia", "lastName": "Yance", "captain": false, "observer": true, @@ -36061,7 +36061,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "Razquin ", + "firstName": "Razquin", "lastName": "Urdiain", "captain": false, "observer": true, @@ -36088,7 +36088,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "T. ", + "firstName": "T.", "lastName": "Vanhoutte", "captain": false, "observer": true, @@ -38410,7 +38410,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "David ", + "firstName": "David", "lastName": "Acuña", "captain": false, "observer": true, @@ -38437,7 +38437,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "Patricia ", + "firstName": "Patricia", "lastName": "Arbona", "captain": false, "observer": true, @@ -38518,7 +38518,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "Beatriz ", + "firstName": "Beatriz", "lastName": "Bastos", "captain": false, "observer": true, @@ -38599,7 +38599,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "Mª Carmen ", + "firstName": "Mª Carmen", "lastName": "Arenas", "captain": false, "observer": true, @@ -38653,7 +38653,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "Raquel ", + "firstName": "Raquel", "lastName": "Bello", "captain": false, "observer": true, @@ -38680,7 +38680,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "P. ", + "firstName": "P.", "lastName": "Corler", "captain": false, "observer": true, @@ -38707,7 +38707,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "Rosa ", + "firstName": "Rosa", "lastName": "Delgado de Molina Acevedo", "captain": false, "observer": true, @@ -38761,7 +38761,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "Alejandro ", + "firstName": "Alejandro", "lastName": "Cruz Reyes", "captain": false, "observer": true, @@ -38788,7 +38788,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "Mª Jose Bayarri ", + "firstName": "Mª Jose Bayarri", "lastName": "Clariana", "captain": false, "observer": true, @@ -38815,7 +38815,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "Eugenia Pia ", + "firstName": "Eugenia Pia", "lastName": "Fernández", "captain": false, "observer": true, @@ -38842,7 +38842,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "E. ", + "firstName": "E.", "lastName": "Devaux", "captain": false, "observer": true, @@ -38896,7 +38896,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "Carmen ", + "firstName": "Carmen", "lastName": "Gutierrez", "captain": false, "observer": true, @@ -38923,7 +38923,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "Ricardo ", + "firstName": "Ricardo", "lastName": "Iglesias", "captain": false, "observer": true, @@ -38950,7 +38950,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "Rut ", + "firstName": "Rut", "lastName": "Hernández", "captain": false, "observer": true, @@ -38977,7 +38977,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "Celso A. ", + "firstName": "Celso A.", "lastName": "Hernández Díaz", "captain": false, "observer": true, @@ -39004,7 +39004,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "Alfonso ", + "firstName": "Alfonso", "lastName": "Gonzalez", "captain": false, "observer": true, @@ -39085,7 +39085,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "Raquel ", + "firstName": "Raquel", "lastName": "Maestre", "captain": false, "observer": true, @@ -39112,7 +39112,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "Ph. ", + "firstName": "Ph.", "lastName": "Le Niliot", "captain": false, "observer": true, @@ -39139,7 +39139,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "Iñigo ", + "firstName": "Iñigo", "lastName": "Labarga", "captain": false, "observer": true, @@ -39166,7 +39166,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "C. ", + "firstName": "C.", "lastName": "Labaisse", "captain": false, "observer": true, @@ -39193,7 +39193,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "Noemí ", + "firstName": "Noemí", "lastName": "Martinez", "captain": false, "observer": true, @@ -39247,7 +39247,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "Laura Entrambasaguas ", + "firstName": "Laura Entrambasaguas", "lastName": "Monsell", "captain": false, "observer": true, @@ -43653,7 +43653,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": " Benoit", + "firstName": "Benoit", "lastName": "Dumeau ", "captain": false, "observer": true, @@ -44220,7 +44220,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "Damenéko Jean-Marc ", + "firstName": "Damenéko Jean-Marc", "lastName": "Zouhoury", "captain": false, "observer": true, @@ -48216,7 +48216,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.common.PersonReference", "content": { - "firstName": "Zegbehi Magloire ", + "firstName": "Zegbehi Magloire", "lastName": "Gnadou", "captain": false, "observer": false, @@ -56754,7 +56754,7 @@ "type": "fr.ird.observe.dto.referential.common.SpeciesReference", "content": { "code": "210", - "label": "Renards de mer nca ", + "label": "Renards de mer nca", "faoCode": "THR", "scientificLabel": "Alopias spp", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", @@ -56940,13 +56940,13 @@ }, { "fieldName": "uri", - "scope": "WARNING", - "message": "Le champ n\u0027est pas renseigné." + "scope": "ERROR", + "message": "Le champ (s\u0027il est renseigné) ne doit pas être consituté que d\u0027espaces." }, { "fieldName": "uri", - "scope": "ERROR", - "message": "Le champ (s\u0027il est renseigné) ne doit pas être consituté que d\u0027espaces." + "scope": "WARNING", + "message": "Le champ n\u0027est pas renseigné." }, { "fieldName": "wormsId", @@ -57520,7 +57520,7 @@ "type": "fr.ird.observe.dto.referential.common.SpeciesReference", "content": { "code": "230", - "label": "Requins-scies nca ", + "label": "Requins-scies nca", "faoCode": "PWS", "scientificLabel": "Pristiophorus spp", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", @@ -57594,7 +57594,7 @@ "type": "fr.ird.observe.dto.referential.common.SpeciesReference", "content": { "code": "232", - "label": "Anges de mer nca ", + "label": "Anges de mer nca", "faoCode": "ASK", "scientificLabel": "Squatinidae", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499468646#0.710986209334806", @@ -58217,7 +58217,7 @@ "type": "fr.ird.observe.dto.referential.common.SpeciesReference", "content": { "code": "304", - "label": "Baliste cabri ", + "label": "Baliste cabri", "faoCode": "TRG", "scientificLabel": "Balistes carolinensis", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", @@ -58402,7 +58402,7 @@ "type": "fr.ird.observe.dto.referential.common.SpeciesReference", "content": { "code": "309", - "label": "Orphie plate ", + "label": "Orphie plate", "faoCode": "BAF", "scientificLabel": "Ablennes hians", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499465700#0.0902433863375336", @@ -58518,7 +58518,7 @@ "type": "fr.ird.observe.dto.referential.common.SpeciesReference", "content": { "code": "312", - "label": "Comète maquereau ", + "label": "Comète maquereau", "faoCode": "MSD", "scientificLabel": "Decapterus macarellus", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499465700#0.0902433863375336", @@ -58629,7 +58629,7 @@ "type": "fr.ird.observe.dto.referential.common.SpeciesReference", "content": { "code": "315", - "label": "Carangue des îles ", + "label": "Carangue des îles", "faoCode": "NGT", "scientificLabel": "Carangoides orthogrammus", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499465700#0.0902433863375336", @@ -58666,7 +58666,7 @@ "type": "fr.ird.observe.dto.referential.common.SpeciesReference", "content": { "code": "316", - "label": "Carangue vorace ", + "label": "Carangue vorace", "faoCode": "CXS", "scientificLabel": "Caranx sexfasciatus", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499465700#0.0902433863375336", @@ -58851,7 +58851,7 @@ "type": "fr.ird.observe.dto.referential.common.SpeciesReference", "content": { "code": "321", - "label": "Porc-épic boubou ", + "label": "Porc-épic boubou", "faoCode": "DIY", "scientificLabel": "Diodon hystrix", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", @@ -58962,9 +58962,9 @@ "type": "fr.ird.observe.dto.referential.common.SpeciesReference", "content": { "code": "324", - "label": "Rémora ", + "label": "Rémora", "faoCode": "HTL", - "scientificLabel": "Phtheirichthys lineatus ", + "scientificLabel": "Phtheirichthys lineatus", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", "weightMeasureTypeId": "fr.ird.referential.common.WeightMeasureType#1239832686139#0.2", "speciesGroupId": "fr.ird.referential.common.SpeciesGroup#1239832683689#0.12092280503502995", @@ -59221,7 +59221,7 @@ "type": "fr.ird.observe.dto.referential.common.SpeciesReference", "content": { "code": "331", - "label": "Demi-bec volant ", + "label": "Demi-bec volant", "faoCode": "EXQ", "scientificLabel": "Euleptorhamphus velox", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", @@ -59332,7 +59332,7 @@ "type": "fr.ird.observe.dto.referential.common.SpeciesReference", "content": { "code": "334", - "label": "Kyphosus calicagères nca ", + "label": "Kyphosus calicagères nca", "faoCode": "KYP", "scientificLabel": "Kyphosus spp", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499465700#0.0902433863375336", @@ -59564,7 +59564,7 @@ "type": "fr.ird.observe.dto.referential.common.SpeciesReference", "content": { "code": "340", - "label": "Calicagère bleue ", + "label": "Calicagère bleue", "faoCode": "KYC", "scientificLabel": "Kyphosus cinerascens", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499465700#0.0902433863375336", @@ -59601,7 +59601,7 @@ "type": "fr.ird.observe.dto.referential.common.SpeciesReference", "content": { "code": "341", - "label": "Calicagère blanche ", + "label": "Calicagère blanche", "faoCode": "KYS", "scientificLabel": "Kyphosus sectatrix", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499465700#0.0902433863375336", @@ -59764,7 +59764,7 @@ "type": "fr.ird.observe.dto.referential.common.SpeciesReference", "content": { "code": "345", - "label": "Compère océanique ", + "label": "Compère océanique", "faoCode": "LGH", "scientificLabel": "Lagocephalus lagocephalus", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", @@ -59801,7 +59801,7 @@ "type": "fr.ird.observe.dto.referential.common.SpeciesReference", "content": { "code": "346", - "label": "Croupia roche ", + "label": "Croupia roche", "faoCode": "LOB", "scientificLabel": "Lobotes surinamensis", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", @@ -59949,7 +59949,7 @@ "type": "fr.ird.observe.dto.referential.common.SpeciesReference", "content": { "code": "350", - "label": "Poissons marins nca ", + "label": "Poissons marins nca", "faoCode": "MZZ", "scientificLabel": "Osteichthyes", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1464000000000#99", @@ -60028,7 +60028,7 @@ "type": "fr.ird.observe.dto.referential.common.SpeciesReference", "content": { "code": "352", - "label": "Poules d\u0027eau ", + "label": "Poules d\u0027eau", "faoCode": "BAT", "scientificLabel": "Platax spp", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", @@ -60292,7 +60292,7 @@ "type": "fr.ird.observe.dto.referential.common.SpeciesReference", "content": { "code": "359", - "label": "Sériole limon ", + "label": "Sériole limon", "faoCode": "YTL", "scientificLabel": "Seriola rivoliana", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499465700#0.0902433863375336", @@ -60482,7 +60482,7 @@ "type": "fr.ird.observe.dto.referential.common.SpeciesReference", "content": { "code": "364", - "label": "Aiguille crocodile ", + "label": "Aiguille crocodile", "faoCode": "BTS", "scientificLabel": "Tylosurus crocodilus", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", @@ -62686,7 +62686,7 @@ "type": "fr.ird.observe.dto.referential.common.SpeciesReference", "content": { "code": "0", - "label": "Thon rouge de l\u0027Atlantique ", + "label": "Thon rouge de l\u0027Atlantique", "faoCode": "BFT", "scientificLabel": "Thunnus thynnus", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499465700#0.0902433863375336", @@ -62719,9 +62719,9 @@ "type": "fr.ird.observe.dto.referential.common.SpeciesReference", "content": { "code": "0", - "label": "Mobula coilloti ", + "label": "Mobula coilloti", "faoCode": "RMC", - "scientificLabel": "Mobula coilloti ", + "scientificLabel": "Mobula coilloti", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499468646#0.710986209334806", "weightMeasureTypeId": "fr.ird.referential.common.WeightMeasureType#1239832686139#0.2", "speciesGroupId": "fr.ird.referential.common.SpeciesGroup#1445863056144#0.9820877553253712", @@ -62791,13 +62791,13 @@ }, { "fieldName": "uri", - "scope": "WARNING", - "message": "Le champ n\u0027est pas renseigné." + "scope": "ERROR", + "message": "Le champ (s\u0027il est renseigné) ne doit pas être consituté que d\u0027espaces." }, { "fieldName": "uri", - "scope": "ERROR", - "message": "Le champ (s\u0027il est renseigné) ne doit pas être consituté que d\u0027espaces." + "scope": "WARNING", + "message": "Le champ n\u0027est pas renseigné." }, { "fieldName": "wormsId", @@ -62811,9 +62811,9 @@ "type": "fr.ird.observe.dto.referential.common.SpeciesReference", "content": { "code": "0", - "label": "Sergent-major ", + "label": "Sergent-major", "faoCode": "ABU", - "scientificLabel": "Abudefduf saxatilis ", + "scientificLabel": "Abudefduf saxatilis", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", "weightMeasureTypeId": "fr.ird.referential.common.WeightMeasureType#1239832686139#0.2", "speciesGroupId": "fr.ird.referential.common.SpeciesGroup#1239832683689#0.12092280503502995", @@ -62850,7 +62850,7 @@ "code": "0", "label": "Famille Clupeidae", "faoCode": "CLP", - "scientificLabel": "Clupeidae ", + "scientificLabel": "Clupeidae", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", "weightMeasureTypeId": "fr.ird.referential.common.WeightMeasureType#1239832686139#0.2", "speciesGroupId": "fr.ird.referential.common.SpeciesGroup#1239832683689#0.12092280503502995", @@ -62916,7 +62916,7 @@ "type": "fr.ird.observe.dto.referential.common.SpeciesReference", "content": { "code": "0", - "label": "Rémora commun ", + "label": "Rémora commun", "faoCode": "EHN", "scientificLabel": "Echeneis naucrates", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", @@ -62994,9 +62994,9 @@ "type": "fr.ird.observe.dto.referential.common.SpeciesReference", "content": { "code": "0", - "label": "Oreosoma atlanticum ", + "label": "Oreosoma atlanticum", "faoCode": "OOT", - "scientificLabel": "Oreosoma atlanticum ", + "scientificLabel": "Oreosoma atlanticum", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", "weightMeasureTypeId": "fr.ird.referential.common.WeightMeasureType#1239832686139#0.2", "speciesGroupId": "fr.ird.referential.common.SpeciesGroup#1239832683689#0.12092280503502995", @@ -63241,13 +63241,13 @@ "messages": [ { "fieldName": "uri", - "scope": "WARNING", - "message": "Le champ n\u0027est pas renseigné." + "scope": "ERROR", + "message": "Le champ (s\u0027il est renseigné) ne doit pas être consituté que d\u0027espaces." }, { "fieldName": "uri", - "scope": "ERROR", - "message": "Le champ (s\u0027il est renseigné) ne doit pas être consituté que d\u0027espaces." + "scope": "WARNING", + "message": "Le champ n\u0027est pas renseigné." }, { "fieldName": "wormsId", @@ -66923,7 +66923,7 @@ "type": "fr.ird.observe.dto.referential.common.SpeciesReference", "content": { "code": "111", - "label": "Makaire bleu indo-pacifique ", + "label": "Makaire bleu indo-pacifique", "faoCode": "1BUM", "scientificLabel": "Makaira mazara", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499467326#0.537910396233201", @@ -67076,9 +67076,9 @@ "type": "fr.ird.observe.dto.referential.common.SpeciesReference", "content": { "code": "248", - "label": "Mantes, diables de mer nca ", + "label": "Mantes, diables de mer nca", "faoCode": "MAN", - "scientificLabel": "Mobulidae ", + "scientificLabel": "Mobulidae", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499468646#0.710986209334806", "weightMeasureTypeId": "fr.ird.referential.common.WeightMeasureType#1239832686139#0.2", "speciesGroupId": "fr.ird.referential.common.SpeciesGroup#1445863056144#0.9820877553253712", @@ -67155,7 +67155,7 @@ "type": "fr.ird.observe.dto.referential.common.SpeciesReference", "content": { "code": "250", - "label": "Torpilles, raies électriq. nca ", + "label": "Torpilles, raies électriq. nca", "faoCode": "TOD", "scientificLabel": "Torpedinidae", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499468646#0.710986209334806", @@ -67188,7 +67188,7 @@ "type": "fr.ird.observe.dto.referential.common.SpeciesReference", "content": { "code": "367", - "label": "Carangue paia ", + "label": "Carangue paia", "faoCode": "URU", "scientificLabel": "Uraspis uraspis", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499465700#0.0902433863375336", @@ -67225,7 +67225,7 @@ "type": "fr.ird.observe.dto.referential.common.SpeciesReference", "content": { "code": "368", - "label": "Comètes nca ", + "label": "Comètes nca", "faoCode": "SDX", "scientificLabel": "Decapterus spp", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499465700#0.0902433863375336", @@ -67373,7 +67373,7 @@ "type": "fr.ird.observe.dto.referential.common.SpeciesReference", "content": { "code": "372", - "label": "Luvar ", + "label": "Luvar", "faoCode": "LVM", "scientificLabel": "Luvarus imperialis", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499465700#0.0902433863375336", @@ -67494,7 +67494,7 @@ "type": "fr.ird.observe.dto.referential.common.SpeciesReference", "content": { "code": "375", - "label": "Rémora des marlins ", + "label": "Rémora des marlins", "faoCode": "REZ", "scientificLabel": "Remora osteochir", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", @@ -67531,7 +67531,7 @@ "type": "fr.ird.observe.dto.referential.common.SpeciesReference", "content": { "code": "376", - "label": "Rémora des espadons ", + "label": "Rémora des espadons", "faoCode": "REY", "scientificLabel": "Remora brachyptera", "sizeMeasureTypeId": "fr.ird.referential.common.SizeMeasureType#1433499466532#0.844473292818293", @@ -68238,17 +68238,17 @@ { "fieldName": "species", "scope": "ERROR", - "message": "Le référentiel sélectionné «SPY - Sphyrnidae - Famille Sphyrnidae» (à la position 24) est désactivé." + "message": "Le référentiel sélectionné «LKY - Lepidochelys kempii - Tortue de Kemp» (à la position 120) est désactivé." }, { "fieldName": "species", "scope": "ERROR", - "message": "Le référentiel sélectionné «LKY - Lepidochelys kempii - Tortue de Kemp» (à la position 120) est désactivé." + "message": "Le référentiel sélectionné «SPY - Sphyrnidae - Famille Sphyrnidae» (à la position 24) est désactivé." }, { "fieldName": "species", "scope": "ERROR", - "message": "Le référentiel sélectionné «1BUM - Makaira mazara - Makaire bleu indo-pacifique » (à la position 191) est désactivé." + "message": "Le référentiel sélectionné «1BUM - Makaira mazara - Makaire bleu indo-pacifique» (à la position 191) est désactivé." }, { "fieldName": "uri", @@ -68504,7 +68504,7 @@ { "fieldName": "species", "scope": "ERROR", - "message": "Le référentiel sélectionné «SPY - Sphyrnidae - Famille Sphyrnidae» (à la position 24) est désactivé." + "message": "Le référentiel sélectionné «LKY - Lepidochelys kempii - Tortue de Kemp» (à la position 120) est désactivé." }, { "fieldName": "species", @@ -68514,12 +68514,12 @@ { "fieldName": "species", "scope": "ERROR", - "message": "Le référentiel sélectionné «LKY - Lepidochelys kempii - Tortue de Kemp» (à la position 120) est désactivé." + "message": "Le référentiel sélectionné «1BUM - Makaira mazara - Makaire bleu indo-pacifique» (à la position 208) est désactivé." }, { "fieldName": "species", "scope": "ERROR", - "message": "Le référentiel sélectionné «1BUM - Makaira mazara - Makaire bleu indo-pacifique » (à la position 208) est désactivé." + "message": "Le référentiel sélectionné «SPY - Sphyrnidae - Famille Sphyrnidae» (à la position 24) est désactivé." }, { "fieldName": "uri", @@ -112051,7 +112051,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -117500,7 +117500,7 @@ "type": "fr.ird.observe.dto.referential.common.VesselReference", "content": { "code": "550", - "label": "ALACRAN ", + "label": "ALACRAN", "wellRegex": "^(1A|([1-9]{1}[B;T]{1}|(1{1}[0-9]{1}[B;T]{1}))){1}$", "vesselType": { "code": "6", @@ -118326,7 +118326,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -118419,7 +118419,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -119239,7 +119239,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -119322,7 +119322,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -119405,7 +119405,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -120093,7 +120093,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -120797,7 +120797,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -121069,7 +121069,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -123297,7 +123297,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -123857,7 +123857,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -124596,7 +124596,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -124938,7 +124938,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -128722,7 +128722,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -129240,7 +129240,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -129664,7 +129664,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -132014,7 +132014,7 @@ "type": "fr.ird.observe.dto.referential.common.VesselReference", "content": { "code": "713", - "label": "ALACRAN ", + "label": "ALACRAN", "wellRegex": "^(1A|([1-9]{1}[B;T]{1}|(1{1}[0-9]{1}[B;T]{1}))){1}$", "vesselType": { "code": "6", @@ -132889,7 +132889,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -134232,7 +134232,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -134480,7 +134480,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -134563,7 +134563,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -134738,7 +134738,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -134987,7 +134987,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -135162,7 +135162,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -136060,7 +136060,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -136226,7 +136226,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -137184,7 +137184,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -137857,7 +137857,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -137945,7 +137945,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -143082,7 +143082,7 @@ "type": "fr.ird.observe.dto.referential.common.VesselReference", "content": { "code": "842", - "label": "PANOFI PATHFINDER ", + "label": "PANOFI PATHFINDER", "wellRegex": "^(1A|([1-9]{1}[B;T]{1}|(1{1}[0-9]{1}[B;T]{1}))){1}$", "vesselType": { "code": "6", @@ -145713,7 +145713,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -148123,7 +148123,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -150347,7 +150347,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -153236,7 +153236,7 @@ "type": "fr.ird.observe.dto.referential.common.VesselReference", "content": { "code": "1014", - "label": "LE CHINOIS 2 ", + "label": "LE CHINOIS 2", "vesselType": { "code": "7", "label": "Palangrier", @@ -156190,7 +156190,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -156273,7 +156273,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -157081,7 +157081,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -159379,7 +159379,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -161228,7 +161228,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -163816,7 +163816,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -164658,7 +164658,7 @@ }, "vesselSizeCategory": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -179501,7 +179501,7 @@ "type": "fr.ird.observe.dto.referential.common.VesselSizeCategoryReference", "content": { "code": "8", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 1200 tonnes", "needComment": false, "enabled": true, @@ -179524,7 +179524,7 @@ "type": "fr.ird.observe.dto.referential.common.VesselSizeCategoryReference", "content": { "code": "10", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "1601 - 1800 tonnes", "needComment": false, "enabled": false, @@ -179575,7 +179575,7 @@ "type": "fr.ird.observe.dto.referential.common.VesselSizeCategoryReference", "content": { "code": "11", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "1801 - 2000 tonnes", "needComment": false, "enabled": false, @@ -179603,7 +179603,7 @@ "type": "fr.ird.observe.dto.referential.common.VesselSizeCategoryReference", "content": { "code": "12", - "gaugeLabel": " + 2300 TX", + "gaugeLabel": "+ 2300 TX", "capacityLabel": "\u003e 2000 tonnes", "needComment": false, "enabled": false, @@ -186793,7 +186793,7 @@ "reference": { "type": "fr.ird.observe.dto.referential.ll.landing.CompanyReference", "content": { - "code": "OCEAN ", + "code": "OCEAN", "label": "[type: Unknown] OCEAN LONG LINERS LTD [id:n/a]", "needComment": false, "enabled": true, @@ -196042,7 +196042,7 @@ "type": "fr.ird.observe.dto.referential.ps.common.ReasonForNoFishingReference", "content": { "code": "14", - "label": "Règlementation (absence de licence, moratoire, etc) ", + "label": "Règlementation (absence de licence, moratoire, etc)", "needComment": false, "enabled": true, "id": "fr.ird.referential.ps.common.ReasonForNoFishing#1561013070351#0.6641824426682489", @@ -196593,6 +196593,7 @@ "code": "1", "label": "Echappe du filet (pour requin-baleine et cétacés)", "discard": true, + "weightRangeAllowed": false, "needComment": false, "enabled": true, "id": "fr.ird.referential.ps.common.SpeciesFate#1239832683618#0.06155887805368032", @@ -196626,6 +196627,7 @@ "code": "3", "label": "Sortie mort du filet (pour requin-baleine et cétacés)", "discard": true, + "weightRangeAllowed": false, "needComment": false, "enabled": true, "id": "fr.ird.referential.ps.common.SpeciesFate#1239832683619#0.11883784875534997", @@ -196659,6 +196661,7 @@ "code": "4", "label": "Rejeté vivant", "discard": true, + "weightRangeAllowed": false, "needComment": false, "enabled": true, "id": "fr.ird.referential.ps.common.SpeciesFate#1239832683619#0.5308862132841506", @@ -196682,6 +196685,7 @@ "code": "6", "label": "Conservé à destination de la conserverie", "discard": false, + "weightRangeAllowed": true, "needComment": false, "enabled": true, "id": "fr.ird.referential.ps.common.SpeciesFate#1239832683619#0.5722739932065866", @@ -196710,6 +196714,7 @@ "code": "5", "label": "Rejeté mort", "discard": true, + "weightRangeAllowed": true, "needComment": false, "enabled": true, "id": "fr.ird.referential.ps.common.SpeciesFate#1239832683619#0.6250731662108877", @@ -196733,6 +196738,7 @@ "code": "2", "label": "Sortie vivant du filet (pour requin-baleine et cétacés)", "discard": true, + "weightRangeAllowed": false, "needComment": false, "enabled": true, "id": "fr.ird.referential.ps.common.SpeciesFate#1239832683619#0.9931091059863436", @@ -196765,6 +196771,7 @@ "content": { "code": "7", "label": "Partiellement conservé (ex: ailerons de requin, poisson séché)", + "weightRangeAllowed": false, "needComment": false, "enabled": false, "id": "fr.ird.referential.ps.common.SpeciesFate#1239832683620#0.46609703818634485", @@ -196803,6 +196810,7 @@ "code": "8", "label": "Utilisé en cuisine du bord", "discard": false, + "weightRangeAllowed": false, "needComment": false, "enabled": true, "id": "fr.ird.referential.ps.common.SpeciesFate#1239832683621#0.6728026426066158", @@ -196835,6 +196843,7 @@ "content": { "code": "9", "label": "Autres (à préciser dans les notes)", + "weightRangeAllowed": false, "needComment": true, "enabled": true, "id": "fr.ird.referential.ps.common.SpeciesFate#1239832683621#0.9099804284263154", @@ -196868,6 +196877,7 @@ "code": "15", "label": "Conservé pour le marché local ou poisson séché/salé à bord", "discard": false, + "weightRangeAllowed": false, "needComment": false, "enabled": true, "id": "fr.ird.referential.ps.common.SpeciesFate#1464000000000#15", @@ -196895,6 +196905,7 @@ "content": { "code": "10", "label": "Ailerons seulements", + "weightRangeAllowed": false, "needComment": false, "enabled": true, "id": "fr.ird.referential.ps.common.SpeciesFate#1467372855729#0.568287924081734", @@ -196918,6 +196929,7 @@ "code": "11", "label": "Rejeté, statut non observé", "discard": true, + "weightRangeAllowed": false, "needComment": false, "enabled": true, "id": "fr.ird.referential.ps.common.SpeciesFate#1501492537510#0.9210847837998154", @@ -196941,6 +196953,7 @@ "code": "12", "label": "Conservé pour raisons scientifiques", "discard": false, + "weightRangeAllowed": false, "needComment": false, "enabled": true, "id": "fr.ird.referential.ps.common.SpeciesFate#1501492831539#0.9377232562184147", @@ -196964,6 +196977,7 @@ "code": "13", "label": "Rejeté suffocant", "discard": true, + "weightRangeAllowed": false, "needComment": false, "enabled": true, "id": "fr.ird.referential.ps.common.SpeciesFate#1544448835551#0.620629930572886", @@ -196987,6 +197001,7 @@ "code": "14", "label": "Rejeté suffocant blessé", "discard": true, + "weightRangeAllowed": false, "needComment": false, "enabled": true, "id": "fr.ird.referential.ps.common.SpeciesFate#1544448977865#0.24265421995390768", @@ -197605,7 +197620,7 @@ "type": "fr.ird.observe.dto.referential.ps.common.TransmittingBuoyTypeReference", "content": { "code": "98", - "label": "Balise inconnue ou indéterminée ", + "label": "Balise inconnue ou indéterminée", "needComment": false, "enabled": true, "id": "fr.ird.referential.ps.common.TransmittingBuoyType#1339685555050#0.2640694245556756", @@ -203767,7 +203782,7 @@ "type": "fr.ird.observe.dto.referential.ps.common.WeightCategoryReference", "content": { "code": "C-YFT-12", - "label": "YFT de 10 à 30 kg ", + "label": "YFT de 10 à 30 kg", "species": { "code": "1", "label": "Albacore, thon à nageoires jaunes", @@ -204950,7 +204965,7 @@ "type": "fr.ird.observe.dto.referential.ps.common.WeightCategoryReference", "content": { "code": "C-BET-12", - "label": "BET de 10 à 30 kg ", + "label": "BET de 10 à 30 kg", "species": { "code": "3", "label": "Patudo, thon obèse, thon gros yeux", @@ -205660,7 +205675,7 @@ "type": "fr.ird.observe.dto.referential.ps.common.WeightCategoryReference", "content": { "code": "C-ALB-12", - "label": "ALB de 10 à 30 kg ", + "label": "ALB de 10 à 30 kg", "species": { "code": "4", "label": "Germon", @@ -207542,7 +207557,7 @@ "type": "fr.ird.observe.dto.referential.ps.common.WeightCategoryReference", "content": { "code": "C-LOT-12", - "label": "LOT de 10 à 30 kg ", + "label": "LOT de 10 à 30 kg", "species": { "code": "12", "label": "Thon mignon", @@ -214167,7 +214182,7 @@ "type": "fr.ird.observe.dto.referential.ps.observation.NonTargetCatchReleasingTimeReference", "content": { "code": "I", - "label": " Relache immédiate", + "label": "Relache immédiate", "needComment": false, "enabled": true, "id": "fr.ird.referential.ps.observation.NonTargetCatchReleasingTime#0#1", @@ -214189,7 +214204,7 @@ "type": "fr.ird.observe.dto.referential.ps.observation.NonTargetCatchReleasingTimeReference", "content": { "code": "B", - "label": " Avant la salabarde suivante", + "label": "Avant la salabarde suivante", "needComment": false, "enabled": true, "id": "fr.ird.referential.ps.observation.NonTargetCatchReleasingTime#0#2", @@ -214211,7 +214226,7 @@ "type": "fr.ird.observe.dto.referential.ps.observation.NonTargetCatchReleasingTimeReference", "content": { "code": "D", - "label": " Pendant la calée", + "label": "Pendant la calée", "needComment": false, "enabled": true, "id": "fr.ird.referential.ps.observation.NonTargetCatchReleasingTime#0#3", @@ -214233,7 +214248,7 @@ "type": "fr.ird.observe.dto.referential.ps.observation.NonTargetCatchReleasingTimeReference", "content": { "code": "A", - "label": " À la fin de la calée", + "label": "À la fin de la calée", "needComment": false, "enabled": true, "id": "fr.ird.referential.ps.observation.NonTargetCatchReleasingTime#0#4", ===================================== model/src/main/models/Observe/dto/class/i18nLabels.properties ===================================== @@ -82,7 +82,7 @@ data.ps.logbook.SampleSpeciesMeasure=count,sizeClass data.ps.logbook.TransmittingBuoy=comment,code,transmittingBuoyOwnership,transmittingBuoyType,transmittingBuoyOperation,country,vessel,latitude,longitude,quadrant data.ps.logbook.WellPlan=activity,species,weight,weightCategory,well,wellSamplingConformity,wellSamplingStatus data.ps.observation.Activity=date,coordinate,observedSystem.available,observedSystem.selected,comment,comment2,currentFpaZone,dataQuality,detectionMode,ersId,floatingObjectEmpty,latitude,longitude,nextFpaZone,nonTargetCatchSpecies,observedSystem,observedSystemDistance,previousFpaZone,quadrant,reasonForNoFishing,seaSurfaceTemperature,surroundingActivity,time,vesselActivity,vesselSpeed,wind,generalTab,error.no.activity.6,measurementsTab,observedSystemTab -data.ps.observation.Catch=catchWeight,comment,informationSource,lengthMeasureMethod,meanLength,minWeight,maxWeight,meanWeight,reasonForDiscard,species,speciesFate,totalCount,weightMeasureMethod,well,catchWeightComputed.computed.tip,catchWeightComputed.observed.tip,meanLengthComputed.computed.tip,meanLengthComputed.observed.tip,meanWeightComputed.computed.tip,meanWeightComputed.observed.tip,totalCountComputed.computed.tip,totalCountComputed.observed.tip +data.ps.observation.Catch=catchWeight,comment,informationSource,lengthMeasureMethod,meanLength,minWeight,maxWeight,meanWeight,minMaxWeight,reasonForDiscard,species,speciesFate,totalCount,weightMeasureMethod,well,catchWeightComputed.computed.tip,catchWeightComputed.observed.tip,meanLengthComputed.computed.tip,meanLengthComputed.observed.tip,meanWeightComputed.computed.tip,meanWeightComputed.observed.tip,totalCountComputed.computed.tip,totalCountComputed.observed.tip data.ps.observation.FloatingObject=materialsValid,objectOperation,supportVesselName,country,vessel,computedBiodegradable,computedNonEntangling,computedSimplifiedObjectType,computedValues,generalTab,buoysTab,materialsTab,notComputed,type.short data.ps.observation.NonTargetCatchRelease=comment,conformity,count,length,lengthMeasureMethod,releasingTime,sex,status,species,speciesGroupReleaseMode,message.cantAdd data.ps.observation.ObjectObservedSpecies=count,species,speciesStatus ===================================== model/src/main/models/Observe/dto/class/i18nOverrideLabels.properties ===================================== @@ -23,7 +23,7 @@ data.ll.common.Trip=species data.ll.landing.Landing=vessel data.ps.localmarket.Sample=well data.ps.logbook.Catch=weightMeasureMethod.validation.required -data.ps.observation.Catch=minWeight,maxWeight,weightMeasureMethod +data.ps.observation.Catch=minWeight,maxWeight,minMaxWeight,weightMeasureMethod data.ps.observation.SchoolEstimate=species data.ps.observation.Set=startTime,haulingStartTimeStamp,haulingEndTimeStamp,endTimeStamp referential.common.Species=codeAndHomeId ===================================== toolkit/api/src/main/java/fr/ird/observe/dto/StringCleaner.java ===================================== @@ -0,0 +1,82 @@ +package fr.ird.observe.dto; + +/*- + * #%L + * ObServe Toolkit :: API + * %% + * Copyright (C) 2008 - 2022 IRD, Ultreia.io + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + +import java.util.function.Function; + +/** + * Object to clean a string related to a database field. + * <p> + * Created on 12/11/2022. + * + * @author Tony Chemit - dev@tchemit.fr + * @since 9.017 + */ +public class StringCleaner implements Function<String, String> { + + public static final StringCleaner ALL = new StringCleaner(true, true, true); + public static final StringCleaner REMOVE_SINGLE_QUOTE_AND_TRIM = new StringCleaner(true, true, false); + public static final StringCleaner TRIM_AND_REPLACE_EMPTY_BY_NULL = new StringCleaner(false, true, true); + public static final StringCleaner TRIM = new StringCleaner(false, true, false); + + /** + * To remove any single quote in given string. + */ + private final boolean removeSingleQuote; + /** + * To perform a trim on given string. + */ + private final boolean trim; + /** + * To replace the given string value by null if it is empty. + */ + private final boolean replaceEmptyByNull; + + public StringCleaner(boolean removeSingleQuote, boolean trim, boolean replaceEmptyByNull) { + this.removeSingleQuote = removeSingleQuote; + this.trim = trim; + this.replaceEmptyByNull = replaceEmptyByNull; + } + + public static String removeSingleQuote(String string) { + return string.replaceAll("'", ""); + } + + @Override + public String apply(String string) { + if (string == null) { + return null; + } + String result = string; + if (removeSingleQuote) { + result = removeSingleQuote(result); + } + if (trim) { + result = result.trim(); + } + if (replaceEmptyByNull && result.isEmpty()) { + result = null; + } + return result; + } +} ===================================== toolkit/api/src/main/java/fr/ird/observe/persistence/SqlHelper.java ===================================== @@ -64,7 +64,21 @@ public class SqlHelper { if (trim.length() > maxLength) { trim = trim.substring(0, maxLength - 1); } - return "'" + trim.replaceAll("'", "''") + "'"; + return "'" + escapeSingleQuote(trim) + "'"; } + public static String escapeSingleQuote(String string) { + return string.replaceAll("'", "''"); + } + + public static String escapeString(String string) { + if (string == null) { + return "NULL"; + } + String trim = string.trim(); + if (trim.isEmpty()) { + return "NULL"; + } + return "'" + escapeSingleQuote(trim) + "'"; + } } ===================================== toolkit/persistence/src/main/java/fr/ird/observe/spi/context/DataDtoEntityContext.java ===================================== @@ -35,6 +35,7 @@ import fr.ird.observe.dto.referential.ReferentialLocale; import fr.ird.observe.entities.Entity; import fr.ird.observe.entities.data.DataEntity; import fr.ird.observe.entities.data.DataFileAware; +import fr.ird.observe.persistence.SqlHelper; import fr.ird.observe.persistence.request.DeleteRequest; import fr.ird.observe.spi.service.ServiceContext; import fr.ird.observe.spi.usage.UsageHelper; @@ -78,14 +79,7 @@ public abstract class DataDtoEntityContext< } public static String toId(Entity entity) { - return entity == null ? "NULL" : escapeString(entity.getTopiaId()); - } - - public static String escapeString(String string) { - if (string == null) { - return "NULL"; - } - return "'" + string.trim() + "'"; + return entity == null ? "NULL" : SqlHelper.escapeString(entity.getTopiaId()); } public static Blob byteArrayToBlob(byte[] bytes) { View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/a6c294ab0136e38013cd9d452... -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/a6c294ab0136e38013cd9d452... You're receiving this email because of your account on gitlab.com.
participants (1)
-
Tony CHEMIT (@tchemit)