Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 390689d4 by Tony Chemit at 2024-09-11T18:11:46+02:00 Add sampleReferences field in Catch model - - - - - 878280e6 by Tony Chemit at 2024-09-11T18:19:56+02:00 Add common I18n for sampleReferences - - - - - 503f9833 by Tony Chemit at 2024-09-11T18:19:56+02:00 Add persistence migration - - - - - 97063916 by Tony Chemit at 2024-09-11T18:19:57+02:00 Update generated model - - - - - 8d22b292 by Tony Chemit at 2024-09-11T18:19:57+02:00 Update generated validation - - - - - 39943d7d by Tony Chemit at 2024-09-11T18:21:12+02:00 Merge branch 'feature/feature/issue-2909' into develop LL observations/captures : ajout de champs Reférence Échantillon - Closes #2909 - - - - - 30 changed files: - core/api/dto-decoration/src/main/i18n/getters/labels.getter - core/api/dto-decoration/src/main/resources/META-INF/i18n/Observe-labels.properties - core/api/dto/src/main/java/fr/ird/observe/dto/ObserveI18nLabelsBuilder.java - core/api/validation/src/main/filtered-resources/META-INF/validation/model-default.json - core/api/validation/src/main/filtered-resources/META-INF/validation/model-xwork2.json - core/api/validation/src/main/i18n/getters/eugene.getter - core/api/validation/src/main/resources/fr/ird/observe/dto/data/ll/observation/CatchDto-create-error-validation.json - core/api/validation/src/main/resources/fr/ird/observe/dto/data/ll/observation/CatchDto-create-error-validation.xml - core/api/validation/src/main/resources/fr/ird/observe/dto/data/ll/observation/CatchDto-update-error-validation.json - core/api/validation/src/main/resources/fr/ird/observe/dto/data/ll/observation/CatchDto-update-error-validation.xml - core/persistence/java/src/main/resources/META-INF/persistence/Observe/TopiaEntitySqlCopyPlanModel.json - core/persistence/java/src/main/resources/META-INF/persistence/Observe/TopiaEntitySqlModel.json - core/persistence/java/src/main/resources/META-INF/persistence/Observe/TopiaEntitySqlReplicatePlanModel.json - core/persistence/java/src/main/resources/fr/ird/observe/entities/data/ll/observation/CatchImpl.hbm.xml - core/persistence/migration/src/main/java/fr/ird/observe/spi/migration/v9/DataSourceMigrationForVersion_9_4.java - + core/persistence/migration/src/main/resources/db/migration/v9/9.4/02_issue-2909-common.sql - core/persistence/migration/src/main/resources/db/migration/v9/9.4/empty-schema-H2.sql - core/persistence/migration/src/main/resources/db/migration/v9/9.4/empty-schema-PG.sql - core/persistence/resources/src/main/resources/fr/ird/observe/entities/data/ll/observation/Catch/definition.json - core/persistence/resources/src/main/resources/fr/ird/observe/entities/data/ll/observation/Catch/validation-create.json - core/persistence/resources/src/main/resources/fr/ird/observe/entities/data/ll/observation/Catch/validation-update.json - 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 - model/src/main/models/Observe/dto/30-data-ll-observation.model - model/src/main/models/Observe/dto/attribute/notBlank.properties - model/src/main/models/Observe/dto/attribute/stringMaxLength.properties - model/src/main/models/Observe/dto/class/i18nLabels.properties - model/src/main/models/Observe/persistence/30-data-ll-observation.model - model/src/main/models/Observe/persistence/attribute/length.properties Changes: ===================================== core/api/dto-decoration/src/main/i18n/getters/labels.getter ===================================== @@ -289,6 +289,7 @@ observe.Common.relatedObservedActivity observe.Common.reportsUrl observe.Common.root.list.message.none observe.Common.sampleQuality +observe.Common.sampleReferences observe.Common.sampleSpeciesMeasure observe.Common.sampleType observe.Common.saveFile.overwrite ===================================== core/api/dto-decoration/src/main/resources/META-INF/i18n/Observe-labels.properties ===================================== @@ -20,7 +20,7 @@ # #L% ### #Generated by org.nuiton.i18n.plugin.GenerateI18nLabelsMojo -#Tue Aug 27 18:04:46 CEST 2024 +#Wed Sep 11 18:08:07 CEST 2024 observe.Business.createDate=observe.Common.createDate observe.Business.homeId=observe.Common.homeId observe.Business.id=observe.Common.id @@ -783,6 +783,7 @@ observe.data.ll.observation.Catch.photoReferences=observe.Common.photoReferences observe.data.ll.observation.Catch.predator=observe.Common.predator observe.data.ll.observation.Catch.predator.available=observe.Common.predator.available observe.data.ll.observation.Catch.predator.selected=observe.Common.predator.selected +observe.data.ll.observation.Catch.sampleReferences=observe.Common.sampleReferences observe.data.ll.observation.Catch.section=observe.Common.section observe.data.ll.observation.Catch.section.short=observe.Common.section.short observe.data.ll.observation.Catch.sex=observe.Common.sex ===================================== core/api/dto/src/main/java/fr/ird/observe/dto/ObserveI18nLabelsBuilder.java ===================================== @@ -112,7 +112,7 @@ import static io.ultreia.java4all.i18n.I18n.n; "objectOperation", "observationsComment", "observationsDataEntryOperator", "observationsDataQuality", "observedSystem", "observedSystem.available", "observedSystem.selected", "observedSystemDistance", "observer", "ocean", "ocean.available", "ocean.selected", - "onBoardProcessing", "origin", "otherTab", "packaging", "packaging.short", "photoReferences", "predator", "predator.available", "predator.selected", "processingCompany", + "onBoardProcessing", "origin", "otherTab", "packaging", "packaging.short", "photoReferences", "sampleReferences", "predator", "predator.available", "predator.selected", "processingCompany", "program", "proportion", "proportion.short", "proportionSum", "psSampler.available", "psSampler.selected", "quadrant", "quadrantOriginal", "reasonForNoFishing", "reasonForNullSet", "relatedObservedActivity", "reportsUrl", "root.list.message.none", "sampleQuality", "sampleSpeciesMeasure", "sampleType", "saveFile.overwrite", "saveFile.overwrite.cancel", "saveFile.overwrite.ok", "saveFile.overwrite.title", "schoolType", "seaSurfaceTemperature", "second.buoy", "section", "section.short", "sensorBrand", "sensorBrand.short", "sensorDataFormat", "sensorDataFormat.short", "sensorSerialNo", "sensorSerialNo.short", "sensorType", "sensorType.short", "serialNo", "serialNo.short", "settingEndLatitude", "settingEndLongitude", "settingEndQuadrant", ===================================== core/api/validation/src/main/filtered-resources/META-INF/validation/model-default.json ===================================== @@ -2856,6 +2856,10 @@ "predator": [ "check if referential predator is disabled (only if validation is strong)" ], + "sampleReferences": [ + "sampleReferences (if not null) is not a blank string", + "sampleReferences length <= 255" + ], "sex": [ "check if referential sex is disabled (only if validation is strong)" ], @@ -2966,6 +2970,10 @@ "predator": [ "check if referential predator is disabled (only if validation is strong)" ], + "sampleReferences": [ + "sampleReferences (if not null) is not a blank string", + "sampleReferences length <= 255" + ], "sex": [ "check if referential sex is disabled (only if validation is strong)" ], ===================================== core/api/validation/src/main/filtered-resources/META-INF/validation/model-xwork2.json ===================================== @@ -2856,6 +2856,10 @@ "predator": [ "check if referential predator is disabled (only if validation is strong)" ], + "sampleReferences": [ + "sampleReferences (if not null) is not a blank string", + "sampleReferences length <= 255" + ], "sex": [ "check if referential sex is disabled (only if validation is strong)" ], @@ -2966,6 +2970,10 @@ "predator": [ "check if referential predator is disabled (only if validation is strong)" ], + "sampleReferences": [ + "sampleReferences (if not null) is not a blank string", + "sampleReferences length <= 255" + ], "sex": [ "check if referential sex is disabled (only if validation is strong)" ], ===================================== core/api/validation/src/main/i18n/getters/eugene.getter ===================================== @@ -144,6 +144,7 @@ observe.Common.reasonForNullSet observe.Common.relatedObservedActivity observe.Common.reportsUrl observe.Common.sampleQuality +observe.Common.sampleReferences observe.Common.sampleSpeciesMeasure observe.Common.sampleType observe.Common.schoolType ===================================== core/api/validation/src/main/resources/fr/ird/observe/dto/data/ll/observation/CatchDto-create-error-validation.json ===================================== @@ -107,6 +107,19 @@ "comment": "check if referential predator is disabled (only if validation is strong)" } ], + "sampleReferences": [ + { + "validator": "io.ultreia.java4all.validation.impl.java.validator.string.NotBlankStringFieldValidator", + "comment": "sampleReferences (if not null) is not a blank string" + }, + { + "validator": "io.ultreia.java4all.validation.impl.java.validator.string.StringMaxLength", + "comment": "sampleReferences length <= 255", + "parameters": { + "maxLength": "255" + } + } + ], "sex": [ { "validator": "fr.ird.observe.validation.validator.referential.CheckReferentialIsEnabledOnErrorScope", ===================================== core/api/validation/src/main/resources/fr/ird/observe/dto/data/ll/observation/CatchDto-create-error-validation.xml ===================================== @@ -144,6 +144,19 @@ </field-validator> </field> + <field name="sampleReferences"> + <!-- sampleReferences (if not null) is not a blank string --> + <field-validator type="notBlankString"> + <message/> + </field-validator> + + <!-- sampleReferences length <= 255 --> + <field-validator type="stringMaxLength"> + <param name="maxLength">255</param> + <message/> + </field-validator> + </field> + <field name="sex"> <!-- check if referential sex is disabled (only if validation is strong) --> <field-validator type="checkDisabledReferentialOnErrorScope"> ===================================== core/api/validation/src/main/resources/fr/ird/observe/dto/data/ll/observation/CatchDto-update-error-validation.json ===================================== @@ -107,6 +107,19 @@ "comment": "check if referential predator is disabled (only if validation is strong)" } ], + "sampleReferences": [ + { + "validator": "io.ultreia.java4all.validation.impl.java.validator.string.NotBlankStringFieldValidator", + "comment": "sampleReferences (if not null) is not a blank string" + }, + { + "validator": "io.ultreia.java4all.validation.impl.java.validator.string.StringMaxLength", + "comment": "sampleReferences length <= 255", + "parameters": { + "maxLength": "255" + } + } + ], "sex": [ { "validator": "fr.ird.observe.validation.validator.referential.CheckReferentialIsEnabledOnErrorScope", ===================================== core/api/validation/src/main/resources/fr/ird/observe/dto/data/ll/observation/CatchDto-update-error-validation.xml ===================================== @@ -144,6 +144,19 @@ </field-validator> </field> + <field name="sampleReferences"> + <!-- sampleReferences (if not null) is not a blank string --> + <field-validator type="notBlankString"> + <message/> + </field-validator> + + <!-- sampleReferences length <= 255 --> + <field-validator type="stringMaxLength"> + <param name="maxLength">255</param> + <message/> + </field-validator> + </field> + <field name="sex"> <!-- check if referential sex is disabled (only if validation is strong) --> <field-validator type="checkDisabledReferentialOnErrorScope"> ===================================== core/persistence/java/src/main/resources/META-INF/persistence/Observe/TopiaEntitySqlCopyPlanModel.json ===================================== @@ -272,7 +272,7 @@ { "gav": "ll_observation.catch", "from": "INNER JOIN ll_observation.set set ON set.topiaId = catch.set INNER JOIN ll_observation.activity activity ON activity.topiaId = set.activity WHERE activity.trip %s", - "columnNames": "topiaId,topiaCreateDate,topiaVersion,set_idx,lastUpdateDate,homeId,comment,count,totalWeight,hookWhenDiscarded,depredated,beatDiameter,gonadeWeight,photoReferences,number,acquisitionMode,tagNumber,section,basket,branchline,catchFate,discardHealthStatus,species,maturityStatus,stomachFullness,hookPosition,catchHealthStatus,sex,weightMeasureMethod,set", + "columnNames": "topiaId,topiaCreateDate,topiaVersion,set_idx,lastUpdateDate,homeId,comment,count,totalWeight,hookWhenDiscarded,depredated,beatDiameter,gonadeWeight,photoReferences,sampleReferences,number,acquisitionMode,tagNumber,section,basket,branchline,catchFate,discardHealthStatus,species,maturityStatus,stomachFullness,hookPosition,catchHealthStatus,sex,weightMeasureMethod,set", "extra-referentialShell": { "fr.ird.observe.entities.referential.ll.observation.StomachFullness": "stomachFullness", "fr.ird.observe.entities.referential.common.Species": "species", ===================================== core/persistence/java/src/main/resources/META-INF/persistence/Observe/TopiaEntitySqlModel.json ===================================== @@ -769,7 +769,7 @@ "fr.ird.observe.entities.data.ll.observation.Catch": { "table": { "gav": "fr.ird.observe.entities.data.ll.observation.Catch~ll_observation~catch", - "authorizedColumnNames": "topiaId,topiaCreateDate,topiaVersion,set_idx,lastUpdateDate,homeId,comment,count,totalWeight,hookWhenDiscarded,depredated,beatDiameter,gonadeWeight,photoReferences,number,acquisitionMode,tagNumber,section,basket,branchline,catchFate,discardHealthStatus,species,maturityStatus,stomachFullness,hookPosition,catchHealthStatus,sex,weightMeasureMethod,set", + "authorizedColumnNames": "topiaId,topiaCreateDate,topiaVersion,set_idx,lastUpdateDate,homeId,comment,count,totalWeight,hookWhenDiscarded,depredated,beatDiameter,gonadeWeight,photoReferences,sampleReferences,number,acquisitionMode,tagNumber,section,basket,branchline,catchFate,discardHealthStatus,species,maturityStatus,stomachFullness,hookPosition,catchHealthStatus,sex,weightMeasureMethod,set", "selectors": [ "ll_observation.catch catch~INNER JOIN ll_observation.set set ON set.topiaId = catch.set INNER JOIN ll_observation.activity activity ON activity.topiaId = set.activity~activity.trip" ], @@ -785,6 +785,7 @@ "lastUpdateDate": "java.sql.Timestamp", "number": "java.lang.Integer", "photoReferences": "java.lang.String", + "sampleReferences": "java.lang.String", "tagNumber": "java.lang.String", "totalWeight": "java.lang.Float" }, ===================================== core/persistence/java/src/main/resources/META-INF/persistence/Observe/TopiaEntitySqlReplicatePlanModel.json ===================================== @@ -338,7 +338,7 @@ "gav": "ll_observation.catch", "from": "INNER JOIN ll_observation.set set ON set.topiaId = catch.set WHERE set.activity %s", "parentColumnName": "set", - "columnNames": "topiaId,topiaCreateDate,topiaVersion,set_idx,lastUpdateDate,homeId,comment,count,totalWeight,hookWhenDiscarded,depredated,beatDiameter,gonadeWeight,photoReferences,number,acquisitionMode,tagNumber,section,basket,branchline,catchFate,discardHealthStatus,species,maturityStatus,stomachFullness,hookPosition,catchHealthStatus,sex,weightMeasureMethod,set", + "columnNames": "topiaId,topiaCreateDate,topiaVersion,set_idx,lastUpdateDate,homeId,comment,count,totalWeight,hookWhenDiscarded,depredated,beatDiameter,gonadeWeight,photoReferences,sampleReferences,number,acquisitionMode,tagNumber,section,basket,branchline,catchFate,discardHealthStatus,species,maturityStatus,stomachFullness,hookPosition,catchHealthStatus,sex,weightMeasureMethod,set", "columnsToReplace": "section,basket,branchline" }, { @@ -422,7 +422,7 @@ "gav": "ll_observation.catch", "from": "WHERE catch.topiaId %s", "parentColumnName": "set", - "columnNames": "topiaId,topiaCreateDate,topiaVersion,set_idx,lastUpdateDate,homeId,comment,count,totalWeight,hookWhenDiscarded,depredated,beatDiameter,gonadeWeight,photoReferences,number,acquisitionMode,tagNumber,section,basket,branchline,catchFate,discardHealthStatus,species,maturityStatus,stomachFullness,hookPosition,catchHealthStatus,sex,weightMeasureMethod,set", + "columnNames": "topiaId,topiaCreateDate,topiaVersion,set_idx,lastUpdateDate,homeId,comment,count,totalWeight,hookWhenDiscarded,depredated,beatDiameter,gonadeWeight,photoReferences,sampleReferences,number,acquisitionMode,tagNumber,section,basket,branchline,catchFate,discardHealthStatus,species,maturityStatus,stomachFullness,hookPosition,catchHealthStatus,sex,weightMeasureMethod,set", "columnsToDetach": "section~ll_observation.section,basket~ll_observation.basket,branchline~ll_observation.branchline", "entryPoint": true }, @@ -566,7 +566,7 @@ "gav": "ll_observation.catch", "from": "WHERE catch.set %s", "parentColumnName": "set", - "columnNames": "topiaId,topiaCreateDate,topiaVersion,set_idx,lastUpdateDate,homeId,comment,count,totalWeight,hookWhenDiscarded,depredated,beatDiameter,gonadeWeight,photoReferences,number,acquisitionMode,tagNumber,section,basket,branchline,catchFate,discardHealthStatus,species,maturityStatus,stomachFullness,hookPosition,catchHealthStatus,sex,weightMeasureMethod,set", + "columnNames": "topiaId,topiaCreateDate,topiaVersion,set_idx,lastUpdateDate,homeId,comment,count,totalWeight,hookWhenDiscarded,depredated,beatDiameter,gonadeWeight,photoReferences,sampleReferences,number,acquisitionMode,tagNumber,section,basket,branchline,catchFate,discardHealthStatus,species,maturityStatus,stomachFullness,hookPosition,catchHealthStatus,sex,weightMeasureMethod,set", "columnsToReplace": "section,basket,branchline" }, { ===================================== core/persistence/java/src/main/resources/fr/ird/observe/entities/data/ll/observation/CatchImpl.hbm.xml ===================================== @@ -53,6 +53,9 @@ <column name="gonadeWeight" precision="6" scale="3" sql-type="numeric"/> </property> <property name="photoReferences" access="field" type="java.lang.String" column="photoReferences"/> + <property name="sampleReferences" access="field" type="java.lang.String" length="255"> + <column length="255" name="sampleReferences"/> + </property> <property name="number" access="field" type="java.lang.Integer" column="number"/> <property name="acquisitionMode" access="field" type="int" column="acquisitionMode"/> <property name="tagNumber" access="field" type="java.lang.String" column="tagNumber"/> ===================================== core/persistence/migration/src/main/java/fr/ird/observe/spi/migration/v9/DataSourceMigrationForVersion_9_4.java ===================================== @@ -60,6 +60,8 @@ public class DataSourceMigrationForVersion_9_4 extends ByMajorMigrationVersionRe issue2914(executor); // See https://gitlab.com/ultreiaio/ird-observe/-/issues/2931 executor.addScript("01", "issue-2931"); + // See https://gitlab.com/ultreiaio/ird-observe/-/issues/2909 + executor.addScript("02", "issue-2909"); } } ===================================== core/persistence/migration/src/main/resources/db/migration/v9/9.4/02_issue-2909-common.sql ===================================== @@ -0,0 +1,22 @@ +--- +-- #%L +-- ObServe Core :: Persistence :: Migration +-- %% +-- Copyright (C) 2008 - 2024 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% +--- +ALTER TABLE ll_observation.Catch ADD COLUMN sampleReferences VARCHAR(255); ===================================== core/persistence/migration/src/main/resources/db/migration/v9/9.4/empty-schema-H2.sql ===================================== @@ -104,7 +104,7 @@ create table ll_observation.baitsComposition (topiaId varchar(255) not null, top create table ll_observation.basket (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp not null, lastUpdateDate timestamp default CURRENT_TIMESTAMP not null, homeId varchar(255), settingIdentifier integer not null, haulingIdentifier integer, floatline1Length numeric, floatline2Length numeric, section varchar(255) not null, primary key (topiaId)); create table ll_observation.branchline (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp not null, lastUpdateDate timestamp default CURRENT_TIMESTAMP not null, homeId varchar(255), comment varchar(8192), settingIdentifier integer not null, haulingIdentifier integer, depthRecorder boolean default false not null, timer boolean default false not null, timeSinceContact integer, hookOffset integer, branchlineLength numeric, weightedSwivel boolean default false not null, timerTimeOnBoard timestamp, weightedSnap boolean default false not null, swivelWeight numeric, snapWeight numeric, tracelineLength numeric, hookLost boolean default false not null, traceCutOff boolean default false not null, hookType varchar(255), baitType varchar(255), topType varchar(255), tracelineType varchar(255), baitSettingStatus varchar(255), baitHaulingStatus varchar(255), hookSize varchar(255), basket varchar(255) not null, primary key (topiaId)); create table ll_observation.branchlinesComposition (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp not null, lastUpdateDate timestamp default CURRENT_TIMESTAMP not null, homeId varchar(255), length numeric not null, proportion integer not null, tracelineLength numeric, topType varchar(255) not null, tracelineType varchar(255) not null, set varchar(255) not null, primary key (topiaId)); -create table ll_observation.catch (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp not null, lastUpdateDate timestamp default CURRENT_TIMESTAMP not null, homeId varchar(255), comment varchar(8192), count integer not null, totalWeight numeric, hookWhenDiscarded boolean, depredated boolean default false not null, beatDiameter numeric, gonadeWeight numeric, photoReferences varchar(255), number integer, acquisitionMode integer, tagNumber varchar(255), section varchar(255), basket varchar(255), branchline varchar(255), catchFate varchar(255) not null, discardHealthStatus varchar(255), species varchar(255) not null, maturityStatus varchar(255), stomachFullness varchar(255), hookPosition varchar(255), catchHealthStatus varchar(255), sex varchar(255), weightMeasureMethod varchar(255), set varchar(255) not null, set_idx integer, primary key (topiaId)); +create table ll_observation.catch (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp not null, lastUpdateDate timestamp default CURRENT_TIMESTAMP not null, homeId varchar(255), comment varchar(8192), count integer not null, totalWeight numeric, hookWhenDiscarded boolean, depredated boolean default false not null, beatDiameter numeric, gonadeWeight numeric, photoReferences varchar(255), sampleReferences varchar(255), number integer, acquisitionMode integer, tagNumber varchar(255), section varchar(255), basket varchar(255), branchline varchar(255), catchFate varchar(255) not null, discardHealthStatus varchar(255), species varchar(255) not null, maturityStatus varchar(255), stomachFullness varchar(255), hookPosition varchar(255), catchHealthStatus varchar(255), sex varchar(255), weightMeasureMethod varchar(255), set varchar(255) not null, set_idx integer, primary key (topiaId)); create table ll_observation.catch_predator (catch varchar(255) not null, species varchar(255) not null, primary key (catch, species)); create table ll_observation.encounter (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp not null, lastUpdateDate timestamp default CURRENT_TIMESTAMP not null, homeId varchar(255), distance numeric, count integer, encounterType varchar(255) not null, species varchar(255), activity varchar(255) not null, primary key (topiaId)); create table ll_observation.encounterType (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp not null, lastUpdateDate timestamp default CURRENT_TIMESTAMP not null, code varchar(255) not null, uri varchar(255), homeId varchar(255), needComment boolean default false not null, status integer not null, label1 varchar(255) not null, label2 varchar(255) not null, label3 varchar(255) not null, label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), primary key (topiaId)); ===================================== core/persistence/migration/src/main/resources/db/migration/v9/9.4/empty-schema-PG.sql ===================================== @@ -104,7 +104,7 @@ create table ll_observation.baitsComposition (topiaId varchar(255) not null, top create table ll_observation.basket (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp not null, lastUpdateDate timestamp default CURRENT_TIMESTAMP not null, homeId varchar(255), settingIdentifier integer not null, haulingIdentifier integer, floatline1Length numeric, floatline2Length numeric, section varchar(255) not null, primary key (topiaId)); create table ll_observation.branchline (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp not null, lastUpdateDate timestamp default CURRENT_TIMESTAMP not null, homeId varchar(255), comment varchar(8192), settingIdentifier integer not null, haulingIdentifier integer, depthRecorder boolean default false not null, timer boolean default false not null, timeSinceContact integer, hookOffset integer, branchlineLength numeric, weightedSwivel boolean default false not null, timerTimeOnBoard timestamp, weightedSnap boolean default false not null, swivelWeight numeric, snapWeight numeric, tracelineLength numeric, hookLost boolean default false not null, traceCutOff boolean default false not null, hookType varchar(255), baitType varchar(255), topType varchar(255), tracelineType varchar(255), baitSettingStatus varchar(255), baitHaulingStatus varchar(255), hookSize varchar(255), basket varchar(255) not null, primary key (topiaId)); create table ll_observation.branchlinesComposition (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp not null, lastUpdateDate timestamp default CURRENT_TIMESTAMP not null, homeId varchar(255), length numeric not null, proportion integer not null, tracelineLength numeric, topType varchar(255) not null, tracelineType varchar(255) not null, set varchar(255) not null, primary key (topiaId)); -create table ll_observation.catch (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp not null, lastUpdateDate timestamp default CURRENT_TIMESTAMP not null, homeId varchar(255), comment varchar(8192), count integer not null, totalWeight numeric, hookWhenDiscarded boolean, depredated boolean default false not null, beatDiameter numeric, gonadeWeight numeric, photoReferences varchar(255), number integer, acquisitionMode integer, tagNumber varchar(255), section varchar(255), basket varchar(255), branchline varchar(255), catchFate varchar(255) not null, discardHealthStatus varchar(255), species varchar(255) not null, maturityStatus varchar(255), stomachFullness varchar(255), hookPosition varchar(255), catchHealthStatus varchar(255), sex varchar(255), weightMeasureMethod varchar(255), set varchar(255) not null, set_idx integer, primary key (topiaId)); +create table ll_observation.catch (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp not null, lastUpdateDate timestamp default CURRENT_TIMESTAMP not null, homeId varchar(255), comment varchar(8192), count integer not null, totalWeight numeric, hookWhenDiscarded boolean, depredated boolean default false not null, beatDiameter numeric, gonadeWeight numeric, photoReferences varchar(255), sampleReferences varchar(255), number integer, acquisitionMode integer, tagNumber varchar(255), section varchar(255), basket varchar(255), branchline varchar(255), catchFate varchar(255) not null, discardHealthStatus varchar(255), species varchar(255) not null, maturityStatus varchar(255), stomachFullness varchar(255), hookPosition varchar(255), catchHealthStatus varchar(255), sex varchar(255), weightMeasureMethod varchar(255), set varchar(255) not null, set_idx integer, primary key (topiaId)); create table ll_observation.catch_predator (catch varchar(255) not null, species varchar(255) not null, primary key (catch, species)); create table ll_observation.encounter (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp not null, lastUpdateDate timestamp default CURRENT_TIMESTAMP not null, homeId varchar(255), distance numeric, count integer, encounterType varchar(255) not null, species varchar(255), activity varchar(255) not null, primary key (topiaId)); create table ll_observation.encounterType (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp not null, lastUpdateDate timestamp default CURRENT_TIMESTAMP not null, code varchar(255) not null, uri varchar(255), homeId varchar(255), needComment boolean default false not null, status integer not null, label1 varchar(255) not null, label2 varchar(255) not null, label3 varchar(255) not null, label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), primary key (topiaId)); ===================================== core/persistence/resources/src/main/resources/fr/ird/observe/entities/data/ll/observation/Catch/definition.json ===================================== @@ -8,6 +8,7 @@ "beatDiameter": "Float", "gonadeWeight": "Float", "photoReferences": "String", + "sampleReferences": "String", "number": "Integer", "acquisitionMode": "int", "tagNumber": "String", ===================================== core/persistence/resources/src/main/resources/fr/ird/observe/entities/data/ll/observation/Catch/validation-create.json ===================================== @@ -97,6 +97,12 @@ "check if referential predator is disabled (only if validation is not strong)" ] }, + "sampleReferences": { + "errors": [ + "sampleReferences (if not null) is not a blank string", + "sampleReferences length <= 255" + ] + }, "section": { "warnings": [ "mandatory except if acquisitionMode != 0" ===================================== core/persistence/resources/src/main/resources/fr/ird/observe/entities/data/ll/observation/Catch/validation-update.json ===================================== @@ -97,6 +97,12 @@ "check if referential predator is disabled (only if validation is not strong)" ] }, + "sampleReferences": { + "errors": [ + "sampleReferences (if not null) is not a blank string", + "sampleReferences length <= 255" + ] + }, "section": { "warnings": [ "mandatory except if acquisitionMode != 0" ===================================== core/services/i18n/src/main/i18n/translations/services_en_GB.properties ===================================== @@ -289,6 +289,7 @@ observe.Common.reportsUrl=Reports url observe.Common.root.list.message.none=<html><body>No data of type <i>%s</i> for group by <i>%s</i> saved.</body></html> observe.Common.sample=Sample observe.Common.sampleQuality=Sample quality +observe.Common.sampleReferences=Sample references observe.Common.sampleSpeciesMeasure=Frequencies observe.Common.sampleSpeciesMeasure.validation.uniqueKey=Size class must be unique, value at index %s is duplicated. observe.Common.sampleType=Sample type ===================================== core/services/i18n/src/main/i18n/translations/services_es_ES.properties ===================================== @@ -289,6 +289,7 @@ observe.Common.reportsUrl=URL del informe observe.Common.root.list.message.none=<html><body>No data of type <i>%s</i> for group by <i>%s</i> saved.</body></html> observe.Common.sample=Sample \#TODO observe.Common.sampleQuality=Sample quality \#TODO +observe.Common.sampleReferences=Sample references \#TODO observe.Common.sampleSpeciesMeasure=TODO observe.Common.sampleSpeciesMeasure.validation.uniqueKey=TODO observe.Common.sampleType=Sample type \#TODO ===================================== core/services/i18n/src/main/i18n/translations/services_fr_FR.properties ===================================== @@ -289,6 +289,7 @@ observe.Common.reportsUrl=URL de rapport observe.Common.root.list.message.none=<html><body>Aucune donnée du type <i>%s</i> pour le groupement <i>%s</i> enregistrée.</body></html> observe.Common.sample=Échantillon observe.Common.sampleQuality=Qualité de l'échantillon +observe.Common.sampleReferences=Références échantillon observe.Common.sampleSpeciesMeasure=Fréquences observe.Common.sampleSpeciesMeasure.validation.uniqueKey=La classe de taille doit être unique, la donnée de rang %s est invalide. observe.Common.sampleType=Type d'échantillon ===================================== model/src/main/models/Observe/dto/30-data-ll-observation.model ===================================== @@ -89,6 +89,7 @@ depredated boolean beatDiameter Float gonadeWeight Float photoReferences String +sampleReferences String number Integer acquisitionMode int tagNumber String ===================================== model/src/main/models/Observe/dto/attribute/notBlank.properties ===================================== @@ -43,6 +43,7 @@ data.ll.observation.Activity.attribute.comment=true data.ll.observation.Branchline.attribute.comment=true data.ll.observation.Catch.attribute.comment=true data.ll.observation.Catch.attribute.photoReferences=true +data.ll.observation.Catch.attribute.sampleReferences=true data.ll.observation.Catch.attribute.tagNumber=true data.ll.observation.SectionTemplate.attribute.floatlineLengths=true data.ll.observation.SectionTemplate.attribute.id=true ===================================== model/src/main/models/Observe/dto/attribute/stringMaxLength.properties ===================================== @@ -34,6 +34,7 @@ data.ll.logbook.Sample.attribute.comment=8192 data.ll.observation.Activity.attribute.comment=8192 data.ll.observation.Branchline.attribute.comment=8192 data.ll.observation.Catch.attribute.comment=8192 +data.ll.observation.Catch.attribute.sampleReferences=255 data.ps.common.GearUseFeatures.attribute.comment=8192 data.ps.common.Trip.attribute.generalComment=8192 data.ps.common.Trip.attribute.logbookComment=8192 ===================================== model/src/main/models/Observe/dto/class/i18nLabels.properties ===================================== @@ -41,7 +41,7 @@ data.ll.observation.BaitsComposition=baitSettingStatus,baitType,individualSize,i data.ll.observation.Basket=floatline1Length,floatline1Length.short,floatline2Length,floatline2Length.short,branchline,haulingIdentifier,settingIdentifier data.ll.observation.Branchline=branchlineLength.short,tracelineLength.short,depthRecorder,timer,timeSinceContact,hookOffset,branchlineLength,weightedSwivel,timerTimeOnBoard,weightedSnap,swivelWeight,snapWeight,tracelineLength,hookLost,traceCutOff,baitSettingStatus,hookSize,baitHaulingStatus,hookType,tracelineType,topType,baitType,comment,action.save,action.save.tip,haulingIdentifier,message.modified,message.modified.but.invalid,setDefaultTimerTimeOnBoard.tip,settingIdentifier data.ll.observation.BranchlinesComposition=length,topType,tracelineLength,tracelineType,branchlinesCompositionProportionSum -data.ll.observation.Catch=baitHaulingStatus,acquisitionMode,basket,beatDiameter,branchline,catchFate,catchHealthStatus,comment,count,depredated,depthRecorder,discardHealthStatus,gonadeWeight,hookLost,hookPosition,hookWhenDiscarded,maturityStatus,number,photoReferences,predator,section,sex,species,stomachFullness,tagNumber,timer,timerTimeOnBoard,totalWeight,traceCutOff,weightMeasureMethod,depredatedProportion,branchlineTab,caracteristicTab,depredatedTab,foodAndSexualTab,noBranchlineSelected,sizeMeasuresTab,timeSinceContact,weightMeasuresTab,action.reset.branchline,action.reset.branchline.tip,predator.available,predator.selected +data.ll.observation.Catch=baitHaulingStatus,acquisitionMode,basket,beatDiameter,branchline,catchFate,catchHealthStatus,comment,count,depredated,depthRecorder,discardHealthStatus,gonadeWeight,hookLost,hookPosition,hookWhenDiscarded,maturityStatus,number,photoReferences,predator,sampleReferences,section,sex,species,stomachFullness,tagNumber,timer,timerTimeOnBoard,totalWeight,traceCutOff,weightMeasureMethod,depredatedProportion,branchlineTab,caracteristicTab,depredatedTab,foodAndSexualTab,noBranchlineSelected,sizeMeasuresTab,timeSinceContact,weightMeasuresTab,action.reset.branchline,action.reset.branchline.tip,predator.available,predator.selected data.ll.observation.Encounter=count,distance,encounterType,species data.ll.observation.FloatlinesComposition=length,lineType,floatlinesCompositionProportionSum data.ll.observation.HooksComposition=hookOffset,hookSize,hookType,hooksCompositionProportionSum ===================================== model/src/main/models/Observe/persistence/30-data-ll-observation.model ===================================== @@ -68,6 +68,7 @@ depredated boolean beatDiameter Float gonadeWeight Float photoReferences String +sampleReferences String number Integer acquisitionMode int tagNumber String ===================================== model/src/main/models/Observe/persistence/attribute/length.properties ===================================== @@ -31,6 +31,7 @@ data.ll.logbook.Set.attribute.comment=8192 data.ll.observation.Activity.attribute.comment=8192 data.ll.observation.Branchline.attribute.comment=8192 data.ll.observation.Catch.attribute.comment=8192 +data.ll.observation.Catch.attribute.sampleReferences=255 data.ll.observation.Set.attribute.comment=8192 data.ps.common.GearUseFeatures.attribute.comment=8192 data.ps.common.Trip.attribute.generalComment=8192 View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/0c3b23dc1984ca5b5375d2627... -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/0c3b23dc1984ca5b5375d2627... You're receiving this email because of your account on gitlab.com.
participants (1)
-
Tony CHEMIT (@tchemit)