Observe-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
February 2023
- 1 participants
- 55 discussions
[Git][ultreiaio/ird-observe][feature/issue_2619] 10 commits: PS-LocalMarket-Batch (use in form only ids for available packaging ids)
by Tony CHEMIT (@tchemit) 06 Feb '23
by Tony CHEMIT (@tchemit) 06 Feb '23
06 Feb '23
Tony CHEMIT pushed to branch feature/issue_2619 at ultreiaio / ird-observe
Commits:
3ed06a75 by Tony Chemit at 2023-02-05T09:41:41+01:00
PS-LocalMarket-Batch (use in form only ids for available packaging ids)
- - - - -
611a18ca by Tony Chemit at 2023-02-05T10:16:45+01:00
Model - Add Buyer referential and use it in Batch
- - - - -
69698e8a by Tony Chemit at 2023-02-05T10:16:45+01:00
Dto-decoration + i18n - Add Buyer referential and use it in Batch
- - - - -
3b90dc51 by Tony Chemit at 2023-02-05T10:16:45+01:00
Api validation - Add Buyer referential and use it in Batch
- - - - -
82f40ac7 by Tony Chemit at 2023-02-05T10:17:41+01:00
Persistence java - Add Buyer referential and use it in Batch
- - - - -
48ddb957 by Tony Chemit at 2023-02-05T10:17:41+01:00
Persistence decoration - Add Buyer referential and use it in Batch
- - - - -
2b20ec90 by Tony Chemit at 2023-02-05T12:11:56+01:00
Persistence migration - Add Buyer referential and use it in Batch
- - - - -
02be37e2 by Tony Chemit at 2023-02-05T12:11:56+01:00
Server mapping - Add Buyer referential and use it in Batch
- - - - -
79a926b4 by Tony Chemit at 2023-02-05T12:11:56+01:00
Client - Add Buyer referential and use it in Batch
- - - - -
0e97faea by Tony Chemit at 2023-02-05T12:11:56+01:00
Test - Add Buyer referential and use it in Batch
- - - - -
30 changed files:
- client/datasource/editor/ps/src/main/i18n/getters/jaxx.getter
- client/datasource/editor/ps/src/main/i18n/getters/navigation.getter
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/localmarket/TripBatchUI.jaxx
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/localmarket/TripBatchUIModelStates.java
- + client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/referential/localmarket/BuyerUI.jaxx
- + client/datasource/editor/ps/src/main/resources/fr/ird/observe/client/datasource/editor/ps/referential/localmarket/BuyerUINavigationNode.scope
- client/datasource/editor/ps/src/main/resources/fr/ird/observe/client/datasource/editor/ps/referential/localmarket/ReferentialHomeUINavigationNode.scope
- core/api/dto-decoration/src/main/i18n/getters/labels.getter
- + core/api/dto-decoration/src/main/java/fr/ird/observe/dto/referential/ps/localmarket/BuyerDtoDecoratorDefinition.java
- + core/api/dto-decoration/src/main/java/fr/ird/observe/dto/referential/ps/localmarket/BuyerDtoLongDecoratorDefinition.java
- + core/api/dto-decoration/src/main/java/fr/ird/observe/dto/referential/ps/localmarket/BuyerReferenceDecoratorDefinition.java
- + core/api/dto-decoration/src/main/java/fr/ird/observe/dto/referential/ps/localmarket/BuyerReferenceLongDecoratorDefinition.java
- core/api/dto-decoration/src/main/resources/META-INF/i18n/Observe-labels.properties
- core/api/services/src/main/resources/META-INF/services/Observe/DifferentialMetaModel.json
- core/api/tree/src/main/resources/META-INF/mapping/ObserveDtoToNavigationTreePathMapping.json
- core/api/tree/src/main/resources/META-INF/mapping/ObserveDtoToSelectionTreePathMapping.json
- core/api/tree/src/test/resources/fixtures/api-tree.properties
- core/api/validation/src/main/filtered-resources/META-INF/validators/validation.json
- core/api/validation/src/main/i18n/getters/eugene.getter
- core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/localmarket/BatchDto-create-error-validation.xml
- core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/localmarket/BatchDto-create-warning-validation.xml
- core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/localmarket/BatchDto-update-error-validation.xml
- core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/localmarket/BatchDto-update-warning-validation.xml
- core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/localmarket/TripBatchDto-create-error-validation.xml
- core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/localmarket/TripBatchDto-update-error-validation.xml
- + core/api/validation/src/main/resources/fr/ird/observe/dto/referential/ps/localmarket/BuyerDto-create-error-validation.xml
- core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/localmarket/TripBatchDto-create-warning-validation.xml → core/api/validation/src/main/resources/fr/ird/observe/dto/referential/ps/localmarket/BuyerDto-create-warning-validation.xml
- + core/api/validation/src/main/resources/fr/ird/observe/dto/referential/ps/localmarket/BuyerDto-update-error-validation.xml
- core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/localmarket/TripBatchDto-update-warning-validation.xml → core/api/validation/src/main/resources/fr/ird/observe/dto/referential/ps/localmarket/BuyerDto-update-warning-validation.xml
- core/api/validation/src/test/resources/fixtures/api-validation.properties
The diff was not included because it is too large.
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/8093a1dd055bcc5492532c08…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/8093a1dd055bcc5492532c08…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop] PS-LocalMarket-Batch (use in form only ids for available packaging ids)
by Tony CHEMIT (@tchemit) 05 Feb '23
by Tony CHEMIT (@tchemit) 05 Feb '23
05 Feb '23
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
3ed06a75 by Tony Chemit at 2023-02-05T09:41:41+01:00
PS-LocalMarket-Batch (use in form only ids for available packaging ids)
- - - - -
10 changed files:
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/localmarket/TripBatchUIModelStates.java
- core/api/validation/src/main/filtered-resources/META-INF/validators/validation.json
- core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/localmarket/TripBatchDto-create-error-validation.xml
- − core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/localmarket/TripBatchDto-create-warning-validation.xml
- core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/localmarket/TripBatchDto-update-error-validation.xml
- − core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/localmarket/TripBatchDto-update-warning-validation.xml
- core/persistence/java/src/main/java/fr/ird/observe/entities/data/ps/common/TripBatchSpi.java
- model/src/main/models/Observe/dto/23-data-ps-localmarket.model
- model/src/main/models/Observe/dto/attribute/ordered.properties
- model/src/main/models/Observe/dto/attribute/unique.properties
Changes:
=====================================
client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/localmarket/TripBatchUIModelStates.java
=====================================
@@ -36,7 +36,6 @@ import fr.ird.observe.dto.data.ps.localmarket.consolidate.BatchConsolidateReques
import fr.ird.observe.dto.data.ps.localmarket.consolidate.BatchConsolidateResult;
import fr.ird.observe.dto.form.Form;
import fr.ird.observe.dto.reference.DataDtoReferenceSet;
-import fr.ird.observe.dto.reference.DtoReferenceCollection;
import fr.ird.observe.dto.referential.ps.localmarket.PackagingReference;
import fr.ird.observe.navigation.id.Project;
import fr.ird.observe.services.ObserveServicesProvider;
@@ -47,8 +46,8 @@ import org.apache.logging.log4j.Logger;
import java.beans.PropertyChangeEvent;
import java.util.LinkedHashSet;
-import java.util.LinkedList;
import java.util.Set;
+import java.util.stream.Collectors;
@GenerateJavaBeanDefinition
public class TripBatchUIModelStates extends GeneratedTripBatchUIModelStates {
@@ -124,15 +123,15 @@ public class TripBatchUIModelStates extends GeneratedTripBatchUIModelStates {
@Override
protected void loadReferentialCacheOnOpenForm(Form<TripBatchDto> form) {
- if (getReferenceCache().isHideDisabledReferential()) {
- form.getObject().setAvailablePackagings(new LinkedHashSet<>(DtoReferenceCollection.filterEnabled(form.getObject().getAvailablePackagings())));
- }
getReferenceCache().setDataReferenceSet(BatchDto.PROPERTY_SURVEY, DataDtoReferenceSet.of(SurveyReference.class, form.getObject().getLocalmarketSurvey(), null));
super.loadReferentialCacheOnOpenForm(form);
}
protected ReferencesFilter<PackagingReference> newPackagingList() {
- return (dto, incomingReferences) -> new LinkedList<>(((TripBatchDto) dto).getAvailablePackagings());
+ return (dto, incomingReferences) -> {
+ LinkedHashSet<String> availablePackagingIds = ((TripBatchDto) dto).getAvailablePackagingIds();
+ return incomingReferences.stream().filter(e -> availablePackagingIds.contains(e.getId())).collect(Collectors.toList());
+ };
}
}
=====================================
core/api/validation/src/main/filtered-resources/META-INF/validators/validation.json
=====================================
@@ -9398,69 +9398,29 @@
"scope": "ERROR",
"context": "create",
"fields": [
- {
- "name": "availablePackagings",
- "comments": [
- "check if referential availablePackagings is disabled (only if validation is strong)"
- ]
- },
{
"name": "comment",
"comments": [
"comment (if not null) is not a blank string",
- "comment is required if one of the selected referential requires it (availablePackagings)",
"comment length <= 8192"
]
}
]
},
- {
- "type": "fr.ird.observe.dto.data.ps.localmarket.TripBatchDto",
- "scope": "WARNING",
- "context": "create",
- "fields": [
- {
- "name": "availablePackagings",
- "comments": [
- "check if referential availablePackagings is disabled (only if validation is not strong)"
- ]
- }
- ]
- },
{
"type": "fr.ird.observe.dto.data.ps.localmarket.TripBatchDto",
"scope": "ERROR",
"context": "update",
"fields": [
- {
- "name": "availablePackagings",
- "comments": [
- "check if referential availablePackagings is disabled (only if validation is strong)"
- ]
- },
{
"name": "comment",
"comments": [
"comment (if not null) is not a blank string",
- "comment is required if one of the selected referential requires it (availablePackagings)",
"comment length <= 8192"
]
}
]
},
- {
- "type": "fr.ird.observe.dto.data.ps.localmarket.TripBatchDto",
- "scope": "WARNING",
- "context": "update",
- "fields": [
- {
- "name": "availablePackagings",
- "comments": [
- "check if referential availablePackagings is disabled (only if validation is not strong)"
- ]
- }
- ]
- },
{
"type": "fr.ird.observe.dto.data.ps.localmarket.WellIdDto",
"scope": "ERROR",
=====================================
core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/localmarket/TripBatchDto-create-error-validation.xml
=====================================
@@ -24,13 +24,6 @@
"http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd">
<validators>
- <field name="availablePackagings">
- <!-- check if referential availablePackagings is disabled (only if validation is strong) -->
- <field-validator type="checkDisabledReferentialOnErrorScope">
- <message/>
- </field-validator>
- </field>
-
<field name="comment">
<!-- comment (if not null) is not a blank string -->
<field-validator type="notBlankString" short-circuit="true">
@@ -42,12 +35,6 @@
<param name="maxLength">8192</param>
<message/>
</field-validator>
-
- <!-- comment is required if one of the selected referential requires it (availablePackagings) -->
- <field-validator type="commentNeeded">
- <param name="propertyNames">availablePackagings</param>
- <message/>
- </field-validator>
</field>
</validators>
=====================================
core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/localmarket/TripBatchDto-create-warning-validation.xml deleted
=====================================
@@ -1,34 +0,0 @@
-<!--
- #%L
- ObServe Core :: API :: Validation
- %%
- Copyright (C) 2008 - 2023 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%
- -->
-<!DOCTYPE validators PUBLIC
- "-//Apache Struts//XWork Validator 1.0.3//EN"
- "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd">
-<validators>
-
- <field name="availablePackagings">
- <!-- check if referential availablePackagings is disabled (only if validation is not strong) -->
- <field-validator type="checkDisabledReferentialOnWarningScope">
- <message/>
- </field-validator>
- </field>
-
-</validators>
=====================================
core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/localmarket/TripBatchDto-update-error-validation.xml
=====================================
@@ -24,13 +24,6 @@
"http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd">
<validators>
- <field name="availablePackagings">
- <!-- check if referential availablePackagings is disabled (only if validation is strong) -->
- <field-validator type="checkDisabledReferentialOnErrorScope">
- <message/>
- </field-validator>
- </field>
-
<field name="comment">
<!-- comment (if not null) is not a blank string -->
<field-validator type="notBlankString" short-circuit="true">
@@ -42,12 +35,6 @@
<param name="maxLength">8192</param>
<message/>
</field-validator>
-
- <!-- comment is required if one of the selected referential requires it (availablePackagings) -->
- <field-validator type="commentNeeded">
- <param name="propertyNames">availablePackagings</param>
- <message/>
- </field-validator>
</field>
</validators>
=====================================
core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/localmarket/TripBatchDto-update-warning-validation.xml deleted
=====================================
@@ -1,34 +0,0 @@
-<!--
- #%L
- ObServe Core :: API :: Validation
- %%
- Copyright (C) 2008 - 2023 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%
- -->
-<!DOCTYPE validators PUBLIC
- "-//Apache Struts//XWork Validator 1.0.3//EN"
- "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd">
-<validators>
-
- <field name="availablePackagings">
- <!-- check if referential availablePackagings is disabled (only if validation is not strong) -->
- <field-validator type="checkDisabledReferentialOnWarningScope">
- <message/>
- </field-validator>
- </field>
-
-</validators>
=====================================
core/persistence/java/src/main/java/fr/ird/observe/entities/data/ps/common/TripBatchSpi.java
=====================================
@@ -25,7 +25,6 @@ package fr.ird.observe.entities.data.ps.common;
import fr.ird.observe.dto.data.ps.localmarket.TripBatchDto;
import fr.ird.observe.dto.form.Form;
import fr.ird.observe.dto.referential.ReferentialLocale;
-import fr.ird.observe.dto.referential.ps.localmarket.PackagingReference;
import fr.ird.observe.entities.referential.common.Harbour;
import fr.ird.observe.entities.referential.ps.localmarket.Packaging;
import fr.ird.observe.spi.service.ServiceContext;
@@ -39,8 +38,8 @@ public class TripBatchSpi extends GeneratedTripBatchSpi {
@Override
public void loadForm(ServiceContext context, String id, Trip parent, Form<TripBatchDto> form) {
- LinkedHashSet<PackagingReference> availablePackaging = getPackaging(context, parent);
- form.getObject().setAvailablePackagings(availablePackaging);
+ LinkedHashSet<String> availablePackagingIds = getAvailablePackagingIds(context, parent);
+ form.getObject().setAvailablePackagingIds(availablePackagingIds);
}
@Override
@@ -55,14 +54,14 @@ public class TripBatchSpi extends GeneratedTripBatchSpi {
entity.setLogbookComment(dto.getComment());
}
- protected LinkedHashSet<PackagingReference> getPackaging(ServiceContext context, Trip trip) {
+ protected LinkedHashSet<String> getAvailablePackagingIds(ServiceContext context, Trip trip) {
Harbour landingHarbour = trip.getLandingHarbour();
Date date = trip.getEndDate();
try (Stream<Packaging> stream = Packaging.getDao(context).streamAll()) {
- return Packaging.toReferenceSet(context.getReferentialLocale(),
- stream.filter(p -> p.acceptHarbour(landingHarbour) && p.acceptDate(date)),
- null,
- null).stream().collect(Collectors.toCollection(LinkedHashSet::new));
+ return stream
+ .filter(p -> p.acceptHarbour(landingHarbour) && p.acceptDate(date))
+ .map(Packaging::getTopiaId)
+ .collect(Collectors.toCollection(LinkedHashSet::new));
}
}
=====================================
model/src/main/models/Observe/dto/23-data-ps-localmarket.model
=====================================
@@ -48,7 +48,7 @@ species {*:*} referential.common.SpeciesReference
data.ps.localmarket.TripBatch > data.Container >> data.SkipSimpleMove
localmarketBatch + {*} data.ps.localmarket.Batch
localmarketSurvey + {*} data.ps.localmarket.SurveyReference
-availablePackagings + {*} referential.ps.localmarket.PackagingReference
+availablePackagingIds + {*} String
data.ps.localmarket.WellId > Business >> data.InlineDataDto data.NotEntityDto data.WellIdAware
well String
=====================================
model/src/main/models/Observe/dto/attribute/ordered.properties
=====================================
@@ -43,7 +43,7 @@ data.ps.localmarket.SampleSpecies.attribute.sampleSpeciesMeasure=true
data.ps.localmarket.Survey.attribute.availableBatches=true
data.ps.localmarket.Survey.attribute.batches=true
data.ps.localmarket.Survey.attribute.surveyPart=true
-data.ps.localmarket.TripBatch.attribute.availablePackagings=true
+data.ps.localmarket.TripBatch.attribute.availablePackagingIds=true
data.ps.localmarket.TripBatch.attribute.localmarketBatch=true
data.ps.localmarket.TripBatch.attribute.localmarketSurvey=true
data.ps.logbook.ActivityCatch.attribute.catches=true
=====================================
model/src/main/models/Observe/dto/attribute/unique.properties
=====================================
@@ -33,7 +33,7 @@ data.ps.common.Trip.attribute.routeLogbook=true
data.ps.common.Trip.attribute.routeObs=true
data.ps.common.Trip.attribute.well=true
data.ps.localmarket.Sample.attribute.well=true
-data.ps.localmarket.TripBatch.attribute.availablePackagings=true
+data.ps.localmarket.TripBatch.attribute.availablePackagingIds=true
data.ps.localmarket.TripBatch.attribute.localmarketSurvey=true
data.ps.logbook.Route.attribute.activity=true
data.ps.observation.Activity.attribute.nonTargetCatchSpecies=true
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/3ed06a7560ef2faed00362a82…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/3ed06a7560ef2faed00362a82…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop-9.0.x] PS-LocalMarket-Batch (use in form only ids for available packaging ids)
by Tony CHEMIT (@tchemit) 05 Feb '23
by Tony CHEMIT (@tchemit) 05 Feb '23
05 Feb '23
Tony CHEMIT pushed to branch develop-9.0.x at ultreiaio / ird-observe
Commits:
70762198 by Tony Chemit at 2023-02-05T09:41:21+01:00
PS-LocalMarket-Batch (use in form only ids for available packaging ids)
- - - - -
10 changed files:
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/localmarket/TripBatchUIModelStates.java
- core/api/validation/src/main/filtered-resources/META-INF/validators/validation.json
- core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/localmarket/TripBatchDto-create-error-validation.xml
- − core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/localmarket/TripBatchDto-create-warning-validation.xml
- core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/localmarket/TripBatchDto-update-error-validation.xml
- − core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/localmarket/TripBatchDto-update-warning-validation.xml
- core/persistence/java/src/main/java/fr/ird/observe/entities/data/ps/common/TripBatchSpi.java
- model/src/main/models/Observe/dto/23-data-ps-localmarket.model
- model/src/main/models/Observe/dto/attribute/ordered.properties
- model/src/main/models/Observe/dto/attribute/unique.properties
Changes:
=====================================
client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/localmarket/TripBatchUIModelStates.java
=====================================
@@ -36,7 +36,6 @@ import fr.ird.observe.dto.data.ps.localmarket.consolidate.BatchConsolidateReques
import fr.ird.observe.dto.data.ps.localmarket.consolidate.BatchConsolidateResult;
import fr.ird.observe.dto.form.Form;
import fr.ird.observe.dto.reference.DataDtoReferenceSet;
-import fr.ird.observe.dto.reference.DtoReferenceCollection;
import fr.ird.observe.dto.referential.ps.localmarket.PackagingReference;
import fr.ird.observe.navigation.id.Project;
import fr.ird.observe.services.ObserveServicesProvider;
@@ -47,8 +46,8 @@ import org.apache.logging.log4j.Logger;
import java.beans.PropertyChangeEvent;
import java.util.LinkedHashSet;
-import java.util.LinkedList;
import java.util.Set;
+import java.util.stream.Collectors;
@GenerateJavaBeanDefinition
public class TripBatchUIModelStates extends GeneratedTripBatchUIModelStates {
@@ -124,15 +123,15 @@ public class TripBatchUIModelStates extends GeneratedTripBatchUIModelStates {
@Override
protected void loadReferentialCacheOnOpenForm(Form<TripBatchDto> form) {
- if (getReferenceCache().isHideDisabledReferential()) {
- form.getObject().setAvailablePackagings(new LinkedHashSet<>(DtoReferenceCollection.filterEnabled(form.getObject().getAvailablePackagings())));
- }
getReferenceCache().setDataReferenceSet(BatchDto.PROPERTY_SURVEY, DataDtoReferenceSet.of(SurveyReference.class, form.getObject().getLocalmarketSurvey(), null));
super.loadReferentialCacheOnOpenForm(form);
}
protected ReferencesFilter<PackagingReference> newPackagingList() {
- return (dto, incomingReferences) -> new LinkedList<>(((TripBatchDto) dto).getAvailablePackagings());
+ return (dto, incomingReferences) -> {
+ LinkedHashSet<String> availablePackagingIds = ((TripBatchDto) dto).getAvailablePackagingIds();
+ return incomingReferences.stream().filter(e -> availablePackagingIds.contains(e.getId())).collect(Collectors.toList());
+ };
}
}
=====================================
core/api/validation/src/main/filtered-resources/META-INF/validators/validation.json
=====================================
@@ -9398,69 +9398,29 @@
"scope": "ERROR",
"context": "create",
"fields": [
- {
- "name": "availablePackagings",
- "comments": [
- "check if referential availablePackagings is disabled (only if validation is strong)"
- ]
- },
{
"name": "comment",
"comments": [
"comment (if not null) is not a blank string",
- "comment is required if one of the selected referential requires it (availablePackagings)",
"comment length <= 8192"
]
}
]
},
- {
- "type": "fr.ird.observe.dto.data.ps.localmarket.TripBatchDto",
- "scope": "WARNING",
- "context": "create",
- "fields": [
- {
- "name": "availablePackagings",
- "comments": [
- "check if referential availablePackagings is disabled (only if validation is not strong)"
- ]
- }
- ]
- },
{
"type": "fr.ird.observe.dto.data.ps.localmarket.TripBatchDto",
"scope": "ERROR",
"context": "update",
"fields": [
- {
- "name": "availablePackagings",
- "comments": [
- "check if referential availablePackagings is disabled (only if validation is strong)"
- ]
- },
{
"name": "comment",
"comments": [
"comment (if not null) is not a blank string",
- "comment is required if one of the selected referential requires it (availablePackagings)",
"comment length <= 8192"
]
}
]
},
- {
- "type": "fr.ird.observe.dto.data.ps.localmarket.TripBatchDto",
- "scope": "WARNING",
- "context": "update",
- "fields": [
- {
- "name": "availablePackagings",
- "comments": [
- "check if referential availablePackagings is disabled (only if validation is not strong)"
- ]
- }
- ]
- },
{
"type": "fr.ird.observe.dto.data.ps.localmarket.WellIdDto",
"scope": "ERROR",
=====================================
core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/localmarket/TripBatchDto-create-error-validation.xml
=====================================
@@ -24,13 +24,6 @@
"http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd">
<validators>
- <field name="availablePackagings">
- <!-- check if referential availablePackagings is disabled (only if validation is strong) -->
- <field-validator type="checkDisabledReferentialOnErrorScope">
- <message/>
- </field-validator>
- </field>
-
<field name="comment">
<!-- comment (if not null) is not a blank string -->
<field-validator type="notBlankString" short-circuit="true">
@@ -42,12 +35,6 @@
<param name="maxLength">8192</param>
<message/>
</field-validator>
-
- <!-- comment is required if one of the selected referential requires it (availablePackagings) -->
- <field-validator type="commentNeeded">
- <param name="propertyNames">availablePackagings</param>
- <message/>
- </field-validator>
</field>
</validators>
=====================================
core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/localmarket/TripBatchDto-create-warning-validation.xml deleted
=====================================
@@ -1,34 +0,0 @@
-<!--
- #%L
- ObServe Core :: API :: Validation
- %%
- Copyright (C) 2008 - 2023 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%
- -->
-<!DOCTYPE validators PUBLIC
- "-//Apache Struts//XWork Validator 1.0.3//EN"
- "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd">
-<validators>
-
- <field name="availablePackagings">
- <!-- check if referential availablePackagings is disabled (only if validation is not strong) -->
- <field-validator type="checkDisabledReferentialOnWarningScope">
- <message/>
- </field-validator>
- </field>
-
-</validators>
=====================================
core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/localmarket/TripBatchDto-update-error-validation.xml
=====================================
@@ -24,13 +24,6 @@
"http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd">
<validators>
- <field name="availablePackagings">
- <!-- check if referential availablePackagings is disabled (only if validation is strong) -->
- <field-validator type="checkDisabledReferentialOnErrorScope">
- <message/>
- </field-validator>
- </field>
-
<field name="comment">
<!-- comment (if not null) is not a blank string -->
<field-validator type="notBlankString" short-circuit="true">
@@ -42,12 +35,6 @@
<param name="maxLength">8192</param>
<message/>
</field-validator>
-
- <!-- comment is required if one of the selected referential requires it (availablePackagings) -->
- <field-validator type="commentNeeded">
- <param name="propertyNames">availablePackagings</param>
- <message/>
- </field-validator>
</field>
</validators>
=====================================
core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/localmarket/TripBatchDto-update-warning-validation.xml deleted
=====================================
@@ -1,34 +0,0 @@
-<!--
- #%L
- ObServe Core :: API :: Validation
- %%
- Copyright (C) 2008 - 2023 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%
- -->
-<!DOCTYPE validators PUBLIC
- "-//Apache Struts//XWork Validator 1.0.3//EN"
- "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd">
-<validators>
-
- <field name="availablePackagings">
- <!-- check if referential availablePackagings is disabled (only if validation is not strong) -->
- <field-validator type="checkDisabledReferentialOnWarningScope">
- <message/>
- </field-validator>
- </field>
-
-</validators>
=====================================
core/persistence/java/src/main/java/fr/ird/observe/entities/data/ps/common/TripBatchSpi.java
=====================================
@@ -25,7 +25,6 @@ package fr.ird.observe.entities.data.ps.common;
import fr.ird.observe.dto.data.ps.localmarket.TripBatchDto;
import fr.ird.observe.dto.form.Form;
import fr.ird.observe.dto.referential.ReferentialLocale;
-import fr.ird.observe.dto.referential.ps.localmarket.PackagingReference;
import fr.ird.observe.entities.referential.common.Harbour;
import fr.ird.observe.entities.referential.ps.localmarket.Packaging;
import fr.ird.observe.spi.service.ServiceContext;
@@ -39,8 +38,8 @@ public class TripBatchSpi extends GeneratedTripBatchSpi {
@Override
public void loadForm(ServiceContext context, String id, Trip parent, Form<TripBatchDto> form) {
- LinkedHashSet<PackagingReference> availablePackaging = getPackaging(context, parent);
- form.getObject().setAvailablePackagings(availablePackaging);
+ LinkedHashSet<String> availablePackagingIds = getAvailablePackagingIds(context, parent);
+ form.getObject().setAvailablePackagingIds(availablePackagingIds);
}
@Override
@@ -55,14 +54,14 @@ public class TripBatchSpi extends GeneratedTripBatchSpi {
entity.setLogbookComment(dto.getComment());
}
- protected LinkedHashSet<PackagingReference> getPackaging(ServiceContext context, Trip trip) {
+ protected LinkedHashSet<String> getAvailablePackagingIds(ServiceContext context, Trip trip) {
Harbour landingHarbour = trip.getLandingHarbour();
Date date = trip.getEndDate();
try (Stream<Packaging> stream = Packaging.getDao(context).streamAll()) {
- return Packaging.toReferenceSet(context.getReferentialLocale(),
- stream.filter(p -> p.acceptHarbour(landingHarbour) && p.acceptDate(date)),
- null,
- null).stream().collect(Collectors.toCollection(LinkedHashSet::new));
+ return stream
+ .filter(p -> p.acceptHarbour(landingHarbour) && p.acceptDate(date))
+ .map(Packaging::getTopiaId)
+ .collect(Collectors.toCollection(LinkedHashSet::new));
}
}
=====================================
model/src/main/models/Observe/dto/23-data-ps-localmarket.model
=====================================
@@ -48,7 +48,7 @@ species {*:*} referential.common.SpeciesReference
data.ps.localmarket.TripBatch > data.Container >> data.SkipSimpleMove
localmarketBatch + {*} data.ps.localmarket.Batch
localmarketSurvey + {*} data.ps.localmarket.SurveyReference
-availablePackagings + {*} referential.ps.localmarket.PackagingReference
+availablePackagingIds + {*} String
data.ps.localmarket.WellId > Business >> data.InlineDataDto data.NotEntityDto data.WellIdAware
well String
=====================================
model/src/main/models/Observe/dto/attribute/ordered.properties
=====================================
@@ -42,7 +42,7 @@ data.ps.localmarket.SampleSpecies.attribute.sampleSpeciesMeasure=true
data.ps.localmarket.Survey.attribute.availableBatches=true
data.ps.localmarket.Survey.attribute.batches=true
data.ps.localmarket.Survey.attribute.surveyPart=true
-data.ps.localmarket.TripBatch.attribute.availablePackagings=true
+data.ps.localmarket.TripBatch.attribute.availablePackagingIds=true
data.ps.localmarket.TripBatch.attribute.localmarketBatch=true
data.ps.localmarket.TripBatch.attribute.localmarketSurvey=true
data.ps.logbook.ActivityCatch.attribute.catches=true
=====================================
model/src/main/models/Observe/dto/attribute/unique.properties
=====================================
@@ -32,7 +32,7 @@ data.ps.common.Trip.attribute.localmarketSurvey=true
data.ps.common.Trip.attribute.routeLogbook=true
data.ps.common.Trip.attribute.routeObs=true
data.ps.localmarket.Sample.attribute.well=true
-data.ps.localmarket.TripBatch.attribute.availablePackagings=true
+data.ps.localmarket.TripBatch.attribute.availablePackagingIds=true
data.ps.localmarket.TripBatch.attribute.localmarketSurvey=true
data.ps.logbook.Route.attribute.activity=true
data.ps.observation.Activity.attribute.nonTargetCatchSpecies=true
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/707621985b090e49389760d7d…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/707621985b090e49389760d7d…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe] Pushed new branch feature/issue_2619
by Tony CHEMIT (@tchemit) 04 Feb '23
by Tony CHEMIT (@tchemit) 04 Feb '23
04 Feb '23
Tony CHEMIT pushed new branch feature/issue_2619 at ultreiaio / ird-observe
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/tree/feature/issue_2619
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop] 6 commits: Ajout de ps_common.TransmittingBuoyOperation 99 - Closes #2617
by Tony CHEMIT (@tchemit) 02 Feb '23
by Tony CHEMIT (@tchemit) 02 Feb '23
02 Feb '23
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
d82501c5 by Tony Chemit at 2023-02-02T17:02:25+01:00
Ajout de ps_common.TransmittingBuoyOperation 99 - Closes #2617
- - - - -
94b41c7c by Tony Chemit at 2023-02-02T17:02:25+01:00
Ajout de ps_landing.Destination 28 et 29 - Closes #2618
- - - - -
25701f5c by Tony Chemit at 2023-02-02T17:02:25+01:00
Migration Avdth - Review how to add Observed system from object type code (See #2612)
- - - - -
7e1b4cad by Tony Chemit at 2023-02-02T17:02:25+01:00
Migration Avdth - Review TransmittingBuoy mappings (for operation and type) and reject import if operation not found - See #2612
- - - - -
f8f52841 by Tony Chemit at 2023-02-02T17:02:25+01:00
Migration Avdth - Review when can import Floating object - Closes #2612
- - - - -
51530561 by Tony Chemit at 2023-02-02T17:08:02+01:00
Tck service - Update Validation service test fixture
- - - - -
15 changed files:
- core/api/dto/src/main/i18n/getters/java-enumeration.getter
- core/api/dto/src/main/java/fr/ird/observe/dto/data/ps/TypeTransmittingBuoyOperation.java
- core/persistence/avdth/src/main/java/fr/ird/observe/persistence/avdth/data/logbook/FloatingObjectReader.java
- core/persistence/migration/src/main/java/fr/ird/observe/spi/migration/v9/DataSourceMigrationForVersion_9_1.java
- + core/persistence/migration/src/main/resources/db/migration/v9/9.1/05_add_referential_ps_common_TransmittingBuoyOperation_99-common.sql
- + core/persistence/migration/src/main/resources/db/migration/v9/9.1/05_add_referential_ps_common_TransmittingBuoyOperation_finalize-common.sql
- + core/persistence/migration/src/main/resources/db/migration/v9/9.1/05_add_referential_ps_landing_Destination_28-common.sql
- + core/persistence/migration/src/main/resources/db/migration/v9/9.1/05_add_referential_ps_landing_Destination_29-common.sql
- + core/persistence/migration/src/main/resources/db/migration/v9/9.1/05_add_referential_ps_landing_Destination_finalize-common.sql
- core/persistence/test/src/test/resources/fixtures/persistence/table_count/referential.properties
- 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-referentialResult.json
- model/src/main/resources/fixtures/global.properties
Changes:
=====================================
core/api/dto/src/main/i18n/getters/java-enumeration.getter
=====================================
@@ -45,4 +45,5 @@ observe.constant.TypeTransmittingBuoyOperation.grabAndChange
observe.constant.TypeTransmittingBuoyOperation.lost
observe.constant.TypeTransmittingBuoyOperation.noBuoy
observe.constant.TypeTransmittingBuoyOperation.posing
+observe.constant.TypeTransmittingBuoyOperation.unknown
observe.constant.TypeTransmittingBuoyOperation.visit
=====================================
core/api/dto/src/main/java/fr/ird/observe/dto/data/ps/TypeTransmittingBuoyOperation.java
=====================================
@@ -40,6 +40,7 @@ public enum TypeTransmittingBuoyOperation {
grab(false, "2"),
posing(false, "3"),
lost(true, "4"),
+ unknown(false, "99"),
endOfUse(true, "5"),
// two buoy
=====================================
core/persistence/avdth/src/main/java/fr/ird/observe/persistence/avdth/data/logbook/FloatingObjectReader.java
=====================================
@@ -77,8 +77,8 @@ public class FloatingObjectReader extends DataReader<FloatingObject> {
.put("1", "99")
.put("2", "99")
- .put("3", "2")
- .put("4", "2")
+ .put("3", "99")
+ .put("4", "99")
.put("5", "1")
.put("6", "4")
@@ -112,21 +112,23 @@ public class FloatingObjectReader extends DataReader<FloatingObject> {
* If for a given {@code ACTIVITE.C_OPERA}, no value is found here, this means that there is no buoy to create.
*/
public static final Map<String, String> TRANSMITTING_BUOY_OPERATION_CODE_MAPPING = ImmutableMap.<String, String>builder()
- .put("3", "1") // Visite | Visite
- .put("4", "1") // Visite | Visite
+ .put("0", "99") // Inconnu | Inconnu
+ .put("1", "99") // Inconnu | Inconnu
+ .put("2", "99") // Inconnu | Inconnu
+ .put("3", "99") // Inconnu | Inconnu
+ .put("4", "99") // Inconnu | Inconnu
.put("5", "3") // Mise à l'eau | null ou 3 Mise à l'eau
.put("6", "2") // Retrait | null ou 2 Récupération
- .put("7", "1") // Visite | Visite
- .put("10", "1")// Visite | Visite
- .put("12", "1")// Visite | Visite
- .put("13", "1")// Visite | Visite
- .put("14", "1")// Visite | Visite
- .put("15", "1")// Visite | Visite
+
+ .put("14", "99")// Inconnu | Inconnu
+ .put("22", "99") // Normalement il ne devrait pas y avoir de balise
.put("23", "3") // Mise à l'eau | 3 Mise à l'eau
.put("24", "2") // Retrait | 2 Récupération
.put("25", "3") // Visite | 3 Mise à l'eau
.put("26", "2") // Visite | 2 Récupération
.put("29", "1") // Visite | 1 Visite
+ .put("30", "99") // Inconnu | Inconnu
+ .put("31", "99") // Modif ou renfor| Inconnu
.put("32", "3") // Modif ou renfor | 3 Mise à l'eau
.put("33", "4") // Perte | 4 Perte signal
.put("34", "2") // Retrait | 2 Récupération
@@ -226,7 +228,7 @@ public class FloatingObjectReader extends DataReader<FloatingObject> {
/**
* To get associated observedSystem code from avdth ACTIVITE.C_TYP_OBJET code.
*/
- public static final Map<String, String> OBSERVED_SYSTEM_CODE_MAPPING = ImmutableMap.<String, String>builder()
+ public static final Map<String, String> OBSERVED_SYSTEM_FROM_OBJECT_OPERATION_CODE_MAPPING = ImmutableMap.<String, String>builder()
.put("1", "20")
.put("2", "20")
.put("3", "20")
@@ -286,9 +288,19 @@ public class FloatingObjectReader extends DataReader<FloatingObject> {
// Is floating object exists in avdth?
boolean floatingObjectExistsInAvdth = !objectTypeCode.equals("999");
- if (!floatingObjectExistsInAvdth && !floatingObjectCreatedByObservedSystem) {
- // If Floating object does not exist in avdth, neither need to be created by observed system,
- // Do not create the floating object (no log is required here)
+ String buoyTypeCode = resultSet.getString(31);
+ if (buoyTypeCode == null) {
+ // If null, then consider it as not found in avdth
+ buoyTypeCode = "999";
+ }
+ // IS buoy exists in avdth?
+ boolean buoyExistsInAvdth = !"999".equals(buoyTypeCode);
+
+ if (!floatingObjectExistsInAvdth && !buoyExistsInAvdth && !floatingObjectCreatedByObservedSystem) {
+ // If Floating object does not exist in avdth,
+ // neither the buoy exist in avdth,
+ // neither need to be created by observed system,
+ // Do not create the floating object (no log is required here: we are on an activity with no floating object)
reset(dataContext);
return null;
}
@@ -299,37 +311,41 @@ public class FloatingObjectReader extends DataReader<FloatingObject> {
String realObserveVesselActivityCode = CHANGED_VESSEL_ACTIVITY_CODE_BY_FLOATING_OBJECT.get(observeVesselActivityCode);
if (realObserveVesselActivityCode == null) {
- // If ObServe veseel activity does not support Floating object, reject import
+ // No extra mapping found for vessel activity, we will not import the floating object
+
List<Object> activityPrimaryKey = ActivityReader.getActivityPk(resultSet);
String activityPk = Query.primaryKeyString(activityPrimaryKey);
- String message = String.format("For AVDTH activity %s (ACTIVITE.C_OPERA %s), the ObServe vessel activity (code: %s, label: %s) does not allow FAD, we still import it... (floatingObjectExistsInAvdth? %b, floatingObjectCreatedByObservedSystem? %b).",
+ String message = String.format("For AVDTH activity %s (ACTIVITE.C_OPERA %s), the ObServe vessel activity (code: %s, label: %s) does not allow FAD, we will not import it... (floatingObjectExistsInAvdth? %b, buoyExistsInAvdth? %b, floatingObjectCreatedByObservedSystem? %b).",
activityPk,
vesselActivityCode,
vesselActivity.getCode(),
vesselActivity.getLabel1(),
floatingObjectExistsInAvdth,
+ buoyExistsInAvdth,
floatingObjectCreatedByObservedSystem);
log.warn(message);
- badVesselActivityCodes.computeIfAbsent(vesselActivityCode, MutableInt::new).increment();
-
-// // do not create the floating object
-// reset(dataContext);
-// return null;
-
- } else {
- // See https://gitlab.com/ultreiaio/ird-observe/-/issues/2612
- switch (realObserveVesselActivityCode) {
- case "101":
- // Use vessel activity 101
- activity.setVesselActivity(dataContext.getVesselActivity101());
- break;
- case "102":
- // Use vessel activity 102
- activity.setVesselActivity(dataContext.getVesselActivity102());
- break;
+ if (floatingObjectExistsInAvdth || buoyExistsInAvdth) {
+ // this will reject import (except if force import option is set on)
+ addMessage(message);
+ badVesselActivityCodes.computeIfAbsent(vesselActivityCode, MutableInt::new).increment();
}
+
+ // do not create the floating object
+ reset(dataContext);
+ return null;
}
+ // See https://gitlab.com/ultreiaio/ird-observe/-/issues/2612
+ switch (realObserveVesselActivityCode) {
+ case "101":
+ // Use vessel activity 101
+ activity.setVesselActivity(dataContext.getVesselActivity101());
+ break;
+ case "102":
+ // Use vessel activity 102
+ activity.setVesselActivity(dataContext.getVesselActivity102());
+ break;
+ }
}
FloatingObject entity = newEntity(FloatingObject.SPI);
@@ -338,15 +354,7 @@ public class FloatingObjectReader extends DataReader<FloatingObject> {
ObjectOperation objectOperation = getObjectOperationByVesselActivityCode(dataContext, vesselActivityCode);
entity.setObjectOperation(Objects.requireNonNull(objectOperation, String.format("No mapping for FloatingObject.objectOperation from ACTIVITE.C_OPERA: %s", vesselActivityCode)));
- String buoyTypeCode = resultSet.getString(31);
- if (buoyTypeCode == null) {
- // If null, then consider it as not found in avdth
- buoyTypeCode = "999";
- }
- // IS buoy exists in avdth?
- boolean buoyExistsInAvdth = !"999".equals(buoyTypeCode);
-
- ObservedSystem observedSystem = getObservedSystem(dataContext, objectTypeCode, floatingObjectExistsInAvdth, buoyExistsInAvdth);
+ ObservedSystem observedSystem = getObservedSystem(dataContext, objectOperation, objectTypeCode, floatingObjectExistsInAvdth, buoyExistsInAvdth);
if (observedSystem != null) {
activity.addObservedSystem(observedSystem);
}
@@ -445,25 +453,29 @@ public class FloatingObjectReader extends DataReader<FloatingObject> {
}
private TransmittingBuoy getBuoyFromAvdthActivity(ImportDataContext dataContext, ResultSet resultSet, String buoyTypeCode, String vesselActivityCode, ObjectOperation objectOperation, Activity activity) throws SQLException {
- boolean addCoordinate = "11".equals(objectOperation.getCode());
- TransmittingBuoyType transmittingBuoyType = getTransmittingBuoyTypeByBuoyTypeCode(dataContext, buoyTypeCode);
TransmittingBuoyOperation transmittingBuoyOperation = getTransmittingBuoyOperationByVesselActivityCode(dataContext, vesselActivityCode);
- if (transmittingBuoyOperation != null) {
- String buoyOwnershipCode = resultSet.getString(30);
- String buoyId = resultSet.getString(32);
- TransmittingBuoy transmittingBuoy = newEntity(TransmittingBuoy.SPI, transmittingBuoyCount);
- transmittingBuoy.setTransmittingBuoyOperation(transmittingBuoyOperation);
- transmittingBuoy.setTransmittingBuoyType(transmittingBuoyType);
- transmittingBuoy.setCode(buoyId);
- if (addCoordinate) {
- transmittingBuoy.setLatitude(activity.getLatitude());
- transmittingBuoy.setLongitude(activity.getLongitude());
- }
- TransmittingBuoyOwnership transmittingBuoyOwnership = getTransmittingBuoyOwnership(dataContext, buoyOwnershipCode);
- transmittingBuoy.setTransmittingBuoyOwnership(transmittingBuoyOwnership);
- return transmittingBuoy;
+ if (transmittingBuoyOperation == null) {
+ List<Object> activityPrimaryKey = ActivityReader.getActivityPk(resultSet);
+ String activityPk = Query.primaryKeyString(activityPrimaryKey);
+ // Reject import, since we can not find the buoy operation from ACTIVITE.C_OPERA
+ addMessage(String.format("For AVDTH activity: %s, could not find transmittingBuoyOperation from ACTIVITE.C_OPERA: %s", activityPk, vesselActivityCode));
+ return null;
}
- return null;
+ TransmittingBuoyType transmittingBuoyType = getTransmittingBuoyTypeByBuoyTypeCode(dataContext, buoyTypeCode);
+ String buoyOwnershipCode = resultSet.getString(30);
+ String buoyId = resultSet.getString(32);
+ TransmittingBuoy transmittingBuoy = newEntity(TransmittingBuoy.SPI, transmittingBuoyCount);
+ transmittingBuoy.setTransmittingBuoyOperation(transmittingBuoyOperation);
+ transmittingBuoy.setTransmittingBuoyType(transmittingBuoyType);
+ transmittingBuoy.setCode(buoyId);
+ boolean addCoordinate = "11".equals(objectOperation.getCode());
+ if (addCoordinate) {
+ transmittingBuoy.setLatitude(activity.getLatitude());
+ transmittingBuoy.setLongitude(activity.getLongitude());
+ }
+ TransmittingBuoyOwnership transmittingBuoyOwnership = getTransmittingBuoyOwnership(dataContext, buoyOwnershipCode);
+ transmittingBuoy.setTransmittingBuoyOwnership(transmittingBuoyOwnership);
+ return transmittingBuoy;
}
private TransmittingBuoy getBuoyFromObservedSystem(ImportDataContext dataContext) {
@@ -514,14 +526,18 @@ public class FloatingObjectReader extends DataReader<FloatingObject> {
return dataContext.getObjectOperation(Objects.requireNonNull(objectOperationCode, String.format("Can't find objectOperation with ACTIVITE.C_OPERA: %s", vesselActivityCode)));
}
- private ObservedSystem getObservedSystem(ImportDataContext dataContext, String objectTypeCode, boolean floatingObjectExistsInAvdth, boolean buoyExistsInAvdth) {
+ private ObservedSystem getObservedSystem(ImportDataContext dataContext,
+ ObjectOperation objectOperation,
+ String objectTypeCode,
+ boolean floatingObjectExistsInAvdth,
+ boolean buoyExistsInAvdth) {
if (!floatingObjectExistsInAvdth) {
- if (!buoyExistsInAvdth) {
- return dataContext.getObservedSystem0();
+ if (buoyExistsInAvdth && !objectOperation.getCode().equals("1")) {
+ return dataContext.getObservedSystem20();
}
- return dataContext.getObservedSystem20();
+ return null;
}
- String observedSystemCode = OBSERVED_SYSTEM_CODE_MAPPING.get(objectTypeCode);
+ String observedSystemCode = OBSERVED_SYSTEM_FROM_OBJECT_OPERATION_CODE_MAPPING.get(objectTypeCode);
return dataContext.getObservedSystem(observedSystemCode, false);
}
=====================================
core/persistence/migration/src/main/java/fr/ird/observe/spi/migration/v9/DataSourceMigrationForVersion_9_1.java
=====================================
@@ -89,7 +89,7 @@ public class DataSourceMigrationForVersion_9_1 extends ByMajorMigrationVersionRe
public DataSourceMigrationForVersion_9_1() {
super(Version.valueOf("9.1"), true);
ByMajorMigrationVersionResource.createResourceScriptVariables(this, "2022-09-14", "2022-09-14 00:00:00.000000");
- idFactory = new TopiaIdFactoryForBulkSupport(LocalDateTime.of(2022, 9, 14,0,0).toInstant(ZoneOffset.UTC).toEpochMilli());
+ idFactory = new TopiaIdFactoryForBulkSupport(LocalDateTime.of(2022, 9, 14, 0, 0).toInstant(ZoneOffset.UTC).toEpochMilli());
}
static class WellPlanStructure {
@@ -276,6 +276,8 @@ public class DataSourceMigrationForVersion_9_1 extends ByMajorMigrationVersionRe
if (withIds) {
addVesselActivities(executor);
+ addTransmittingBuoyOperation(executor);
+ addDestination(executor);
}
// See https://gitlab.com/ultreiaio/ird-observe/-/issues/2435
addNewTable(executor, withIds, "06", "table-common_sizemeasuremethod");
@@ -295,6 +297,34 @@ public class DataSourceMigrationForVersion_9_1 extends ByMajorMigrationVersionRe
}
}
+ private void addTransmittingBuoyOperation(MigrationVersionResourceExecutor executor) {
+ Set<String> existingCodes = executor.findMultipleResultAstSet(SqlQuery.wrap("SELECT CODE FROM ps_common.TransmittingBuoyOperation", resultSet -> resultSet.getString(1)));
+ Set<String> newCodes = new LinkedHashSet<>();
+ Stream.of("99").forEach(code -> {
+ if (!existingCodes.contains(code)) {
+ executor.addScript("05", "add_referential_ps_common_TransmittingBuoyOperation_" + code);
+ newCodes.add(code);
+ }
+ });
+ if (!newCodes.isEmpty()) {
+ executor.addScript("05", "add_referential_ps_common_TransmittingBuoyOperation_finalize");
+ }
+ }
+
+ private void addDestination(MigrationVersionResourceExecutor executor) {
+ Set<String> existingCodes = executor.findMultipleResultAstSet(SqlQuery.wrap("SELECT CODE FROM ps_landing.Destination", resultSet -> resultSet.getString(1)));
+ Set<String> newCodes = new LinkedHashSet<>();
+ Stream.of("28", "29").forEach(code -> {
+ if (!existingCodes.contains(code)) {
+ executor.addScript("05", "add_referential_ps_landing_Destination_" + code);
+ newCodes.add(code);
+ }
+ });
+ if (!newCodes.isEmpty()) {
+ executor.addScript("05", "add_referential_ps_landing_Destination_finalize");
+ }
+ }
+
private Map<String, List<WellPlanStructure>> splitByTrip(List<WellPlanStructure> existingWellPlan) {
String tripId = null;
List<WellPlanStructure> forTrip = null;
=====================================
core/persistence/migration/src/main/resources/db/migration/v9/9.1/05_add_referential_ps_common_TransmittingBuoyOperation_99-common.sql
=====================================
@@ -0,0 +1,22 @@
+---
+-- #%L
+-- ObServe Core :: Persistence :: Migration
+-- %%
+-- Copyright (C) 2008 - 2023 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%
+---
+INSERT INTO ps_common.TransmittingBuoyOperation(topiaid, topiaversion, topiacreatedate, lastupdatedate, code, uri, homeid, needcomment, status, label1, label2, label3, label4, label5, label6, label7, label8) VALUES ('fr.ird.referential.ps.common.TransmittingBuoyOperation#${REFERENTIAL_PREFIX}99', 0, ${CURRENT_DATE}, ${CURRENT_TIMESTAMP}, '99', null, null, FALSE, 0, 'Unknown', 'Inconnue', 'Unknown TODO', null, null, null, null, null);
=====================================
core/persistence/migration/src/main/resources/db/migration/v9/9.1/05_add_referential_ps_common_TransmittingBuoyOperation_finalize-common.sql
=====================================
@@ -0,0 +1,22 @@
+---
+-- #%L
+-- ObServe Core :: Persistence :: Migration
+-- %%
+-- Copyright (C) 2008 - 2023 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%
+---
+UPDATE common.LastUpdateDate SET lastUpdateDate = ${CURRENT_TIMESTAMP} WHERE type ='fr.ird.observe.entities.referential.ps.common.TransmittingBuoyOperation';
=====================================
core/persistence/migration/src/main/resources/db/migration/v9/9.1/05_add_referential_ps_landing_Destination_28-common.sql
=====================================
@@ -0,0 +1,22 @@
+---
+-- #%L
+-- ObServe Core :: Persistence :: Migration
+-- %%
+-- Copyright (C) 2008 - 2023 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%
+---
+INSERT INTO ps_landing.Destination(topiaid, topiaversion, topiacreatedate, lastUpdateDate, needComment, status, code, label1, label2, label3) VALUES ('fr.ird.referential.ps.landing.Destination#${REFERENTIAL_PREFIX}28', 0, ${CURRENT_DATE}, ${CURRENT_TIMESTAMP}, FALSE, 1, '28' , 'Local market', 'Marché local', 'Local market TODO');
\ No newline at end of file
=====================================
core/persistence/migration/src/main/resources/db/migration/v9/9.1/05_add_referential_ps_landing_Destination_29-common.sql
=====================================
@@ -0,0 +1,22 @@
+---
+-- #%L
+-- ObServe Core :: Persistence :: Migration
+-- %%
+-- Copyright (C) 2008 - 2023 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%
+---
+INSERT INTO ps_landing.Destination(topiaid, topiaversion, topiacreatedate, lastUpdateDate, needComment, status, code, label1, label2, label3) VALUES ('fr.ird.referential.ps.landing.Destination#${REFERENTIAL_PREFIX}29', 0, ${CURRENT_DATE}, ${CURRENT_TIMESTAMP}, FALSE, 1, '29' , 'CCCS (Central Common Cold Store)', 'CCCS (Central Common Cold Store)', 'CCCS (Central Common Cold Store)');
\ No newline at end of file
=====================================
core/persistence/migration/src/main/resources/db/migration/v9/9.1/05_add_referential_ps_landing_Destination_finalize-common.sql
=====================================
@@ -0,0 +1,22 @@
+---
+-- #%L
+-- ObServe Core :: Persistence :: Migration
+-- %%
+-- Copyright (C) 2008 - 2023 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%
+---
+UPDATE common.LastUpdateDate SET lastUpdateDate = ${CURRENT_TIMESTAMP} WHERE type ='fr.ird.observe.entities.referential.ps.landing.Destination';
=====================================
core/persistence/test/src/test/resources/fixtures/persistence/table_count/referential.properties
=====================================
@@ -86,12 +86,12 @@ ps_common.reasonForNullSet=10
ps_common.sampleType=6
ps_common.schoolType=4
ps_common.speciesFate=15
-ps_common.transmittingBuoyOperation=5
+ps_common.transmittingBuoyOperation=6
ps_common.transmittingBuoyOwnership=5
ps_common.transmittingBuoyType=62
ps_common.vesselActivity=39
ps_common.weightCategory=137
-ps_landing.destination=28
+ps_landing.destination=30
ps_landing.fate=2
ps_localmarket.batchComposition=3
ps_localmarket.batchWeightType=4
=====================================
core/services/i18n/src/main/i18n/translations/services_en_GB.properties
=====================================
@@ -457,6 +457,7 @@ observe.constant.TypeTransmittingBuoyOperation.grabAndChange=Grab and change
observe.constant.TypeTransmittingBuoyOperation.lost=Lost
observe.constant.TypeTransmittingBuoyOperation.noBuoy=No Beacon
observe.constant.TypeTransmittingBuoyOperation.posing=Posing
+observe.constant.TypeTransmittingBuoyOperation.unknown=Unknown
observe.constant.TypeTransmittingBuoyOperation.visit=Visit
observe.data.Activity.comment2=Only activity of type %s and %s allows you to fill DCPs.
observe.data.Activity.validation.duplicated.number=There is already another activity with this number.
=====================================
core/services/i18n/src/main/i18n/translations/services_es_ES.properties
=====================================
@@ -457,6 +457,7 @@ observe.constant.TypeTransmittingBuoyOperation.grabAndChange=Recuperación y col
observe.constant.TypeTransmittingBuoyOperation.lost=Lost
observe.constant.TypeTransmittingBuoyOperation.noBuoy=DCP sin baliza
observe.constant.TypeTransmittingBuoyOperation.posing=Colocación de nueva baliza
+observe.constant.TypeTransmittingBuoyOperation.unknown=Desconocido
observe.constant.TypeTransmittingBuoyOperation.visit=Visita a la baliza
observe.data.Activity.comment2=Solo la actividad %1$s or %2$s permite introducir un DCPs.
observe.data.Activity.validation.duplicated.number=There is already another activity with this number. \#TODO
=====================================
core/services/i18n/src/main/i18n/translations/services_fr_FR.properties
=====================================
@@ -457,6 +457,7 @@ observe.constant.TypeTransmittingBuoyOperation.grabAndChange=Récupération et p
observe.constant.TypeTransmittingBuoyOperation.lost=Perte / fin de transmission
observe.constant.TypeTransmittingBuoyOperation.noBuoy=Pas de balise liée au DCP
observe.constant.TypeTransmittingBuoyOperation.posing=Pose d'une nouvelle balise
+observe.constant.TypeTransmittingBuoyOperation.unknown=Inconnu
observe.constant.TypeTransmittingBuoyOperation.visit=Simple visite de la balise
observe.data.Activity.comment2=Seule l'activité %1$s ou %2$s permet de saisir des objets flottants.
observe.data.Activity.validation.duplicated.number=Il existe déjà une autre activité avec ce numéro.
=====================================
core/services/test/src/main/resources/fixtures/fr/ird/observe/services/service/ValidateService-referentialResult.json
=====================================
@@ -10394,114 +10394,6 @@
}
]
},
- {
- "reference": {
- "type": "fr.ird.observe.dto.referential.common.SizeMeasureMethodReference",
- "content": {
- "code": "1",
- "label": "Pied à coulisse",
- "needComment": false,
- "enabled": true,
- "id": "fr.ird.referential.common.SizeMeasureMethod#666#01",
- "lastUpdateDate": "2021-09-17T00:00:00.000Z",
- "topiaVersion": 1,
- "topiaCreateDate": "2020-10-01T00:00:00.000Z"
- }
- },
- "messages": [
- {
- "fieldName": "label3",
- "scope": "WARNING",
- "message": "Le libellé espagnol n\u0027est pas traduit."
- },
- {
- "fieldName": "uri",
- "scope": "WARNING",
- "message": "Le champ n\u0027est pas renseigné."
- }
- ]
- },
- {
- "reference": {
- "type": "fr.ird.observe.dto.referential.common.SizeMeasureMethodReference",
- "content": {
- "code": "2",
- "label": "Règle",
- "needComment": false,
- "enabled": true,
- "id": "fr.ird.referential.common.SizeMeasureMethod#666#02",
- "lastUpdateDate": "2021-09-17T00:00:00.000Z",
- "topiaVersion": 1,
- "topiaCreateDate": "2020-10-01T00:00:00.000Z"
- }
- },
- "messages": [
- {
- "fieldName": "label3",
- "scope": "WARNING",
- "message": "Le libellé espagnol n\u0027est pas traduit."
- },
- {
- "fieldName": "uri",
- "scope": "WARNING",
- "message": "Le champ n\u0027est pas renseigné."
- }
- ]
- },
- {
- "reference": {
- "type": "fr.ird.observe.dto.referential.common.SizeMeasureMethodReference",
- "content": {
- "code": "3",
- "label": "Mètre ruban",
- "needComment": false,
- "enabled": true,
- "id": "fr.ird.referential.common.SizeMeasureMethod#666#03",
- "lastUpdateDate": "2021-09-17T00:00:00.000Z",
- "topiaVersion": 1,
- "topiaCreateDate": "2020-10-01T00:00:00.000Z"
- }
- },
- "messages": [
- {
- "fieldName": "label3",
- "scope": "WARNING",
- "message": "Le libellé espagnol n\u0027est pas traduit."
- },
- {
- "fieldName": "uri",
- "scope": "WARNING",
- "message": "Le champ n\u0027est pas renseigné."
- }
- ]
- },
- {
- "reference": {
- "type": "fr.ird.observe.dto.referential.common.SizeMeasureMethodReference",
- "content": {
- "code": "4",
- "label": "Estimation visuelle",
- "needComment": false,
- "enabled": true,
- "id": "fr.ird.referential.common.SizeMeasureMethod#666#04",
- "lastUpdateDate": "2021-09-17T00:00:00.000Z",
- "topiaVersion": 1,
- "topiaCreateDate": "2020-10-01T00:00:00.000Z"
- }
- },
- "messages": [
- {
- "fieldName": "label3",
- "scope": "WARNING",
- "message": "Le libellé espagnol n\u0027est pas traduit."
- },
- {
- "fieldName": "uri",
- "scope": "WARNING",
- "message": "Le champ n\u0027est pas renseigné."
- }
- ]
- },
{
"reference": {
"type": "fr.ird.observe.dto.referential.common.LengthWeightParameterReference",
@@ -55337,6 +55229,114 @@
}
]
},
+ {
+ "reference": {
+ "type": "fr.ird.observe.dto.referential.common.SizeMeasureMethodReference",
+ "content": {
+ "code": "1",
+ "label": "Pied à coulisse",
+ "needComment": false,
+ "enabled": true,
+ "id": "fr.ird.referential.common.SizeMeasureMethod#666#01",
+ "lastUpdateDate": "2021-09-17T00:00:00.000Z",
+ "topiaVersion": 1,
+ "topiaCreateDate": "2020-10-01T00:00:00.000Z"
+ }
+ },
+ "messages": [
+ {
+ "fieldName": "label3",
+ "scope": "WARNING",
+ "message": "Le libellé espagnol n\u0027est pas traduit."
+ },
+ {
+ "fieldName": "uri",
+ "scope": "WARNING",
+ "message": "Le champ n\u0027est pas renseigné."
+ }
+ ]
+ },
+ {
+ "reference": {
+ "type": "fr.ird.observe.dto.referential.common.SizeMeasureMethodReference",
+ "content": {
+ "code": "2",
+ "label": "Règle",
+ "needComment": false,
+ "enabled": true,
+ "id": "fr.ird.referential.common.SizeMeasureMethod#666#02",
+ "lastUpdateDate": "2021-09-17T00:00:00.000Z",
+ "topiaVersion": 1,
+ "topiaCreateDate": "2020-10-01T00:00:00.000Z"
+ }
+ },
+ "messages": [
+ {
+ "fieldName": "label3",
+ "scope": "WARNING",
+ "message": "Le libellé espagnol n\u0027est pas traduit."
+ },
+ {
+ "fieldName": "uri",
+ "scope": "WARNING",
+ "message": "Le champ n\u0027est pas renseigné."
+ }
+ ]
+ },
+ {
+ "reference": {
+ "type": "fr.ird.observe.dto.referential.common.SizeMeasureMethodReference",
+ "content": {
+ "code": "3",
+ "label": "Mètre ruban",
+ "needComment": false,
+ "enabled": true,
+ "id": "fr.ird.referential.common.SizeMeasureMethod#666#03",
+ "lastUpdateDate": "2021-09-17T00:00:00.000Z",
+ "topiaVersion": 1,
+ "topiaCreateDate": "2020-10-01T00:00:00.000Z"
+ }
+ },
+ "messages": [
+ {
+ "fieldName": "label3",
+ "scope": "WARNING",
+ "message": "Le libellé espagnol n\u0027est pas traduit."
+ },
+ {
+ "fieldName": "uri",
+ "scope": "WARNING",
+ "message": "Le champ n\u0027est pas renseigné."
+ }
+ ]
+ },
+ {
+ "reference": {
+ "type": "fr.ird.observe.dto.referential.common.SizeMeasureMethodReference",
+ "content": {
+ "code": "4",
+ "label": "Estimation visuelle",
+ "needComment": false,
+ "enabled": true,
+ "id": "fr.ird.referential.common.SizeMeasureMethod#666#04",
+ "lastUpdateDate": "2021-09-17T00:00:00.000Z",
+ "topiaVersion": 1,
+ "topiaCreateDate": "2020-10-01T00:00:00.000Z"
+ }
+ },
+ "messages": [
+ {
+ "fieldName": "label3",
+ "scope": "WARNING",
+ "message": "Le libellé espagnol n\u0027est pas traduit."
+ },
+ {
+ "fieldName": "uri",
+ "scope": "WARNING",
+ "message": "Le champ n\u0027est pas renseigné."
+ }
+ ]
+ },
{
"reference": {
"type": "fr.ird.observe.dto.referential.common.SizeMeasureTypeReference",
@@ -68503,22 +68503,22 @@
{
"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é «RAV* - Ravil - Ravil» (à la position 193) 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 208) 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é «SPY - Sphyrnidae - Famille Sphyrnidae» (à la position 24) est désactivé."
+ "message": "Le référentiel sélectionné «RAV* - Ravil - Ravil» (à la position 193) est désactivé."
},
{
"fieldName": "uri",
@@ -197125,6 +197125,38 @@
}
]
},
+ {
+ "reference": {
+ "type": "fr.ird.observe.dto.referential.ps.common.TransmittingBuoyOperationReference",
+ "content": {
+ "code": "99",
+ "label": "Inconnue",
+ "needComment": false,
+ "enabled": false,
+ "id": "fr.ird.referential.ps.common.TransmittingBuoyOperation#1464000000000#99",
+ "lastUpdateDate": "2022-09-14T00:00:00.000Z",
+ "topiaVersion": 0,
+ "topiaCreateDate": "2022-09-14T00:00:00.000Z"
+ }
+ },
+ "messages": [
+ {
+ "fieldName": "label3",
+ "scope": "WARNING",
+ "message": "Le libellé espagnol n\u0027est pas traduit."
+ },
+ {
+ "fieldName": "status",
+ "scope": "WARNING",
+ "message": "L\u0027objet est désactivé (il ne pourra plus être utilisée dans de données observées ou de nouveaux référentiels)."
+ },
+ {
+ "fieldName": "uri",
+ "scope": "WARNING",
+ "message": "Le champ n\u0027est pas renseigné."
+ }
+ ]
+ },
{
"reference": {
"type": "fr.ird.observe.dto.referential.ps.common.TransmittingBuoyOwnershipReference",
@@ -199529,6 +199561,72 @@
}
]
},
+ {
+ "reference": {
+ "type": "fr.ird.observe.dto.referential.ps.common.VesselActivityReference",
+ "content": {
+ "code": "101",
+ "label": "[deprecated] Transit (steaming without searching)",
+ "allowFad": true,
+ "needComment": false,
+ "enabled": false,
+ "id": "fr.ird.referential.ps.common.VesselActivity#1464000000000#101",
+ "lastUpdateDate": "2022-09-14T00:00:00.000Z",
+ "topiaVersion": 0,
+ "topiaCreateDate": "2022-09-14T00:00:00.000Z"
+ }
+ },
+ "messages": [
+ {
+ "fieldName": "label3",
+ "scope": "WARNING",
+ "message": "Le libellé espagnol n\u0027est pas traduit."
+ },
+ {
+ "fieldName": "status",
+ "scope": "WARNING",
+ "message": "L\u0027objet est désactivé (il ne pourra plus être utilisée dans de données observées ou de nouveaux référentiels)."
+ },
+ {
+ "fieldName": "uri",
+ "scope": "WARNING",
+ "message": "Le champ n\u0027est pas renseigné."
+ }
+ ]
+ },
+ {
+ "reference": {
+ "type": "fr.ird.observe.dto.referential.ps.common.VesselActivityReference",
+ "content": {
+ "code": "102",
+ "label": "[déprécié] Recherche (général)",
+ "allowFad": true,
+ "needComment": false,
+ "enabled": false,
+ "id": "fr.ird.referential.ps.common.VesselActivity#1464000000000#102",
+ "lastUpdateDate": "2022-09-14T00:00:00.000Z",
+ "topiaVersion": 0,
+ "topiaCreateDate": "2022-09-14T00:00:00.000Z"
+ }
+ },
+ "messages": [
+ {
+ "fieldName": "label3",
+ "scope": "WARNING",
+ "message": "Le libellé espagnol n\u0027est pas traduit."
+ },
+ {
+ "fieldName": "status",
+ "scope": "WARNING",
+ "message": "L\u0027objet est désactivé (il ne pourra plus être utilisée dans de données observées ou de nouveaux référentiels)."
+ },
+ {
+ "fieldName": "uri",
+ "scope": "WARNING",
+ "message": "Le champ n\u0027est pas renseigné."
+ }
+ ]
+ },
{
"reference": {
"type": "fr.ird.observe.dto.referential.ps.common.VesselActivityReference",
@@ -199809,6 +199907,34 @@
}
]
},
+ {
+ "reference": {
+ "type": "fr.ird.observe.dto.referential.ps.common.VesselActivityReference",
+ "content": {
+ "code": "36",
+ "label": "Ravitaillement en carburant",
+ "allowFad": false,
+ "needComment": false,
+ "enabled": true,
+ "id": "fr.ird.referential.ps.common.VesselActivity#1464000000000#36",
+ "lastUpdateDate": "2022-09-14T00:00:00.000Z",
+ "topiaVersion": 0,
+ "topiaCreateDate": "2022-09-14T00:00:00.000Z"
+ }
+ },
+ "messages": [
+ {
+ "fieldName": "label3",
+ "scope": "WARNING",
+ "message": "Le libellé espagnol n\u0027est pas traduit."
+ },
+ {
+ "fieldName": "uri",
+ "scope": "WARNING",
+ "message": "Le champ n\u0027est pas renseigné."
+ }
+ ]
+ },
{
"reference": {
"type": "fr.ird.observe.dto.referential.ps.common.VesselActivityReference",
@@ -209010,6 +209136,65 @@
}
]
},
+ {
+ "reference": {
+ "type": "fr.ird.observe.dto.referential.ps.landing.DestinationReference",
+ "content": {
+ "code": "28",
+ "label": "Marché local",
+ "needComment": false,
+ "enabled": true,
+ "id": "fr.ird.referential.ps.landing.Destination#1464000000000#28",
+ "lastUpdateDate": "2022-09-14T00:00:00.000Z",
+ "topiaVersion": 0,
+ "topiaCreateDate": "2022-09-14T00:00:00.000Z"
+ }
+ },
+ "messages": [
+ {
+ "fieldName": "label3",
+ "scope": "WARNING",
+ "message": "Le libellé espagnol n\u0027est pas traduit."
+ },
+ {
+ "fieldName": "uri",
+ "scope": "WARNING",
+ "message": "Le champ n\u0027est pas renseigné."
+ }
+ ]
+ },
+ {
+ "reference": {
+ "type": "fr.ird.observe.dto.referential.ps.landing.DestinationReference",
+ "content": {
+ "code": "29",
+ "label": "CCCS (Central Common Cold Store)",
+ "needComment": false,
+ "enabled": true,
+ "id": "fr.ird.referential.ps.landing.Destination#1464000000000#29",
+ "lastUpdateDate": "2022-09-14T00:00:00.000Z",
+ "topiaVersion": 0,
+ "topiaCreateDate": "2022-09-14T00:00:00.000Z"
+ }
+ },
+ "messages": [
+ {
+ "fieldName": "label1",
+ "scope": "WARNING",
+ "message": "Le libellé anglais n\u0027est pas traduit."
+ },
+ {
+ "fieldName": "label3",
+ "scope": "WARNING",
+ "message": "Le libellé espagnol n\u0027est pas traduit."
+ },
+ {
+ "fieldName": "uri",
+ "scope": "WARNING",
+ "message": "Le champ n\u0027est pas renseigné."
+ }
+ ]
+ },
{
"reference": {
"type": "fr.ird.observe.dto.referential.ps.landing.DestinationReference",
=====================================
model/src/main/resources/fixtures/global.properties
=====================================
@@ -25,4 +25,4 @@ REFERENCE_DATA_COUNT=68
ENTITIES_LIMIT_SIZE=100
# fr.ird.observe.services.service.referential.ReferentialService
# fr.ird.observe.services.local.service.referential.DifferentialModelTest
-REFERENTIAL_COUNT=4096
+REFERENTIAL_COUNT=4099
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/47a1289cac6f3e0960872515…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/47a1289cac6f3e0960872515…
You're receiving this email because of your account on gitlab.com.
1
0