Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
-
0698ab90
by Tony Chemit at 2023-11-13T12:50:00+01:00
4 changed files:
- core/persistence/avdth/src/main/java/fr/ird/observe/persistence/avdth/data/ImportReferentialContext.java
- core/persistence/avdth/src/main/java/fr/ird/observe/persistence/avdth/data/logbook/FloatingObjectReader.java
- src/site/markdown/avdth/logbook.md
- src/site/markdown/avdth/referential.md
Changes:
| ... | ... | @@ -131,6 +131,7 @@ public class ImportReferentialContext { |
| 131 | 131 | private ObjectMaterial objectMaterialANLOG;
|
| 132 | 132 | private ObjectMaterial objectMaterialHALOG;
|
| 133 | 133 | private ObjectMaterial objectMaterialVNLOG;
|
| 134 | + private ObjectMaterial objectMaterialCarrion;
|
|
| 134 | 135 | private ObservedSystem observedSystem0;
|
| 135 | 136 | private SpeciesCache speciesCache;
|
| 136 | 137 | private ObservedSystem observedSystem20;
|
| ... | ... | @@ -225,6 +226,7 @@ public class ImportReferentialContext { |
| 225 | 226 | transmittingBuoyType98 = transmittingBuoyType.get("98");
|
| 226 | 227 | objectMaterialFOB = objectMaterial.get("fr.ird.referential.ps.common.ObjectMaterial#0#1.3");
|
| 227 | 228 | objectMaterialNLOG = objectMaterial.get("fr.ird.referential.ps.common.ObjectMaterial#0#0.51");
|
| 229 | + objectMaterialCarrion = objectMaterial.get("fr.ird.referential.ps.common.ObjectMaterial#0#0.57");
|
|
| 228 | 230 | objectMaterialDFAD = objectMaterial.get("fr.ird.referential.ps.common.ObjectMaterial#0#0.2");
|
| 229 | 231 | objectMaterialALOG = objectMaterial.get("fr.ird.referential.ps.common.ObjectMaterial#0#0.59");
|
| 230 | 232 | objectMaterialAFAD = objectMaterial.get("fr.ird.referential.ps.common.ObjectMaterial#0#0.46");
|
| ... | ... | @@ -328,6 +330,10 @@ public class ImportReferentialContext { |
| 328 | 330 | return objectMaterialNLOG;
|
| 329 | 331 | }
|
| 330 | 332 | |
| 333 | + public ObjectMaterial getObjectMaterialCarrion() {
|
|
| 334 | + return objectMaterialCarrion;
|
|
| 335 | + }
|
|
| 336 | + |
|
| 331 | 337 | public ObjectMaterial getObjectMaterialDFAD() {
|
| 332 | 338 | return objectMaterialDFAD;
|
| 333 | 339 | }
|
| ... | ... | @@ -207,7 +207,7 @@ public class FloatingObjectReader extends DataReader<FloatingObject> { |
| 207 | 207 | /**
|
| 208 | 208 | * Observed system from {@code ACT_ASSOC} which can create a Floating object.
|
| 209 | 209 | */
|
| 210 | - public static final Set<String> OBSERVED_SYTEM_CODES_WITH_DCP = Set.of("20", "21", "22", "23", "24", "25");
|
|
| 210 | + public static final Set<String> OBSERVED_SYTEM_CODES_WITH_DCP = Set.of("20", "21", "22", "23", "24", "25", "81");
|
|
| 211 | 211 | /**
|
| 212 | 212 | * We need to remove thoses observed system at the end when writing them to activity.
|
| 213 | 213 | * See <a href="https://gitlab.com/ultreiaio/ird-observe/-/issues/2548">issue 2548</a>
|
| ... | ... | @@ -323,6 +323,10 @@ public class FloatingObjectReader extends DataReader<FloatingObject> { |
| 323 | 323 | if (observedSystem != null) {
|
| 324 | 324 | activity.addObservedSystem(observedSystem);
|
| 325 | 325 | }
|
| 326 | + // See https://gitlab.com/ultreiaio/ird-observe/-/issues/2802
|
|
| 327 | + if (observedSystemCodes.contains("81")) {
|
|
| 328 | + activity.addObservedSystem(dataContext.getObservedSystem20());
|
|
| 329 | + }
|
|
| 326 | 330 | |
| 327 | 331 | boolean addBuoyFromObservedSystem = addFloatingObjectMaterials(dataContext,
|
| 328 | 332 | resultSet,
|
| ... | ... | @@ -380,12 +384,12 @@ public class FloatingObjectReader extends DataReader<FloatingObject> { |
| 380 | 384 | addObjectMaterial(vesselActivityCode, objectMaterialUsed, dataContext.getObjectMaterialFOB(), whenArriving, whenLeaving, entity);
|
| 381 | 385 | addDefaultObjectMaterialOnUnknownObjectType = false;
|
| 382 | 386 | } else if (observedSystemCodes.contains("21")) {
|
| 383 | - // add ObjectMaterial 2-1 NLOG
|
|
| 384 | - addObjectMaterial(vesselActivityCode, objectMaterialUsed, dataContext.getObjectMaterialNLOG(), whenArriving, whenLeaving, entity);
|
|
| 387 | + // add ObjectMaterial 2-1-1 VNLOG
|
|
| 388 | + addObjectMaterial(vesselActivityCode, objectMaterialUsed, dataContext.getObjectMaterialVNLOG(), whenArriving, whenLeaving, entity);
|
|
| 385 | 389 | addDefaultObjectMaterialOnUnknownObjectType = false;
|
| 386 | 390 | } else if (observedSystemCodes.contains("22")) {
|
| 387 | - // add ObjectMaterial 2-1 NLOG + 1-1 DFAD
|
|
| 388 | - addObjectMaterial(vesselActivityCode, objectMaterialUsed, dataContext.getObjectMaterialNLOG(), whenArriving, whenLeaving, entity);
|
|
| 391 | + // add ObjectMaterial 2-1-1 VNLOG + 1-1 DFAD
|
|
| 392 | + addObjectMaterial(vesselActivityCode, objectMaterialUsed, dataContext.getObjectMaterialVNLOG(), whenArriving, whenLeaving, entity);
|
|
| 389 | 393 | addObjectMaterial(vesselActivityCode, objectMaterialUsed, dataContext.getObjectMaterialDFAD(), whenArriving, whenLeaving, entity);
|
| 390 | 394 | addDefaultObjectMaterialOnUnknownObjectType = false;
|
| 391 | 395 | addBuoyFromObservedSystem = true;
|
| ... | ... | @@ -394,8 +398,7 @@ public class FloatingObjectReader extends DataReader<FloatingObject> { |
| 394 | 398 | addObjectMaterial(vesselActivityCode, objectMaterialUsed, dataContext.getObjectMaterialALOG(), whenArriving, whenLeaving, entity);
|
| 395 | 399 | addDefaultObjectMaterialOnUnknownObjectType = false;
|
| 396 | 400 | } else if (observedSystemCodes.contains("24")) {
|
| 397 | - // add ObjectMaterial 2-2 ALOG + 1-1 DFAD
|
|
| 398 | - addObjectMaterial(vesselActivityCode, objectMaterialUsed, dataContext.getObjectMaterialALOG(), whenArriving, whenLeaving, entity);
|
|
| 401 | + // add ObjectMaterial 1-1 DFAD
|
|
| 399 | 402 | addObjectMaterial(vesselActivityCode, objectMaterialUsed, dataContext.getObjectMaterialDFAD(), whenArriving, whenLeaving, entity);
|
| 400 | 403 | addDefaultObjectMaterialOnUnknownObjectType = false;
|
| 401 | 404 | addBuoyFromObservedSystem = true;
|
| ... | ... | @@ -403,6 +406,10 @@ public class FloatingObjectReader extends DataReader<FloatingObject> { |
| 403 | 406 | // add ObjectMaterial 1-2 AFAD
|
| 404 | 407 | addObjectMaterial(vesselActivityCode, objectMaterialUsed, dataContext.getObjectMaterialAFAD(), whenArriving, whenLeaving, entity);
|
| 405 | 408 | addDefaultObjectMaterialOnUnknownObjectType = false;
|
| 409 | + } else if (observedSystemCodes.contains("81")) {
|
|
| 410 | + // add ObjectMaterial 2-1-2-1 Carrion
|
|
| 411 | + addObjectMaterial(vesselActivityCode, objectMaterialUsed, dataContext.getObjectMaterialCarrion(), whenArriving, whenLeaving, entity);
|
|
| 412 | + addDefaultObjectMaterialOnUnknownObjectType = false;
|
|
| 406 | 413 | }
|
| 407 | 414 | if (floatingObjectExistsInAvdth) {
|
| 408 | 415 | // simple mapping
|
| ... | ... | @@ -138,7 +138,7 @@ Dans **AVDTH**, il existe trois notions à considéder : |
| 138 | 138 | |
| 139 | 139 | 1. ```ACTIVITE.C_TYP_OBJET``` donne le type de DCP (la valeur ```NULL``` ou ```999``` indique pas de DCP déclaré dans **AVDTH**)
|
| 140 | 140 | 2. ```ACTIVITE.C_TYP_BALISE``` donne le type de balise (la valeur ```NULL``` ou ```999``` indique pas de bouée délcarée dans **AVDTH**)
|
| 141 | -3. Les valeurs ```20,21,22,23,24,25``` de la table ```ACT_ASSOC.C_ASSOC``` permettent de définir aussi un DCP (et de renseigner les matériaux associés)
|
|
| 141 | +3. Les valeurs ```20,21,22,23,24,25,81``` de la table ```ACT_ASSOC.C_ASSOC``` permettent de définir aussi un DCP (et de renseigner les matériaux associés)
|
|
| 142 | 142 | |
| 143 | 143 | On va alors interdire l'ajout d'un DCP, si aucune des trois notions précédentes n'est satisfaite, en clair on ne peut pas ajouté un DPC si :
|
| 144 | 144 | |
| ... | ... | @@ -249,11 +249,12 @@ tableau suivant : |
| 249 | 249 | | ACT_ASSOC.C_ASSOC | ObjectMaterial |
|
| 250 | 250 | |:------------------|:---------------|
|
| 251 | 251 | | 20 | FOB |
|
| 252 | -| 21 | NLOG |
|
|
| 253 | -| 22 [1](#n_6_1) | NLOG + DFAD |
|
|
| 252 | +| 21 | VNLOG |
|
|
| 253 | +| 22 [1](#n_6_1) | VNLOG + DFAD |
|
|
| 254 | 254 | | 23 | ALOG |
|
| 255 | -| 24 [1](#n_6_1) | ALOG DFAD |
|
|
| 255 | +| 24 [1](#n_6_1) | DFAD |
|
|
| 256 | 256 | | 25 | AFAD |
|
| 257 | +| 81 | Carrion |
|
|
| 257 | 258 | |
| 258 | 259 | * Note 1 <a name="n_6_1"></a>
|
| 259 | 260 |
| ... | ... | @@ -184,7 +184,7 @@ Pour transposer tous les codes **ACT_ASSOC.C_ASSOC** en code **ps_common.Observe |
| 184 | 184 | | 73 | 73 |
|
| 185 | 185 | | 74 | 74 |
|
| 186 | 186 | | 80 | 80 |
|
| 187 | -| 81 | 81 |
|
|
| 187 | +| 81 | 81 + 20 |
|
|
| 188 | 188 | | 90 | 90 |
|
| 189 | 189 | | 91 | 91 |
|
| 190 | 190 | | 92 | 92 |
|