Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe

Commits:

30 changed files:

Changes:

  • client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/dcp/FloatingObjectUICommon.jcss
    ... ... @@ -194,3 +194,12 @@
    194 194
       i18nProperty:comment;
    
    195 195
     }
    
    196 196
     
    
    197
    +#coordinate1Label {
    
    198
    +  text:"observe.Common.coordinate";
    
    199
    +}
    
    200
    +
    
    201
    +#coordinate1 {
    
    202
    +  propertyLatitude:{TransmittingBuoyDto.PROPERTY_LATITUDE};
    
    203
    +  propertyLongitude:{TransmittingBuoyDto.PROPERTY_LONGITUDE};
    
    204
    +  propertyQuadrant:{TransmittingBuoyDto.PROPERTY_QUADRANT};
    
    205
    +}

  • client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/logbook/FloatingObjectUI.jcss deleted
    1
    -/*
    
    2
    - * #%L
    
    3
    - * ObServe Client :: DataSource :: Editor :: PS
    
    4
    - * %%
    
    5
    - * Copyright (C) 2008 - 2023 IRD, Ultreia.io
    
    6
    - * %%
    
    7
    - * This program is free software: you can redistribute it and/or modify
    
    8
    - * it under the terms of the GNU General Public License as
    
    9
    - * published by the Free Software Foundation, either version 3 of the
    
    10
    - * License, or (at your option) any later version.
    
    11
    - *
    
    12
    - * This program is distributed in the hope that it will be useful,
    
    13
    - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    
    14
    - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    
    15
    - * GNU General Public License for more details.
    
    16
    - *
    
    17
    - * You should have received a copy of the GNU General Public
    
    18
    - * License along with this program.  If not, see
    
    19
    - * <http://www.gnu.org/licenses/gpl-3.0.html>.
    
    20
    - * #L%
    
    21
    - */
    
    22
    -
    
    23
    -#coordinate1Label {
    
    24
    -  text:"observe.Common.coordinate";
    
    25
    -}
    
    26
    -
    
    27
    -#coordinate1 {
    
    28
    -  propertyLatitude:{TransmittingBuoyDto.PROPERTY_LATITUDE};
    
    29
    -  propertyLongitude:{TransmittingBuoyDto.PROPERTY_LONGITUDE};
    
    30
    -  propertyQuadrant:{TransmittingBuoyDto.PROPERTY_QUADRANT};
    
    31
    -}

  • client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/observation/FloatingObjectUI.jcss deleted
    1
    -/*
    
    2
    - * #%L
    
    3
    - * ObServe Client :: DataSource :: Editor :: PS
    
    4
    - * %%
    
    5
    - * Copyright (C) 2008 - 2023 IRD, Ultreia.io
    
    6
    - * %%
    
    7
    - * This program is free software: you can redistribute it and/or modify
    
    8
    - * it under the terms of the GNU General Public License as
    
    9
    - * published by the Free Software Foundation, either version 3 of the
    
    10
    - * License, or (at your option) any later version.
    
    11
    - *
    
    12
    - * This program is distributed in the hope that it will be useful,
    
    13
    - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    
    14
    - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    
    15
    - * GNU General Public License for more details.
    
    16
    - *
    
    17
    - * You should have received a copy of the GNU General Public
    
    18
    - * License along with this program.  If not, see
    
    19
    - * <http://www.gnu.org/licenses/gpl-3.0.html>.
    
    20
    - * #L%
    
    21
    - */
    
    22
    -
    
    23
    -#coordinate1Label {
    
    24
    -  text:"observe.Common.coordinate";
    
    25
    -}
    
    26
    -
    
    27
    -#coordinate1 {
    
    28
    -  propertyLatitude:{TransmittingBuoyDto.PROPERTY_LATITUDE};
    
    29
    -  propertyLongitude:{TransmittingBuoyDto.PROPERTY_LONGITUDE};
    
    30
    -  propertyQuadrant:{TransmittingBuoyDto.PROPERTY_QUADRANT};
    
    31
    -}

  • core/api/validation/src/main/filtered-resources/META-INF/validators/validation.json
    ... ... @@ -10844,7 +10844,8 @@
    10844 10844
           {
    
    10845 10845
             "name": "objectOperation",
    
    10846 10846
             "comments": [
    
    10847
    -          "check if referential objectOperation is disabled (only if validation is strong)"
    
    10847
    +          "check if referential objectOperation is disabled (only if validation is strong)",
    
    10848
    +          "objectOperation is mandatory"
    
    10848 10849
             ]
    
    10849 10850
           },
    
    10850 10851
           {
    
    ... ... @@ -10897,7 +10898,8 @@
    10897 10898
           {
    
    10898 10899
             "name": "objectOperation",
    
    10899 10900
             "comments": [
    
    10900
    -          "check if referential objectOperation is disabled (only if validation is strong)"
    
    10901
    +          "check if referential objectOperation is disabled (only if validation is strong)",
    
    10902
    +          "objectOperation is mandatory"
    
    10901 10903
             ]
    
    10902 10904
           },
    
    10903 10905
           {
    
    ... ... @@ -13267,7 +13269,8 @@
    13267 13269
           {
    
    13268 13270
             "name": "objectOperation",
    
    13269 13271
             "comments": [
    
    13270
    -          "check if referential objectOperation is disabled (only if validation is strong)"
    
    13272
    +          "check if referential objectOperation is disabled (only if validation is strong)",
    
    13273
    +          "objectOperation is mandatory"
    
    13271 13274
             ]
    
    13272 13275
           },
    
    13273 13276
           {
    
    ... ... @@ -13320,7 +13323,8 @@
    13320 13323
           {
    
    13321 13324
             "name": "objectOperation",
    
    13322 13325
             "comments": [
    
    13323
    -          "check if referential objectOperation is disabled (only if validation is strong)"
    
    13326
    +          "check if referential objectOperation is disabled (only if validation is strong)",
    
    13327
    +          "objectOperation is mandatory"
    
    13324 13328
             ]
    
    13325 13329
           },
    
    13326 13330
           {
    

  • core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/logbook/FloatingObjectDto-create-error-validation.xml
    ... ... @@ -60,6 +60,11 @@
    60 60
       </field>
    
    61 61
     
    
    62 62
       <field name="objectOperation">
    
    63
    +    <!-- objectOperation is mandatory -->
    
    64
    +    <field-validator type="mandatory" short-circuit="true">
    
    65
    +      <message/>
    
    66
    +    </field-validator>
    
    67
    +
    
    63 68
         <!-- check if referential objectOperation is disabled (only if validation is strong) -->
    
    64 69
         <field-validator type="checkDisabledReferentialOnErrorScope">
    
    65 70
           <message/>
    

  • core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/logbook/FloatingObjectDto-update-error-validation.xml
    ... ... @@ -60,6 +60,11 @@
    60 60
       </field>
    
    61 61
     
    
    62 62
       <field name="objectOperation">
    
    63
    +    <!-- objectOperation is mandatory -->
    
    64
    +    <field-validator type="mandatory" short-circuit="true">
    
    65
    +      <message/>
    
    66
    +    </field-validator>
    
    67
    +
    
    63 68
         <!-- check if referential objectOperation is disabled (only if validation is strong) -->
    
    64 69
         <field-validator type="checkDisabledReferentialOnErrorScope">
    
    65 70
           <message/>
    

  • core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/observation/FloatingObjectDto-create-error-validation.xml
    ... ... @@ -60,6 +60,11 @@
    60 60
       </field>
    
    61 61
     
    
    62 62
       <field name="objectOperation">
    
    63
    +    <!-- objectOperation is mandatory -->
    
    64
    +    <field-validator type="mandatory" short-circuit="true">
    
    65
    +      <message/>
    
    66
    +    </field-validator>
    
    67
    +
    
    63 68
         <!-- check if referential objectOperation is disabled (only if validation is strong) -->
    
    64 69
         <field-validator type="checkDisabledReferentialOnErrorScope">
    
    65 70
           <message/>
    

  • core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/observation/FloatingObjectDto-update-error-validation.xml
    ... ... @@ -60,6 +60,11 @@
    60 60
       </field>
    
    61 61
     
    
    62 62
       <field name="objectOperation">
    
    63
    +    <!-- objectOperation is mandatory -->
    
    64
    +    <field-validator type="mandatory" short-circuit="true">
    
    65
    +      <message/>
    
    66
    +    </field-validator>
    
    67
    +
    
    63 68
         <!-- check if referential objectOperation is disabled (only if validation is strong) -->
    
    64 69
         <field-validator type="checkDisabledReferentialOnErrorScope">
    
    65 70
           <message/>
    

  • core/persistence/java/src/main/java/fr/ird/observe/entities/data/ps/common/TripSpi.java
    ... ... @@ -42,6 +42,7 @@ import fr.ird.observe.entities.data.DataEntity;
    42 42
     import fr.ird.observe.entities.data.ps.landing.Landing;
    
    43 43
     import fr.ird.observe.entities.data.ps.logbook.Activity;
    
    44 44
     import fr.ird.observe.entities.data.ps.logbook.Route;
    
    45
    +import fr.ird.observe.entities.referential.common.DataQuality;
    
    45 46
     import fr.ird.observe.entities.referential.common.Ocean;
    
    46 47
     import fr.ird.observe.entities.referential.common.Species;
    
    47 48
     import fr.ird.observe.entities.referential.common.SpeciesList;
    
    ... ... @@ -113,17 +114,22 @@ public class TripSpi extends GeneratedTripSpi {
    113 114
             }
    
    114 115
             AcquisitionStatus acquisitionStatus = AcquisitionStatus.loadEntity(context, ProtectedIdsPs.PS_COMMON_DEFAULT_ACQUISITION_STATUS_ID);
    
    115 116
             AcquisitionStatus acquisitionStatusDone = AcquisitionStatus.loadEntity(context, ProtectedIdsPs.PS_COMMON_DONE_ACQUISITION_STATUS_ID);
    
    116
    -        if (preCreated.getObservationsProgram() != null) {
    
    117
    +        if (preCreated.getObservationsProgram() == null) {
    
    118
    +            preCreated.setObservationsAcquisitionStatus(acquisitionStatus);
    
    119
    +        } else {
    
    117 120
                 //FIXME Should we add some default values?
    
    118 121
                 preCreated.setObservationsAcquisitionStatus(acquisitionStatusDone);
    
    119
    -        } else {
    
    120
    -            preCreated.setObservationsAcquisitionStatus(acquisitionStatus);
    
    122
    +
    
    121 123
             }
    
    122
    -        if (preCreated.getLogbookProgram() != null) {
    
    123
    -            //FIXME Should we add some default values?
    
    124
    -            preCreated.setLogbookAcquisitionStatus(acquisitionStatusDone);
    
    125
    -        }else {
    
    124
    +        if (preCreated.getLogbookProgram() == null) {
    
    126 125
                 preCreated.setLogbookAcquisitionStatus(acquisitionStatus);
    
    126
    +        } else {
    
    127
    +            preCreated.setLogbookAcquisitionStatus(acquisitionStatusDone);
    
    128
    +            WellContentStatus wellContentStatus = WellContentStatus.loadEntity(context, ProtectedIdsPs.PS_LOGBOOK_DEFAULT_WELL_CONTENT_STATUS_ID);
    
    129
    +            preCreated.setDepartureWellContentStatus(wellContentStatus);
    
    130
    +            preCreated.setLandingWellContentStatus(wellContentStatus);
    
    131
    +            DataQuality dataQuality = DataQuality.loadEntity(context, ProtectedIdsPs.PS_LOGBOOK_TRIP_DEFAULT_DATA_QUALITY_ID);
    
    132
    +            preCreated.setLogbookDataQuality(dataQuality);
    
    127 133
             }
    
    128 134
             preCreated.setTargetWellsSamplingAcquisitionStatus(acquisitionStatus);
    
    129 135
             preCreated.setLandingAcquisitionStatus(acquisitionStatus);
    
    ... ... @@ -131,10 +137,6 @@ public class TripSpi extends GeneratedTripSpi {
    131 137
             preCreated.setLocalMarketWellsSamplingAcquisitionStatus(acquisitionStatus);
    
    132 138
             preCreated.setLocalMarketSurveySamplingAcquisitionStatus(acquisitionStatus);
    
    133 139
             preCreated.setAdvancedSamplingAcquisitionStatus(acquisitionStatus);
    
    134
    -
    
    135
    -        WellContentStatus wellContentStatus = WellContentStatus.loadEntity(context, ProtectedIdsPs.PS_LOGBOOK_DEFAULT_WELL_CONTENT_STATUS_ID);
    
    136
    -        preCreated.setDepartureWellContentStatus(wellContentStatus);
    
    137
    -        preCreated.setLandingWellContentStatus(wellContentStatus);
    
    138 140
             preCreated.setActivitiesAcquisitionMode(ActivitiesAcquisitionMode.BY_TIME);
    
    139 141
             return super.preCreate(context, preCreated);
    
    140 142
         }
    

  • core/persistence/java/src/main/resources/META-INF/persistence/Observe/TopiaEntitySqlUsageModel.json
    ... ... @@ -808,7 +808,7 @@
    808 808
           ]
    
    809 809
         },
    
    810 810
         "fr.ird.observe.entities.referential.ps.common.ObjectOperation": {
    
    811
    -      "reverseCompositions": [
    
    811
    +      "reverseMandatoryCompositions": [
    
    812 812
             "fr.ird.observe.entities.data.ps.observation.FloatingObject~objectOperation",
    
    813 813
             "fr.ird.observe.entities.data.ps.logbook.FloatingObject~objectOperation"
    
    814 814
           ]
    

  • core/persistence/java/src/main/resources/fr/ird/observe/entities/data/ps/logbook/FloatingObjectImpl.hbm.xml
    ... ... @@ -38,7 +38,7 @@
    38 38
             <property name="comment" access="field" type="java.lang.String" length="8192">
    
    39 39
                 <column length="8192" name="comment"/>
    
    40 40
             </property>
    
    41
    -        <many-to-one name="objectOperation" class="fr.ird.observe.entities.referential.ps.common.ObjectOperationImpl" column="objectOperation" foreign-key="fk_ps_logbook_floatingobject_objectoperation" />
    
    41
    +        <many-to-one name="objectOperation" class="fr.ird.observe.entities.referential.ps.common.ObjectOperationImpl" column="objectOperation" foreign-key="fk_ps_logbook_floatingobject_objectoperation" not-null="true" />
    
    42 42
             <property name="supportVesselName" access="field" type="java.lang.String" length="32">
    
    43 43
                 <column length="32" name="supportVesselName"/>
    
    44 44
             </property>
    

  • core/persistence/java/src/main/resources/fr/ird/observe/entities/data/ps/observation/FloatingObjectImpl.hbm.xml
    ... ... @@ -46,7 +46,7 @@
    46 46
                 <key column="floatingObject" foreign-key="fk_ps_observation_floatingobject_objectobservedspecies" not-null="true" />
    
    47 47
                 <one-to-many class="fr.ird.observe.entities.data.ps.observation.ObjectObservedSpeciesImpl"/>
    
    48 48
             </set>
    
    49
    -        <many-to-one name="objectOperation" class="fr.ird.observe.entities.referential.ps.common.ObjectOperationImpl" column="objectOperation" foreign-key="fk_ps_observation_floatingobject_objectoperation" />
    
    49
    +        <many-to-one name="objectOperation" class="fr.ird.observe.entities.referential.ps.common.ObjectOperationImpl" column="objectOperation" foreign-key="fk_ps_observation_floatingobject_objectoperation" not-null="true" />
    
    50 50
             <property name="supportVesselName" access="field" type="java.lang.String" length="32">
    
    51 51
                 <column length="32" name="supportVesselName"/>
    
    52 52
             </property>
    

  • core/persistence/migration/src/main/java/fr/ird/observe/spi/migration/v9/DataSourceMigrationForVersion_9_3.java
    ... ... @@ -40,7 +40,7 @@ public class DataSourceMigrationForVersion_9_3 extends ByMajorMigrationVersionRe
    40 40
     
    
    41 41
         public DataSourceMigrationForVersion_9_3() {
    
    42 42
             super(Version.valueOf("9.3"), false);
    
    43
    -        createResourceScriptVariables(this, "2024-04-26", "2023-12-01 00:00:00.000000");
    
    43
    +        createResourceScriptVariables(this, "2024-04-29", "2023-12-01 00:00:00.000000");
    
    44 44
         }
    
    45 45
     
    
    46 46
         @Override
    
    ... ... @@ -53,6 +53,8 @@ public class DataSourceMigrationForVersion_9_3 extends ByMajorMigrationVersionRe
    53 53
                 executor.addScript("02", "issue-2857");
    
    54 54
                 // See https://gitlab.com/ultreiaio/ird-observe/-/issues/2869
    
    55 55
                 executor.addScript("03", "issue-2869");
    
    56
    +            // See https://gitlab.com/ultreiaio/ird-observe/-/issues/2877
    
    57
    +            executor.addScript("04", "issue-2877");
    
    56 58
             }
    
    57 59
         }
    
    58 60
     
    

  • core/persistence/migration/src/main/resources/db/migration/v9/9.3/04_issue-2877-common.sql
    1
    +---
    
    2
    +-- #%L
    
    3
    +-- ObServe Core :: Persistence :: Migration
    
    4
    +-- %%
    
    5
    +-- Copyright (C) 2008 - 2024 IRD, Ultreia.io
    
    6
    +-- %%
    
    7
    +-- This program is free software: you can redistribute it and/or modify
    
    8
    +-- it under the terms of the GNU General Public License as
    
    9
    +-- published by the Free Software Foundation, either version 3 of the
    
    10
    +-- License, or (at your option) any later version.
    
    11
    +--
    
    12
    +-- This program is distributed in the hope that it will be useful,
    
    13
    +-- but WITHOUT ANY WARRANTY; without even the implied warranty of
    
    14
    +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    
    15
    +-- GNU General Public License for more details.
    
    16
    +--
    
    17
    +-- You should have received a copy of the GNU General Public
    
    18
    +-- License along with this program.  If not, see
    
    19
    +-- <http://www.gnu.org/licenses/gpl-3.0.html>.
    
    20
    +-- #L%
    
    21
    +---
    
    22
    +ALTER TABLE ps_logbook.FloatingObject ALTER COLUMN objectOperation SET NOT NULL;
    
    23
    +ALTER TABLE ps_observation.FloatingObject ALTER COLUMN objectOperation SET NOT NULL;

  • core/persistence/migration/src/main/resources/db/migration/v9/9.3/empty-schema-H2.sql
    ... ... @@ -162,7 +162,7 @@ create table ps_localmarket.surveyPart (topiaId varchar(255) not null, topiaVers
    162 162
     create table ps_logbook.activity (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), time time, latitude numeric, longitude numeric, latitudeOriginal numeric, longitudeOriginal numeric, originalDataModified boolean default false not null, vmsDivergent boolean default false not null, positionCorrected boolean default false not null, number integer not null, setCount integer, seaSurfaceTemperature numeric, windDirection integer, vesselActivity varchar(255) not null, wind varchar(255), totalWeight numeric, currentSpeed numeric, currentDirection integer, schoolType varchar(255), relatedObservedActivity varchar(255), currentFpaZone varchar(255), previousFpaZone varchar(255), nextFpaZone varchar(255), dataQuality varchar(255), informationSource varchar(255), reasonForNoFishing varchar(255), setSuccessStatus varchar(255), reasonForNullSet varchar(255), route varchar(255) not null, primary key (topiaId));
    
    163 163
     create table ps_logbook.activity_observedSystem (activity varchar(255) not null, observedSystem varchar(255) not null, primary key (activity, observedSystem));
    
    164 164
     create table ps_logbook.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), species varchar(255) not null, weightCategory varchar(255), speciesFate varchar(255) not null, weight numeric, count integer, weightMeasureMethod varchar(255), well varchar(255), activity varchar(255) not null, activity_idx integer, primary key (topiaId));
    
    165
    -create table ps_logbook.floatingObject (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), objectOperation varchar(255), supportVesselName varchar(32), computedWhenArrivingBiodegradable varchar(255), computedWhenArrivingNonEntangling varchar(255), computedWhenArrivingSimplifiedObjectType varchar(255), computedWhenLeavingBiodegradable varchar(255), computedWhenLeavingNonEntangling varchar(255), computedWhenLeavingSimplifiedObjectType varchar(255), activity varchar(255) not null, primary key (topiaId));
    
    165
    +create table ps_logbook.floatingObject (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), objectOperation varchar(255) not null, supportVesselName varchar(32), computedWhenArrivingBiodegradable varchar(255), computedWhenArrivingNonEntangling varchar(255), computedWhenArrivingSimplifiedObjectType varchar(255), computedWhenLeavingBiodegradable varchar(255), computedWhenLeavingNonEntangling varchar(255), computedWhenLeavingSimplifiedObjectType varchar(255), activity varchar(255) not null, primary key (topiaId));
    
    166 166
     create table ps_logbook.floatingObjectPart (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp not null, lastUpdateDate timestamp default CURRENT_TIMESTAMP not null, homeId varchar(255), whenArriving varchar(255), whenLeaving varchar(255), objectMaterial varchar(255) not null, floatingObject varchar(255) not null, primary key (topiaId));
    
    167 167
     create table ps_logbook.informationSource (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));
    
    168 168
     create table ps_logbook.route (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), date date not null, timeAtSea integer, fishingTime integer, trip varchar(255) not null, primary key (topiaId));
    
    ... ... @@ -184,7 +184,7 @@ create table ps_observation.activity (topiaId varchar(255) not null, topiaVersio
    184 184
     create table ps_observation.activity_observedSystem (activity varchar(255) not null, observedSystem varchar(255) not null, primary key (activity, observedSystem));
    
    185 185
     create table ps_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), catchWeight numeric, catchWeightComputedSource integer, minWeight numeric, meanWeight numeric, maxWeight numeric, meanWeightComputedSource integer, meanLength numeric, meanLengthComputedSource integer, totalCount integer, totalCountComputedSource integer, well varchar(255), reasonForDiscard varchar(255), informationSource varchar(255) not null, species varchar(255) not null, weightMeasureMethod varchar(255), sizeMeasureMethod varchar(255), speciesFate varchar(255) not null, set varchar(255) not null, set_idx integer, primary key (topiaId));
    
    186 186
     create table ps_observation.detectionMode (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));
    
    187
    -create table ps_observation.floatingObject (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), objectOperation varchar(255), supportVesselName varchar(32), computedWhenArrivingBiodegradable varchar(255), computedWhenArrivingNonEntangling varchar(255), computedWhenArrivingSimplifiedObjectType varchar(255), computedWhenLeavingBiodegradable varchar(255), computedWhenLeavingNonEntangling varchar(255), computedWhenLeavingSimplifiedObjectType varchar(255), activity varchar(255) not null, primary key (topiaId));
    
    187
    +create table ps_observation.floatingObject (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), objectOperation varchar(255) not null, supportVesselName varchar(32), computedWhenArrivingBiodegradable varchar(255), computedWhenArrivingNonEntangling varchar(255), computedWhenArrivingSimplifiedObjectType varchar(255), computedWhenLeavingBiodegradable varchar(255), computedWhenLeavingNonEntangling varchar(255), computedWhenLeavingSimplifiedObjectType varchar(255), activity varchar(255) not null, primary key (topiaId));
    
    188 188
     create table ps_observation.floatingObjectPart (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp not null, lastUpdateDate timestamp default CURRENT_TIMESTAMP not null, homeId varchar(255), whenArriving varchar(255), whenLeaving varchar(255), objectMaterial varchar(255) not null, floatingObject varchar(255) not null, primary key (topiaId));
    
    189 189
     create table ps_observation.informationSource (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));
    
    190 190
     create table ps_observation.nonTargetCatchRelease (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), length numeric, count integer not null, brailNumber integer, acquisitionMode integer, species varchar(255) not null, status varchar(255) not null, sex varchar(255) not null, speciesGroupReleaseMode varchar(255) not null, conformity varchar(255), handlingPlace varchar(255), releasingTime varchar(255), sizeMeasureMethod varchar(255), set varchar(255) not null, set_idx integer, primary key (topiaId));
    

  • core/persistence/migration/src/main/resources/db/migration/v9/9.3/empty-schema-PG.sql
    ... ... @@ -162,7 +162,7 @@ create table ps_localmarket.surveyPart (topiaId varchar(255) not null, topiaVers
    162 162
     create table ps_logbook.activity (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), time time, latitude numeric, longitude numeric, latitudeOriginal numeric, longitudeOriginal numeric, originalDataModified boolean default false not null, vmsDivergent boolean default false not null, positionCorrected boolean default false not null, number integer not null, setCount integer, seaSurfaceTemperature numeric, windDirection integer, vesselActivity varchar(255) not null, wind varchar(255), totalWeight numeric, currentSpeed numeric, currentDirection integer, schoolType varchar(255), relatedObservedActivity varchar(255), currentFpaZone varchar(255), previousFpaZone varchar(255), nextFpaZone varchar(255), dataQuality varchar(255), informationSource varchar(255), reasonForNoFishing varchar(255), setSuccessStatus varchar(255), reasonForNullSet varchar(255), route varchar(255) not null, primary key (topiaId));
    
    163 163
     create table ps_logbook.activity_observedSystem (activity varchar(255) not null, observedSystem varchar(255) not null, primary key (activity, observedSystem));
    
    164 164
     create table ps_logbook.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), species varchar(255) not null, weightCategory varchar(255), speciesFate varchar(255) not null, weight numeric, count integer, weightMeasureMethod varchar(255), well varchar(255), activity varchar(255) not null, activity_idx integer, primary key (topiaId));
    
    165
    -create table ps_logbook.floatingObject (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), objectOperation varchar(255), supportVesselName varchar(32), computedWhenArrivingBiodegradable varchar(255), computedWhenArrivingNonEntangling varchar(255), computedWhenArrivingSimplifiedObjectType varchar(255), computedWhenLeavingBiodegradable varchar(255), computedWhenLeavingNonEntangling varchar(255), computedWhenLeavingSimplifiedObjectType varchar(255), activity varchar(255) not null, primary key (topiaId));
    
    165
    +create table ps_logbook.floatingObject (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), objectOperation varchar(255) not null, supportVesselName varchar(32), computedWhenArrivingBiodegradable varchar(255), computedWhenArrivingNonEntangling varchar(255), computedWhenArrivingSimplifiedObjectType varchar(255), computedWhenLeavingBiodegradable varchar(255), computedWhenLeavingNonEntangling varchar(255), computedWhenLeavingSimplifiedObjectType varchar(255), activity varchar(255) not null, primary key (topiaId));
    
    166 166
     create table ps_logbook.floatingObjectPart (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp not null, lastUpdateDate timestamp default CURRENT_TIMESTAMP not null, homeId varchar(255), whenArriving varchar(255), whenLeaving varchar(255), objectMaterial varchar(255) not null, floatingObject varchar(255) not null, primary key (topiaId));
    
    167 167
     create table ps_logbook.informationSource (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));
    
    168 168
     create table ps_logbook.route (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), date date not null, timeAtSea integer, fishingTime integer, trip varchar(255) not null, primary key (topiaId));
    
    ... ... @@ -184,7 +184,7 @@ create table ps_observation.activity (topiaId varchar(255) not null, topiaVersio
    184 184
     create table ps_observation.activity_observedSystem (activity varchar(255) not null, observedSystem varchar(255) not null, primary key (activity, observedSystem));
    
    185 185
     create table ps_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), catchWeight numeric, catchWeightComputedSource integer, minWeight numeric, meanWeight numeric, maxWeight numeric, meanWeightComputedSource integer, meanLength numeric, meanLengthComputedSource integer, totalCount integer, totalCountComputedSource integer, well varchar(255), reasonForDiscard varchar(255), informationSource varchar(255) not null, species varchar(255) not null, weightMeasureMethod varchar(255), sizeMeasureMethod varchar(255), speciesFate varchar(255) not null, set varchar(255) not null, set_idx integer, primary key (topiaId));
    
    186 186
     create table ps_observation.detectionMode (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));
    
    187
    -create table ps_observation.floatingObject (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), objectOperation varchar(255), supportVesselName varchar(32), computedWhenArrivingBiodegradable varchar(255), computedWhenArrivingNonEntangling varchar(255), computedWhenArrivingSimplifiedObjectType varchar(255), computedWhenLeavingBiodegradable varchar(255), computedWhenLeavingNonEntangling varchar(255), computedWhenLeavingSimplifiedObjectType varchar(255), activity varchar(255) not null, primary key (topiaId));
    
    187
    +create table ps_observation.floatingObject (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), objectOperation varchar(255) not null, supportVesselName varchar(32), computedWhenArrivingBiodegradable varchar(255), computedWhenArrivingNonEntangling varchar(255), computedWhenArrivingSimplifiedObjectType varchar(255), computedWhenLeavingBiodegradable varchar(255), computedWhenLeavingNonEntangling varchar(255), computedWhenLeavingSimplifiedObjectType varchar(255), activity varchar(255) not null, primary key (topiaId));
    
    188 188
     create table ps_observation.floatingObjectPart (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp not null, lastUpdateDate timestamp default CURRENT_TIMESTAMP not null, homeId varchar(255), whenArriving varchar(255), whenLeaving varchar(255), objectMaterial varchar(255) not null, floatingObject varchar(255) not null, primary key (topiaId));
    
    189 189
     create table ps_observation.informationSource (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));
    
    190 190
     create table ps_observation.nonTargetCatchRelease (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), length numeric, count integer not null, brailNumber integer, acquisitionMode integer, species varchar(255) not null, status varchar(255) not null, sex varchar(255) not null, speciesGroupReleaseMode varchar(255) not null, conformity varchar(255), handlingPlace varchar(255), releasingTime varchar(255), sizeMeasureMethod varchar(255), set varchar(255) not null, set_idx integer, primary key (topiaId));
    

  • core/persistence/resources/src/main/resources/fr/ird/observe/entities/data/ps/logbook/FloatingObject/validation-create.json
    ... ... @@ -18,7 +18,8 @@
    18 18
       },
    
    19 19
       "objectOperation": {
    
    20 20
         "errors": [
    
    21
    -      "check if referential objectOperation is disabled (only if validation is strong)"
    
    21
    +      "check if referential objectOperation is disabled (only if validation is strong)",
    
    22
    +      "objectOperation is mandatory"
    
    22 23
         ],
    
    23 24
         "warnings": [
    
    24 25
           "check if referential objectOperation is disabled (only if validation is not strong)"
    

  • core/persistence/resources/src/main/resources/fr/ird/observe/entities/data/ps/logbook/FloatingObject/validation-update.json
    ... ... @@ -18,7 +18,8 @@
    18 18
       },
    
    19 19
       "objectOperation": {
    
    20 20
         "errors": [
    
    21
    -      "check if referential objectOperation is disabled (only if validation is strong)"
    
    21
    +      "check if referential objectOperation is disabled (only if validation is strong)",
    
    22
    +      "objectOperation is mandatory"
    
    22 23
         ],
    
    23 24
         "warnings": [
    
    24 25
           "check if referential objectOperation is disabled (only if validation is not strong)"
    

  • core/persistence/resources/src/main/resources/fr/ird/observe/entities/data/ps/observation/FloatingObject/validation-create.json
    ... ... @@ -18,7 +18,8 @@
    18 18
       },
    
    19 19
       "objectOperation": {
    
    20 20
         "errors": [
    
    21
    -      "check if referential objectOperation is disabled (only if validation is strong)"
    
    21
    +      "check if referential objectOperation is disabled (only if validation is strong)",
    
    22
    +      "objectOperation is mandatory"
    
    22 23
         ],
    
    23 24
         "warnings": [
    
    24 25
           "check if referential objectOperation is disabled (only if validation is not strong)"
    

  • core/persistence/resources/src/main/resources/fr/ird/observe/entities/data/ps/observation/FloatingObject/validation-update.json
    ... ... @@ -18,7 +18,8 @@
    18 18
       },
    
    19 19
       "objectOperation": {
    
    20 20
         "errors": [
    
    21
    -      "check if referential objectOperation is disabled (only if validation is strong)"
    
    21
    +      "check if referential objectOperation is disabled (only if validation is strong)",
    
    22
    +      "objectOperation is mandatory"
    
    22 23
         ],
    
    23 24
         "warnings": [
    
    24 25
           "check if referential objectOperation is disabled (only if validation is not strong)"
    

  • model/src/main/models/Observe/dto/attribute/notNull.properties
    ... ... @@ -147,6 +147,7 @@ data.ps.logbook.Activity.attribute.observedSystem=true
    147 147
     data.ps.logbook.Activity.attribute.vesselActivity=true
    
    148 148
     data.ps.logbook.Catch.attribute.species=true
    
    149 149
     data.ps.logbook.Catch.attribute.speciesFate=true
    
    150
    +data.ps.logbook.FloatingObject.attribute.objectOperation=true
    
    150 151
     data.ps.logbook.FloatingObjectPart.attribute.objectMaterial=true
    
    151 152
     data.ps.logbook.Route.attribute.date=true
    
    152 153
     data.ps.logbook.Sample.attribute.number=true
    
    ... ... @@ -181,6 +182,7 @@ data.ps.observation.Activity.attribute.vesselActivity=true
    181 182
     data.ps.observation.Catch.attribute.informationSource=true
    
    182 183
     data.ps.observation.Catch.attribute.species=true
    
    183 184
     data.ps.observation.Catch.attribute.speciesFate=true
    
    185
    +data.ps.observation.FloatingObject.attribute.objectOperation=true
    
    184 186
     data.ps.observation.FloatingObjectPart.attribute.objectMaterial=true
    
    185 187
     data.ps.observation.NonTargetCatchRelease.attribute.count=true
    
    186 188
     data.ps.observation.NonTargetCatchRelease.attribute.sex=true
    

  • model/src/main/models/Observe/persistence/attribute/notNull.properties
    ... ... @@ -151,6 +151,7 @@ data.ps.logbook.Activity.attribute.vesselActivity=true
    151 151
     data.ps.logbook.Activity.attribute.vmsDivergent=true
    
    152 152
     data.ps.logbook.Catch.attribute.species=true
    
    153 153
     data.ps.logbook.Catch.attribute.speciesFate=true
    
    154
    +data.ps.logbook.FloatingObject.attribute.objectOperation=true
    
    154 155
     data.ps.logbook.FloatingObjectPart.attribute.objectMaterial=true
    
    155 156
     data.ps.logbook.Route.attribute.date=true
    
    156 157
     data.ps.logbook.Sample.attribute.number=true
    
    ... ... @@ -184,6 +185,7 @@ data.ps.observation.Activity.attribute.vesselActivity=true
    184 185
     data.ps.observation.Catch.attribute.informationSource=true
    
    185 186
     data.ps.observation.Catch.attribute.species=true
    
    186 187
     data.ps.observation.Catch.attribute.speciesFate=true
    
    188
    +data.ps.observation.FloatingObject.attribute.objectOperation=true
    
    187 189
     data.ps.observation.FloatingObjectPart.attribute.objectMaterial=true
    
    188 190
     data.ps.observation.NonTargetCatchRelease.attribute.count=true
    
    189 191
     data.ps.observation.NonTargetCatchRelease.attribute.sex=true
    

  • server/runner/src/main/webResources/doc/api/public/data/ps/logbook/FloatingObject/validation-create-error.xml
    ... ... @@ -60,6 +60,11 @@
    60 60
       </field>
    
    61 61
     
    
    62 62
       <field name="objectOperation">
    
    63
    +    <!-- objectOperation is mandatory -->
    
    64
    +    <field-validator type="mandatory" short-circuit="true">
    
    65
    +      <message/>
    
    66
    +    </field-validator>
    
    67
    +
    
    63 68
         <!-- check if referential objectOperation is disabled (only if validation is strong) -->
    
    64 69
         <field-validator type="checkDisabledReferentialOnErrorScope">
    
    65 70
           <message/>
    

  • server/runner/src/main/webResources/doc/api/public/data/ps/logbook/FloatingObject/validation-create.json
    ... ... @@ -18,7 +18,8 @@
    18 18
       },
    
    19 19
       "objectOperation": {
    
    20 20
         "errors": [
    
    21
    -      "check if referential objectOperation is disabled (only if validation is strong)"
    
    21
    +      "check if referential objectOperation is disabled (only if validation is strong)",
    
    22
    +      "objectOperation is mandatory"
    
    22 23
         ],
    
    23 24
         "warnings": [
    
    24 25
           "check if referential objectOperation is disabled (only if validation is not strong)"
    

  • server/runner/src/main/webResources/doc/api/public/data/ps/logbook/FloatingObject/validation-update-error.xml
    ... ... @@ -60,6 +60,11 @@
    60 60
       </field>
    
    61 61
     
    
    62 62
       <field name="objectOperation">
    
    63
    +    <!-- objectOperation is mandatory -->
    
    64
    +    <field-validator type="mandatory" short-circuit="true">
    
    65
    +      <message/>
    
    66
    +    </field-validator>
    
    67
    +
    
    63 68
         <!-- check if referential objectOperation is disabled (only if validation is strong) -->
    
    64 69
         <field-validator type="checkDisabledReferentialOnErrorScope">
    
    65 70
           <message/>
    

  • server/runner/src/main/webResources/doc/api/public/data/ps/logbook/FloatingObject/validation-update.json
    ... ... @@ -18,7 +18,8 @@
    18 18
       },
    
    19 19
       "objectOperation": {
    
    20 20
         "errors": [
    
    21
    -      "check if referential objectOperation is disabled (only if validation is strong)"
    
    21
    +      "check if referential objectOperation is disabled (only if validation is strong)",
    
    22
    +      "objectOperation is mandatory"
    
    22 23
         ],
    
    23 24
         "warnings": [
    
    24 25
           "check if referential objectOperation is disabled (only if validation is not strong)"
    

  • server/runner/src/main/webResources/doc/api/public/data/ps/observation/FloatingObject/validation-create-error.xml
    ... ... @@ -60,6 +60,11 @@
    60 60
       </field>
    
    61 61
     
    
    62 62
       <field name="objectOperation">
    
    63
    +    <!-- objectOperation is mandatory -->
    
    64
    +    <field-validator type="mandatory" short-circuit="true">
    
    65
    +      <message/>
    
    66
    +    </field-validator>
    
    67
    +
    
    63 68
         <!-- check if referential objectOperation is disabled (only if validation is strong) -->
    
    64 69
         <field-validator type="checkDisabledReferentialOnErrorScope">
    
    65 70
           <message/>
    

  • server/runner/src/main/webResources/doc/api/public/data/ps/observation/FloatingObject/validation-create.json
    ... ... @@ -18,7 +18,8 @@
    18 18
       },
    
    19 19
       "objectOperation": {
    
    20 20
         "errors": [
    
    21
    -      "check if referential objectOperation is disabled (only if validation is strong)"
    
    21
    +      "check if referential objectOperation is disabled (only if validation is strong)",
    
    22
    +      "objectOperation is mandatory"
    
    22 23
         ],
    
    23 24
         "warnings": [
    
    24 25
           "check if referential objectOperation is disabled (only if validation is not strong)"
    

  • server/runner/src/main/webResources/doc/api/public/data/ps/observation/FloatingObject/validation-update-error.xml
    ... ... @@ -60,6 +60,11 @@
    60 60
       </field>
    
    61 61
     
    
    62 62
       <field name="objectOperation">
    
    63
    +    <!-- objectOperation is mandatory -->
    
    64
    +    <field-validator type="mandatory" short-circuit="true">
    
    65
    +      <message/>
    
    66
    +    </field-validator>
    
    67
    +
    
    63 68
         <!-- check if referential objectOperation is disabled (only if validation is strong) -->
    
    64 69
         <field-validator type="checkDisabledReferentialOnErrorScope">
    
    65 70
           <message/>
    

  • server/runner/src/main/webResources/doc/api/public/data/ps/observation/FloatingObject/validation-update.json
    ... ... @@ -18,7 +18,8 @@
    18 18
       },
    
    19 19
       "objectOperation": {
    
    20 20
         "errors": [
    
    21
    -      "check if referential objectOperation is disabled (only if validation is strong)"
    
    21
    +      "check if referential objectOperation is disabled (only if validation is strong)",
    
    22
    +      "objectOperation is mandatory"
    
    22 23
         ],
    
    23 24
         "warnings": [
    
    24 25
           "check if referential objectOperation is disabled (only if validation is not strong)"