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][develop] 2 commits: AVDTH - Use ObjectOperation states to find out where to add materials...
by Tony CHEMIT (@tchemit) 07 Feb '23
by Tony CHEMIT (@tchemit) 07 Feb '23
07 Feb '23
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
6ea068cb by Tony Chemit at 2023-02-07T12:23:16+01:00
AVDTH - Use ObjectOperation states to find out where to add materials (whenArriving/whenLeaving) instead of asking AVDTH for a such mapping...
- - - - -
f585d278 by Tony Chemit at 2023-02-07T12:23:54+01:00
AVDTH - Bad TransmittingBuoyType fallback code (should be 99 but was 999)
- - - - -
1 changed file:
- core/persistence/avdth/src/main/java/fr/ird/observe/persistence/avdth/data/logbook/FloatingObjectReader.java
Changes:
=====================================
core/persistence/avdth/src/main/java/fr/ird/observe/persistence/avdth/data/logbook/FloatingObjectReader.java
=====================================
@@ -132,40 +132,6 @@ public class FloatingObjectReader extends DataReader<FloatingObject> {
.put("40", "4") // Perte | 4 Perte signal
.put("41", "5") // Arret commandé de la transmission | 5 Fin d'utilisation
.build();
- /**
- * Is floatingObjectPart on leaving from avdth ACTIVITE.C_OPERA.
- */
- public static final Set<String> WHEN_LEAVING_CODE = Set.of("5", "23", "31", "32");
- /**
- * Is floatingObjectPart on arriving from avdth ACTIVITE.C_OPERA.
- */
- public static final Set<String> WHEN_ARRIVING_CODE = Set.of(
- "0",
- "1",
- "2",
- "3",
- "4",
- "6",
- "7",
- "8",
- "9",
- "10",
- "12",
- "13",
- "14",
- "15",
- "22",
- "24",
- "25",
- "26",
- "29",
- "30",
- "31",
- "32",
- "33",
- "34",
- "40",
- "41");
/**
* To get TransmittingBuoy.TransmittingBuoyType code from avdth ACTIVITE.C_TYP_BALISE code.
*/
@@ -363,6 +329,7 @@ public class FloatingObjectReader extends DataReader<FloatingObject> {
vesselActivityCode,
objectTypeCode,
observedSystemCodes,
+ objectOperation,
entity,
floatingObjectExistsInAvdth,
buoyExistsInAvdth);
@@ -386,11 +353,12 @@ public class FloatingObjectReader extends DataReader<FloatingObject> {
String vesselActivityCode,
String objectTypeCode,
Set<String> observedSystemCodes,
+ ObjectOperation objectOperation,
FloatingObject entity,
boolean floatingObjectExistsInAvdth,
boolean buoyExistsInAvdth) throws SQLException {
- boolean whenArriving = WHEN_ARRIVING_CODE.contains(vesselActivityCode);
- boolean whenLeaving = WHEN_LEAVING_CODE.contains(vesselActivityCode);
+ boolean whenArriving = objectOperation.isWhenArriving();
+ boolean whenLeaving = objectOperation.isWhenLeaving();
// to add default material if there is a declared buoy (but no floating object declared)
// and no object material created by ObservedSystem, we will then add a standalone buoy
@@ -563,7 +531,7 @@ public class FloatingObjectReader extends DataReader<FloatingObject> {
private TransmittingBuoyType getTransmittingBuoyTypeByBuoyTypeCode(ImportDataContext dataContext, String buoyTypeCode) {
String transmittingBuoyTypeCode = TRANSMITTING_BUOY_TYPE_CODE_MAPPING.get(buoyTypeCode);
if (transmittingBuoyTypeCode == null) {
- transmittingBuoyTypeCode = "999";
+ transmittingBuoyTypeCode = "99";
}
TransmittingBuoyType transmittingBuoyType = dataContext.getTransmittingBuoyType(transmittingBuoyTypeCode);
return Objects.requireNonNull(transmittingBuoyType, String.format("Can't find transmittingBuoyType with code: %s", buoyTypeCode));
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/92ed62561da00e0d2a718878…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/92ed62561da00e0d2a718878…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop] 2 commits: Floating object - improve TypeTransmittingBuoyOperation code
by Tony CHEMIT (@tchemit) 07 Feb '23
by Tony CHEMIT (@tchemit) 07 Feb '23
07 Feb '23
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
d2737f8e by Tony Chemit at 2023-02-07T11:59:38+01:00
Floating object - improve TypeTransmittingBuoyOperation code
Usage of new TransmittingBuoyOperation 99 - See #2619
- - - - -
92ed6256 by Tony Chemit at 2023-02-07T11:59:38+01:00
Amélioration de l'éditeur des matériaux de DCP - Closes #2623
- - - - -
5 changed files:
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/dcp/DcpUIAdapter.java
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/dcp/FloatingObjectPartsTreeNode.java
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/logbook/FloatingObjectUI.jaxx
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/observation/FloatingObjectUI.jaxx
- core/api/dto/src/main/java/fr/ird/observe/dto/data/ps/TypeTransmittingBuoyOperation.java
Changes:
=====================================
client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/dcp/DcpUIAdapter.java
=====================================
@@ -162,7 +162,7 @@ public interface DcpUIAdapter<T extends TransmittingBuoyAware> extends JAXXObjec
default void onOpenAfterOpenModel(DcpUIModelStates<?, ?> states) {
processDataBinding("typeOperation.selectedItem");
TypeTransmittingBuoyOperation typeOperation = getTypeOperation().getSelectedValue();
- changeTypeOperation(states, typeOperation, false);
+ changeTypeTransmittingBuoyOperation(states, typeOperation, false);
}
default void stopEditUI() {
@@ -173,9 +173,9 @@ public interface DcpUIAdapter<T extends TransmittingBuoyAware> extends JAXXObjec
getValidatorBuoy2().setBean(null);
}
- default void changeTypeOperation(ItemEvent event, DcpUIModelStates<?, ?> states) {
+ default void changeTypeTransmittingBuoyOperation(ItemEvent event, DcpUIModelStates<?, ?> states) {
if (event.getStateChange() == ItemEvent.SELECTED && states.isEditing()) {
- changeTypeOperation(states, getTypeOperation().getSelectedValue(), true);
+ changeTypeTransmittingBuoyOperation(states, getTypeOperation().getSelectedValue(), true);
states.setModified(true);
}
}
@@ -191,7 +191,7 @@ public interface DcpUIAdapter<T extends TransmittingBuoyAware> extends JAXXObjec
states.setModified(states.isCreatingMode());
}
- default void changeTypeOperation(DcpUIModelStates<?, ?> states, TypeTransmittingBuoyOperation typeOperation, boolean reset) {
+ default void changeTypeTransmittingBuoyOperation(DcpUIModelStates<?, ?> states, TypeTransmittingBuoyOperation typeOperation, boolean reset) {
if (Objects.requireNonNull(typeOperation).isWithCoordinate()) {
addTransmittingBuoyCoordinate();
@@ -208,7 +208,7 @@ public interface DcpUIAdapter<T extends TransmittingBuoyAware> extends JAXXObjec
}
if (withBuoy) {
- // always reset balise lues of editBean to avoid side-effects
+ // always reset buoys of editBean to avoid side-effects
bean.getTransmittingBuoy().clear();
}
@@ -221,45 +221,47 @@ public interface DcpUIAdapter<T extends TransmittingBuoyAware> extends JAXXObjec
getValidatorBuoy2().setBean(null);
}
- String[] codeOperations = typeOperation.getCodeOperation();
- JComponent focusOwner = null;
- switch (typeOperation) {
- case noBuoy:
+ String[] transmittingBuoyOperationCodes = typeOperation.getTransmittingBuoyOperationCodes();
+ JComponent focusOwner;
+ switch (typeOperation.getBuoyCount()) {
+ case 0:
+ // no buoy
editorPanel.add(getNoBuoyEditor());
focusOwner = getComment();
break;
- case grabAndChange:
+ case 1:
+ // one buoy
if (reset) {
- states.bindEmptyBuoy(states.getReferenceCache(), bean, getTransmittingBuoy1(), states.getBuoyOperation(codeOperations[0]));
- states.bindEmptyBuoy(states.getReferenceCache(), bean, getTransmittingBuoy2(), states.getBuoyOperation(codeOperations[1]));
+ states.bindEmptyBuoy(states.getReferenceCache(), bean, getTransmittingBuoy1(), states.getBuoyOperation(transmittingBuoyOperationCodes[0]));
} else {
states.bindExistingBuoy(bean, getTransmittingBuoy1(), modelBuoyList.get(0));
- states.bindExistingBuoy(bean, getTransmittingBuoy2(), modelBuoyList.get(1));
}
editorPanel.add(getTransmittingBuoy1EditorPanel());
- editorPanel.add(getTransmittingBuoy2EditorPanel());
if (states.isEditing()) {
getValidatorBuoy1().setBean(getTransmittingBuoy1());
- getValidatorBuoy2().setBean(getTransmittingBuoy2());
}
focusOwner = getTransmittingBuoyType1();
break;
- case visit:
- case grab:
- case posing:
- case lost:
- case endOfUse:
+ case 2:
+ // two buoy
if (reset) {
- states.bindEmptyBuoy(states.getReferenceCache(), bean, getTransmittingBuoy1(), states.getBuoyOperation(codeOperations[0]));
+ states.bindEmptyBuoy(states.getReferenceCache(), bean, getTransmittingBuoy1(), states.getBuoyOperation(transmittingBuoyOperationCodes[0]));
+ states.bindEmptyBuoy(states.getReferenceCache(), bean, getTransmittingBuoy2(), states.getBuoyOperation(transmittingBuoyOperationCodes[1]));
} else {
states.bindExistingBuoy(bean, getTransmittingBuoy1(), modelBuoyList.get(0));
+ states.bindExistingBuoy(bean, getTransmittingBuoy2(), modelBuoyList.get(1));
}
editorPanel.add(getTransmittingBuoy1EditorPanel());
+ editorPanel.add(getTransmittingBuoy2EditorPanel());
if (states.isEditing()) {
getValidatorBuoy1().setBean(getTransmittingBuoy1());
+ getValidatorBuoy2().setBean(getTransmittingBuoy2());
}
focusOwner = getTransmittingBuoyType1();
break;
+ default:
+ // can't happen
+ throw new IllegalArgumentException(String.format("Can't have %d buoy count", typeOperation.getBuoyCount()));
}
//FIXME:Focus update zone focus owner
JComponent finalFocusOwner = focusOwner;
=====================================
client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/dcp/FloatingObjectPartsTreeNode.java
=====================================
@@ -119,19 +119,19 @@ public class FloatingObjectPartsTreeNode extends AbstractMutableTreeTableNode im
throw new IllegalStateException();
}
- void setValueAt(Object aValue, int column) {
+ void setValueAt(String value, int column) {
text = null;
switch (column) {
case 1: // when arriving
- uiModelStates.setWhenArriving(dto.getId(), aValue == null ? null : String.valueOf(aValue));
+ uiModelStates.setWhenArriving(dto.getId(), value);
if (useValidation) {
- valueValidOnArriving = dto.isValid(aValue);
+ valueValidOnArriving = dto.isValid(value);
}
return;
case 2: // when leaving
- uiModelStates.setWhenLeaving(dto.getId(), aValue == null ? null : String.valueOf(aValue));
+ uiModelStates.setWhenLeaving(dto.getId(), value);
if (useValidation) {
- valueValidOnLeaving = dto.isValid(aValue);
+ valueValidOnLeaving = dto.isValid(value);
}
return;
}
@@ -250,7 +250,11 @@ public class FloatingObjectPartsTreeNode extends AbstractMutableTreeTableNode im
@Override
public void setValueAt(Object aValue, int column) {
- getUserObject().setValueAt(aValue, column);
+ String value = aValue == null ? null : String.valueOf(aValue).trim();
+ if (Objects.equals("", value)) {
+ value = null;
+ }
+ getUserObject().setValueAt(value, column);
}
@Override
=====================================
client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/logbook/FloatingObjectUI.jaxx
=====================================
@@ -199,7 +199,7 @@
<cell anchor='east' weightx="1" fill="both">
<BeanEnumEditor id='typeOperation' genericType='TypeTransmittingBuoyOperation'
constructorParams='TypeTransmittingBuoyOperation.class'
- onItemStateChanged='changeTypeOperation(event,getStates());'/>
+ onItemStateChanged='changeTypeTransmittingBuoyOperation(event,getStates());'/>
</cell>
</row>
</Table>
=====================================
client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/observation/FloatingObjectUI.jaxx
=====================================
@@ -199,7 +199,7 @@
<cell anchor='east' weightx="1" fill="both">
<BeanEnumEditor id='typeOperation' genericType='TypeTransmittingBuoyOperation'
constructorParams='TypeTransmittingBuoyOperation.class'
- onItemStateChanged='changeTypeOperation(event,getStates());'/>
+ onItemStateChanged='changeTypeTransmittingBuoyOperation(event,getStates());'/>
</cell>
</row>
</Table>
=====================================
core/api/dto/src/main/java/fr/ird/observe/dto/data/ps/TypeTransmittingBuoyOperation.java
=====================================
@@ -26,6 +26,8 @@ import fr.ird.observe.dto.referential.ps.common.TransmittingBuoyOperationReferen
import io.ultreia.java4all.i18n.spi.enumeration.TranslateEnumeration;
import java.util.List;
+import java.util.Set;
+import java.util.TreeSet;
/**
* @author Tony Chemit - dev(a)tchemit.fr
@@ -34,71 +36,74 @@ import java.util.List;
public enum TypeTransmittingBuoyOperation {
// no buoy
noBuoy(false),
-
// one buoy
visit(false, "1"),
grab(false, "2"),
posing(false, "3"),
lost(true, "4"),
- unknown(false, "99"),
endOfUse(true, "5"),
-
+ unknown(false, "99"),
// two buoy
grabAndChange(false, "2", "3");
-
/**
* TransmittingBuoyOperation codes associated to this type.
*/
- private final String[] codeOperation;
+ private final String[] transmittingBuoyOperationCodes;
+ /**
+ * Number of buoy authorized for this type.
+ */
+ private final int buoyCount;
/**
* Use coordinate?
*/
private final boolean withCoordinate;
public static TypeTransmittingBuoyOperation guessTransmittingBuoyOperation(List<TransmittingBuoyOperationReference> transmittingBuoy) {
- if (transmittingBuoy.isEmpty()) {
-
- // no buoy
- return TypeTransmittingBuoyOperation.noBuoy;
- }
- if (transmittingBuoy.size() == 1) {
- // one buoy
- TransmittingBuoyOperationReference operation = transmittingBuoy.iterator().next();
- String code = operation.getCode();
- switch (Integer.parseInt(code)) {
- case 1:
- return TypeTransmittingBuoyOperation.visit;
- case 2:
- return TypeTransmittingBuoyOperation.grab;
- case 3:
- return TypeTransmittingBuoyOperation.posing;
- case 4:
- return TypeTransmittingBuoyOperation.lost;
- case 5:
- return TypeTransmittingBuoyOperation.endOfUse;
- default:
- throw new IllegalStateException(String.format("operation must be between 1 to 5, but was %s", code));
- }
- }
- if (transmittingBuoy.size() == 2) {
- // two buoy
- return TypeTransmittingBuoyOperation.grabAndChange;
+ int transmittingBuoyCount = transmittingBuoy.size();
+ switch (transmittingBuoyCount) {
+ case 0:
+ // no buoy
+ return TypeTransmittingBuoyOperation.noBuoy;
+ case 1:
+ // one buoy
+ TransmittingBuoyOperationReference operation = transmittingBuoy.iterator().next();
+ String code = operation.getCode();
+ for (TypeTransmittingBuoyOperation typeTransmittingBuoyOperation : TypeTransmittingBuoyOperation.values()) {
+ if (typeTransmittingBuoyOperation.getBuoyCount() == 1 && typeTransmittingBuoyOperation.getTransmittingBuoyOperationCodes()[0].equals(code)) {
+ return typeTransmittingBuoyOperation;
+ }
+ }
+ Set<String> availableCodes = new TreeSet<>();
+ for (TypeTransmittingBuoyOperation typeTransmittingBuoyOperation : TypeTransmittingBuoyOperation.values()) {
+ if (typeTransmittingBuoyOperation.getBuoyCount() == 1) {
+ availableCodes.add(typeTransmittingBuoyOperation.getTransmittingBuoyOperationCodes()[0]);
+ }
+ }
+ throw new IllegalStateException(String.format("When having a single buoy, TransmittingBuoyOperation code must be among: %s, but was %s", availableCodes, code));
+ case 2:
+ // two buoy
+ return TypeTransmittingBuoyOperation.grabAndChange;
+ default:
+ throw new IllegalStateException(String.format("A floating object, can only have 0, 1 or 2 buoy(s) but found %d buoys", transmittingBuoyCount));
}
- throw new IllegalStateException(String.format("A dcp, can only have 0, 1 or 2 buoys, found %d", transmittingBuoy.size()));
-
}
- TypeTransmittingBuoyOperation(boolean withCoordinate, String... codeOperation) {
- this.codeOperation = codeOperation;
+ TypeTransmittingBuoyOperation(boolean withCoordinate, String... transmittingBuoyOperationCodes) {
+ this.transmittingBuoyOperationCodes = transmittingBuoyOperationCodes;
this.withCoordinate = withCoordinate;
+ this.buoyCount = transmittingBuoyOperationCodes.length;
}
public boolean isWithCoordinate() {
return withCoordinate;
}
- public String[] getCodeOperation() {
- return codeOperation;
+ public String[] getTransmittingBuoyOperationCodes() {
+ return transmittingBuoyOperationCodes;
+ }
+
+ public int getBuoyCount() {
+ return buoyCount;
}
public String getLabel() {
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/b863e55783c399c1cc8f2dcb…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/b863e55783c399c1cc8f2dcb…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop] 4 commits: Persistence migration - Add tck buyers temporary (will be remove it when using...
by Tony CHEMIT (@tchemit) 07 Feb '23
by Tony CHEMIT (@tchemit) 07 Feb '23
07 Feb '23
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
4b04e28c by Tony Chemit at 2023-02-07T10:52:59+01:00
Persistence migration - Add tck buyers temporary (will be remove it when using real referential) - See #2621
- - - - -
cd14da91 by Tony Chemit at 2023-02-07T10:55:12+01:00
Usage of new TransmittingBuoyOperation 99 - See #2619
- - - - -
6a7efe35 by Tony Chemit at 2023-02-07T11:54:18+01:00
Amélioration de l'éditeur des matériaux de DCP - Closes #2623
- - - - -
b863e557 by Tony Chemit at 2023-02-07T11:57:23+01:00
Floating object - improve TypeTransmittingBuoyOperation code
- - - - -
6 changed files:
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/dcp/DcpUIAdapter.java
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/dcp/FloatingObjectPartsTreeNode.java
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/logbook/FloatingObjectUI.jaxx
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/observation/FloatingObjectUI.jaxx
- core/api/dto/src/main/java/fr/ird/observe/dto/data/ps/TypeTransmittingBuoyOperation.java
- core/persistence/migration/src/main/java/fr/ird/observe/spi/migration/v9/DataSourceMigrationForVersion_9_1.java
Changes:
=====================================
client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/dcp/DcpUIAdapter.java
=====================================
@@ -162,7 +162,7 @@ public interface DcpUIAdapter<T extends TransmittingBuoyAware> extends JAXXObjec
default void onOpenAfterOpenModel(DcpUIModelStates<?, ?> states) {
processDataBinding("typeOperation.selectedItem");
TypeTransmittingBuoyOperation typeOperation = getTypeOperation().getSelectedValue();
- changeTypeOperation(states, typeOperation, false);
+ changeTypeTransmittingBuoyOperation(states, typeOperation, false);
}
default void stopEditUI() {
@@ -173,9 +173,9 @@ public interface DcpUIAdapter<T extends TransmittingBuoyAware> extends JAXXObjec
getValidatorBuoy2().setBean(null);
}
- default void changeTypeOperation(ItemEvent event, DcpUIModelStates<?, ?> states) {
+ default void changeTypeTransmittingBuoyOperation(ItemEvent event, DcpUIModelStates<?, ?> states) {
if (event.getStateChange() == ItemEvent.SELECTED && states.isEditing()) {
- changeTypeOperation(states, getTypeOperation().getSelectedValue(), true);
+ changeTypeTransmittingBuoyOperation(states, getTypeOperation().getSelectedValue(), true);
states.setModified(true);
}
}
@@ -191,7 +191,7 @@ public interface DcpUIAdapter<T extends TransmittingBuoyAware> extends JAXXObjec
states.setModified(states.isCreatingMode());
}
- default void changeTypeOperation(DcpUIModelStates<?, ?> states, TypeTransmittingBuoyOperation typeOperation, boolean reset) {
+ default void changeTypeTransmittingBuoyOperation(DcpUIModelStates<?, ?> states, TypeTransmittingBuoyOperation typeOperation, boolean reset) {
if (Objects.requireNonNull(typeOperation).isWithCoordinate()) {
addTransmittingBuoyCoordinate();
@@ -208,7 +208,7 @@ public interface DcpUIAdapter<T extends TransmittingBuoyAware> extends JAXXObjec
}
if (withBuoy) {
- // always reset balise lues of editBean to avoid side-effects
+ // always reset buoys of editBean to avoid side-effects
bean.getTransmittingBuoy().clear();
}
@@ -221,45 +221,47 @@ public interface DcpUIAdapter<T extends TransmittingBuoyAware> extends JAXXObjec
getValidatorBuoy2().setBean(null);
}
- String[] codeOperations = typeOperation.getCodeOperation();
- JComponent focusOwner = null;
- switch (typeOperation) {
- case noBuoy:
+ String[] transmittingBuoyOperationCodes = typeOperation.getTransmittingBuoyOperationCodes();
+ JComponent focusOwner;
+ switch (typeOperation.getBuoyCount()) {
+ case 0:
+ // no buoy
editorPanel.add(getNoBuoyEditor());
focusOwner = getComment();
break;
- case grabAndChange:
+ case 1:
+ // one buoy
if (reset) {
- states.bindEmptyBuoy(states.getReferenceCache(), bean, getTransmittingBuoy1(), states.getBuoyOperation(codeOperations[0]));
- states.bindEmptyBuoy(states.getReferenceCache(), bean, getTransmittingBuoy2(), states.getBuoyOperation(codeOperations[1]));
+ states.bindEmptyBuoy(states.getReferenceCache(), bean, getTransmittingBuoy1(), states.getBuoyOperation(transmittingBuoyOperationCodes[0]));
} else {
states.bindExistingBuoy(bean, getTransmittingBuoy1(), modelBuoyList.get(0));
- states.bindExistingBuoy(bean, getTransmittingBuoy2(), modelBuoyList.get(1));
}
editorPanel.add(getTransmittingBuoy1EditorPanel());
- editorPanel.add(getTransmittingBuoy2EditorPanel());
if (states.isEditing()) {
getValidatorBuoy1().setBean(getTransmittingBuoy1());
- getValidatorBuoy2().setBean(getTransmittingBuoy2());
}
focusOwner = getTransmittingBuoyType1();
break;
- case visit:
- case grab:
- case posing:
- case lost:
- case endOfUse:
+ case 2:
+ // two buoy
if (reset) {
- states.bindEmptyBuoy(states.getReferenceCache(), bean, getTransmittingBuoy1(), states.getBuoyOperation(codeOperations[0]));
+ states.bindEmptyBuoy(states.getReferenceCache(), bean, getTransmittingBuoy1(), states.getBuoyOperation(transmittingBuoyOperationCodes[0]));
+ states.bindEmptyBuoy(states.getReferenceCache(), bean, getTransmittingBuoy2(), states.getBuoyOperation(transmittingBuoyOperationCodes[1]));
} else {
states.bindExistingBuoy(bean, getTransmittingBuoy1(), modelBuoyList.get(0));
+ states.bindExistingBuoy(bean, getTransmittingBuoy2(), modelBuoyList.get(1));
}
editorPanel.add(getTransmittingBuoy1EditorPanel());
+ editorPanel.add(getTransmittingBuoy2EditorPanel());
if (states.isEditing()) {
getValidatorBuoy1().setBean(getTransmittingBuoy1());
+ getValidatorBuoy2().setBean(getTransmittingBuoy2());
}
focusOwner = getTransmittingBuoyType1();
break;
+ default:
+ // can't happen
+ throw new IllegalArgumentException(String.format("Can't have %d buoy count", typeOperation.getBuoyCount()));
}
//FIXME:Focus update zone focus owner
JComponent finalFocusOwner = focusOwner;
=====================================
client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/dcp/FloatingObjectPartsTreeNode.java
=====================================
@@ -119,19 +119,19 @@ public class FloatingObjectPartsTreeNode extends AbstractMutableTreeTableNode im
throw new IllegalStateException();
}
- void setValueAt(Object aValue, int column) {
+ void setValueAt(String value, int column) {
text = null;
switch (column) {
case 1: // when arriving
- uiModelStates.setWhenArriving(dto.getId(), aValue == null ? null : String.valueOf(aValue));
+ uiModelStates.setWhenArriving(dto.getId(), value);
if (useValidation) {
- valueValidOnArriving = dto.isValid(aValue);
+ valueValidOnArriving = dto.isValid(value);
}
return;
case 2: // when leaving
- uiModelStates.setWhenLeaving(dto.getId(), aValue == null ? null : String.valueOf(aValue));
+ uiModelStates.setWhenLeaving(dto.getId(), value);
if (useValidation) {
- valueValidOnLeaving = dto.isValid(aValue);
+ valueValidOnLeaving = dto.isValid(value);
}
return;
}
@@ -250,7 +250,11 @@ public class FloatingObjectPartsTreeNode extends AbstractMutableTreeTableNode im
@Override
public void setValueAt(Object aValue, int column) {
- getUserObject().setValueAt(aValue, column);
+ String value = aValue == null ? null : String.valueOf(aValue).trim();
+ if (Objects.equals("", value)) {
+ value = null;
+ }
+ getUserObject().setValueAt(value, column);
}
@Override
=====================================
client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/logbook/FloatingObjectUI.jaxx
=====================================
@@ -199,7 +199,7 @@
<cell anchor='east' weightx="1" fill="both">
<BeanEnumEditor id='typeOperation' genericType='TypeTransmittingBuoyOperation'
constructorParams='TypeTransmittingBuoyOperation.class'
- onItemStateChanged='changeTypeOperation(event,getStates());'/>
+ onItemStateChanged='changeTypeTransmittingBuoyOperation(event,getStates());'/>
</cell>
</row>
</Table>
=====================================
client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/observation/FloatingObjectUI.jaxx
=====================================
@@ -199,7 +199,7 @@
<cell anchor='east' weightx="1" fill="both">
<BeanEnumEditor id='typeOperation' genericType='TypeTransmittingBuoyOperation'
constructorParams='TypeTransmittingBuoyOperation.class'
- onItemStateChanged='changeTypeOperation(event,getStates());'/>
+ onItemStateChanged='changeTypeTransmittingBuoyOperation(event,getStates());'/>
</cell>
</row>
</Table>
=====================================
core/api/dto/src/main/java/fr/ird/observe/dto/data/ps/TypeTransmittingBuoyOperation.java
=====================================
@@ -26,6 +26,8 @@ import fr.ird.observe.dto.referential.ps.common.TransmittingBuoyOperationReferen
import io.ultreia.java4all.i18n.spi.enumeration.TranslateEnumeration;
import java.util.List;
+import java.util.Set;
+import java.util.TreeSet;
/**
* @author Tony Chemit - dev(a)tchemit.fr
@@ -34,71 +36,74 @@ import java.util.List;
public enum TypeTransmittingBuoyOperation {
// no buoy
noBuoy(false),
-
// one buoy
visit(false, "1"),
grab(false, "2"),
posing(false, "3"),
lost(true, "4"),
- unknown(false, "99"),
endOfUse(true, "5"),
-
+ unknown(false, "99"),
// two buoy
grabAndChange(false, "2", "3");
-
/**
* TransmittingBuoyOperation codes associated to this type.
*/
- private final String[] codeOperation;
+ private final String[] transmittingBuoyOperationCodes;
+ /**
+ * Number of buoy authorized for this type.
+ */
+ private final int buoyCount;
/**
* Use coordinate?
*/
private final boolean withCoordinate;
public static TypeTransmittingBuoyOperation guessTransmittingBuoyOperation(List<TransmittingBuoyOperationReference> transmittingBuoy) {
- if (transmittingBuoy.isEmpty()) {
-
- // no buoy
- return TypeTransmittingBuoyOperation.noBuoy;
- }
- if (transmittingBuoy.size() == 1) {
- // one buoy
- TransmittingBuoyOperationReference operation = transmittingBuoy.iterator().next();
- String code = operation.getCode();
- switch (Integer.parseInt(code)) {
- case 1:
- return TypeTransmittingBuoyOperation.visit;
- case 2:
- return TypeTransmittingBuoyOperation.grab;
- case 3:
- return TypeTransmittingBuoyOperation.posing;
- case 4:
- return TypeTransmittingBuoyOperation.lost;
- case 5:
- return TypeTransmittingBuoyOperation.endOfUse;
- default:
- throw new IllegalStateException(String.format("operation must be between 1 to 5, but was %s", code));
- }
- }
- if (transmittingBuoy.size() == 2) {
- // two buoy
- return TypeTransmittingBuoyOperation.grabAndChange;
+ int transmittingBuoyCount = transmittingBuoy.size();
+ switch (transmittingBuoyCount) {
+ case 0:
+ // no buoy
+ return TypeTransmittingBuoyOperation.noBuoy;
+ case 1:
+ // one buoy
+ TransmittingBuoyOperationReference operation = transmittingBuoy.iterator().next();
+ String code = operation.getCode();
+ for (TypeTransmittingBuoyOperation typeTransmittingBuoyOperation : TypeTransmittingBuoyOperation.values()) {
+ if (typeTransmittingBuoyOperation.getBuoyCount() == 1 && typeTransmittingBuoyOperation.getTransmittingBuoyOperationCodes()[0].equals(code)) {
+ return typeTransmittingBuoyOperation;
+ }
+ }
+ Set<String> availableCodes = new TreeSet<>();
+ for (TypeTransmittingBuoyOperation typeTransmittingBuoyOperation : TypeTransmittingBuoyOperation.values()) {
+ if (typeTransmittingBuoyOperation.getBuoyCount() == 1) {
+ availableCodes.add(typeTransmittingBuoyOperation.getTransmittingBuoyOperationCodes()[0]);
+ }
+ }
+ throw new IllegalStateException(String.format("When having a single buoy, TransmittingBuoyOperation code must be among: %s, but was %s", availableCodes, code));
+ case 2:
+ // two buoy
+ return TypeTransmittingBuoyOperation.grabAndChange;
+ default:
+ throw new IllegalStateException(String.format("A floating object, can only have 0, 1 or 2 buoy(s) but found %d buoys", transmittingBuoyCount));
}
- throw new IllegalStateException(String.format("A dcp, can only have 0, 1 or 2 buoys, found %d", transmittingBuoy.size()));
-
}
- TypeTransmittingBuoyOperation(boolean withCoordinate, String... codeOperation) {
- this.codeOperation = codeOperation;
+ TypeTransmittingBuoyOperation(boolean withCoordinate, String... transmittingBuoyOperationCodes) {
+ this.transmittingBuoyOperationCodes = transmittingBuoyOperationCodes;
this.withCoordinate = withCoordinate;
+ this.buoyCount = transmittingBuoyOperationCodes.length;
}
public boolean isWithCoordinate() {
return withCoordinate;
}
- public String[] getCodeOperation() {
- return codeOperation;
+ public String[] getTransmittingBuoyOperationCodes() {
+ return transmittingBuoyOperationCodes;
+ }
+
+ public int getBuoyCount() {
+ return buoyCount;
}
public String getLabel() {
=====================================
core/persistence/migration/src/main/java/fr/ird/observe/spi/migration/v9/DataSourceMigrationForVersion_9_1.java
=====================================
@@ -288,7 +288,8 @@ public class DataSourceMigrationForVersion_9_1 extends ByMajorMigrationVersionRe
// See https://gitlab.com/ultreiaio/ird-observe/-/issues/2619
addNewTable(executor, withIds, "07", "table-ps_localmarket_buyer");
executor.addScript("07", "adapt-table-ps_localmarket_batch");
- if (withIds && isForTck()) {
+ //FIXME Set this back to tck (or remove simply it when we will have some data)
+ if (withIds /**&& isForTck()**/) {
// Add some referential with no usage inside others referential to make possible delete test
// See fr.ird.observe.persistence.test.request.DeleteReferentialRequestTest
executor.addScript("07-tck", "fill-table-ps_localmarket_buyer");
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/290d4e764c86cc9077b293a7…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/290d4e764c86cc9077b293a7…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop-9.0.x] 2 commits: Amélioration de l'éditeur des matériaux de DCP - Closes #2623
by Tony CHEMIT (@tchemit) 07 Feb '23
by Tony CHEMIT (@tchemit) 07 Feb '23
07 Feb '23
Tony CHEMIT pushed to branch develop-9.0.x at ultreiaio / ird-observe
Commits:
1491d237 by Tony Chemit at 2023-02-07T11:57:37+01:00
Amélioration de l'éditeur des matériaux de DCP - Closes #2623
- - - - -
996ddb15 by Tony Chemit at 2023-02-07T11:58:43+01:00
Floating object - improve TypeTransmittingBuoyOperation code
- - - - -
5 changed files:
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/dcp/DcpUIAdapter.java
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/dcp/FloatingObjectPartsTreeNode.java
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/logbook/FloatingObjectUI.jaxx
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/observation/FloatingObjectUI.jaxx
- core/api/dto/src/main/java/fr/ird/observe/dto/data/ps/TypeTransmittingBuoyOperation.java
Changes:
=====================================
client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/dcp/DcpUIAdapter.java
=====================================
@@ -162,7 +162,7 @@ public interface DcpUIAdapter<T extends TransmittingBuoyAware> extends JAXXObjec
default void onOpenAfterOpenModel(DcpUIModelStates<?, ?> states) {
processDataBinding("typeOperation.selectedItem");
TypeTransmittingBuoyOperation typeOperation = getTypeOperation().getSelectedValue();
- changeTypeOperation(states, typeOperation, false);
+ changeTypeTransmittingBuoyOperation(states, typeOperation, false);
}
default void stopEditUI() {
@@ -173,9 +173,9 @@ public interface DcpUIAdapter<T extends TransmittingBuoyAware> extends JAXXObjec
getValidatorBuoy2().setBean(null);
}
- default void changeTypeOperation(ItemEvent event, DcpUIModelStates<?, ?> states) {
+ default void changeTypeTransmittingBuoyOperation(ItemEvent event, DcpUIModelStates<?, ?> states) {
if (event.getStateChange() == ItemEvent.SELECTED && states.isEditing()) {
- changeTypeOperation(states, getTypeOperation().getSelectedValue(), true);
+ changeTypeTransmittingBuoyOperation(states, getTypeOperation().getSelectedValue(), true);
states.setModified(true);
}
}
@@ -191,7 +191,7 @@ public interface DcpUIAdapter<T extends TransmittingBuoyAware> extends JAXXObjec
states.setModified(states.isCreatingMode());
}
- default void changeTypeOperation(DcpUIModelStates<?, ?> states, TypeTransmittingBuoyOperation typeOperation, boolean reset) {
+ default void changeTypeTransmittingBuoyOperation(DcpUIModelStates<?, ?> states, TypeTransmittingBuoyOperation typeOperation, boolean reset) {
if (Objects.requireNonNull(typeOperation).isWithCoordinate()) {
addTransmittingBuoyCoordinate();
@@ -208,7 +208,7 @@ public interface DcpUIAdapter<T extends TransmittingBuoyAware> extends JAXXObjec
}
if (withBuoy) {
- // always reset balise lues of editBean to avoid side-effects
+ // always reset buoys of editBean to avoid side-effects
bean.getTransmittingBuoy().clear();
}
@@ -221,45 +221,47 @@ public interface DcpUIAdapter<T extends TransmittingBuoyAware> extends JAXXObjec
getValidatorBuoy2().setBean(null);
}
- String[] codeOperations = typeOperation.getCodeOperation();
- JComponent focusOwner = null;
- switch (typeOperation) {
- case noBuoy:
+ String[] transmittingBuoyOperationCodes = typeOperation.getTransmittingBuoyOperationCodes();
+ JComponent focusOwner;
+ switch (typeOperation.getBuoyCount()) {
+ case 0:
+ // no buoy
editorPanel.add(getNoBuoyEditor());
focusOwner = getComment();
break;
- case grabAndChange:
+ case 1:
+ // one buoy
if (reset) {
- states.bindEmptyBuoy(states.getReferenceCache(), bean, getTransmittingBuoy1(), states.getBuoyOperation(codeOperations[0]));
- states.bindEmptyBuoy(states.getReferenceCache(), bean, getTransmittingBuoy2(), states.getBuoyOperation(codeOperations[1]));
+ states.bindEmptyBuoy(states.getReferenceCache(), bean, getTransmittingBuoy1(), states.getBuoyOperation(transmittingBuoyOperationCodes[0]));
} else {
states.bindExistingBuoy(bean, getTransmittingBuoy1(), modelBuoyList.get(0));
- states.bindExistingBuoy(bean, getTransmittingBuoy2(), modelBuoyList.get(1));
}
editorPanel.add(getTransmittingBuoy1EditorPanel());
- editorPanel.add(getTransmittingBuoy2EditorPanel());
if (states.isEditing()) {
getValidatorBuoy1().setBean(getTransmittingBuoy1());
- getValidatorBuoy2().setBean(getTransmittingBuoy2());
}
focusOwner = getTransmittingBuoyType1();
break;
- case visit:
- case grab:
- case posing:
- case lost:
- case endOfUse:
+ case 2:
+ // two buoy
if (reset) {
- states.bindEmptyBuoy(states.getReferenceCache(), bean, getTransmittingBuoy1(), states.getBuoyOperation(codeOperations[0]));
+ states.bindEmptyBuoy(states.getReferenceCache(), bean, getTransmittingBuoy1(), states.getBuoyOperation(transmittingBuoyOperationCodes[0]));
+ states.bindEmptyBuoy(states.getReferenceCache(), bean, getTransmittingBuoy2(), states.getBuoyOperation(transmittingBuoyOperationCodes[1]));
} else {
states.bindExistingBuoy(bean, getTransmittingBuoy1(), modelBuoyList.get(0));
+ states.bindExistingBuoy(bean, getTransmittingBuoy2(), modelBuoyList.get(1));
}
editorPanel.add(getTransmittingBuoy1EditorPanel());
+ editorPanel.add(getTransmittingBuoy2EditorPanel());
if (states.isEditing()) {
getValidatorBuoy1().setBean(getTransmittingBuoy1());
+ getValidatorBuoy2().setBean(getTransmittingBuoy2());
}
focusOwner = getTransmittingBuoyType1();
break;
+ default:
+ // can't happen
+ throw new IllegalArgumentException(String.format("Can't have %d buoy count", typeOperation.getBuoyCount()));
}
//FIXME:Focus update zone focus owner
JComponent finalFocusOwner = focusOwner;
=====================================
client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/dcp/FloatingObjectPartsTreeNode.java
=====================================
@@ -119,19 +119,19 @@ public class FloatingObjectPartsTreeNode extends AbstractMutableTreeTableNode im
throw new IllegalStateException();
}
- void setValueAt(Object aValue, int column) {
+ void setValueAt(String value, int column) {
text = null;
switch (column) {
case 1: // when arriving
- uiModelStates.setWhenArriving(dto.getId(), aValue == null ? null : String.valueOf(aValue));
+ uiModelStates.setWhenArriving(dto.getId(), value);
if (useValidation) {
- valueValidOnArriving = dto.isValid(aValue);
+ valueValidOnArriving = dto.isValid(value);
}
return;
case 2: // when leaving
- uiModelStates.setWhenLeaving(dto.getId(), aValue == null ? null : String.valueOf(aValue));
+ uiModelStates.setWhenLeaving(dto.getId(), value);
if (useValidation) {
- valueValidOnLeaving = dto.isValid(aValue);
+ valueValidOnLeaving = dto.isValid(value);
}
return;
}
@@ -250,7 +250,11 @@ public class FloatingObjectPartsTreeNode extends AbstractMutableTreeTableNode im
@Override
public void setValueAt(Object aValue, int column) {
- getUserObject().setValueAt(aValue, column);
+ String value = aValue == null ? null : String.valueOf(aValue).trim();
+ if (Objects.equals("", value)) {
+ value = null;
+ }
+ getUserObject().setValueAt(value, column);
}
@Override
=====================================
client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/logbook/FloatingObjectUI.jaxx
=====================================
@@ -199,7 +199,7 @@
<cell anchor='east' weightx="1" fill="both">
<BeanEnumEditor id='typeOperation' genericType='TypeTransmittingBuoyOperation'
constructorParams='TypeTransmittingBuoyOperation.class'
- onItemStateChanged='changeTypeOperation(event,getStates());'/>
+ onItemStateChanged='changeTypeTransmittingBuoyOperation(event,getStates());'/>
</cell>
</row>
</Table>
=====================================
client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/observation/FloatingObjectUI.jaxx
=====================================
@@ -199,7 +199,7 @@
<cell anchor='east' weightx="1" fill="both">
<BeanEnumEditor id='typeOperation' genericType='TypeTransmittingBuoyOperation'
constructorParams='TypeTransmittingBuoyOperation.class'
- onItemStateChanged='changeTypeOperation(event,getStates());'/>
+ onItemStateChanged='changeTypeTransmittingBuoyOperation(event,getStates());'/>
</cell>
</row>
</Table>
=====================================
core/api/dto/src/main/java/fr/ird/observe/dto/data/ps/TypeTransmittingBuoyOperation.java
=====================================
@@ -26,6 +26,8 @@ import fr.ird.observe.dto.referential.ps.common.TransmittingBuoyOperationReferen
import io.ultreia.java4all.i18n.spi.enumeration.TranslateEnumeration;
import java.util.List;
+import java.util.Set;
+import java.util.TreeSet;
/**
* @author Tony Chemit - dev(a)tchemit.fr
@@ -34,70 +36,73 @@ import java.util.List;
public enum TypeTransmittingBuoyOperation {
// no buoy
noBuoy(false),
-
// one buoy
visit(false, "1"),
grab(false, "2"),
posing(false, "3"),
lost(true, "4"),
endOfUse(true, "5"),
-
// two buoy
grabAndChange(false, "2", "3");
-
/**
* TransmittingBuoyOperation codes associated to this type.
*/
- private final String[] codeOperation;
+ private final String[] transmittingBuoyOperationCodes;
+ /**
+ * Number of buoy authorized for this type.
+ */
+ private final int buoyCount;
/**
* Use coordinate?
*/
private final boolean withCoordinate;
public static TypeTransmittingBuoyOperation guessTransmittingBuoyOperation(List<TransmittingBuoyOperationReference> transmittingBuoy) {
- if (transmittingBuoy.isEmpty()) {
-
- // no buoy
- return TypeTransmittingBuoyOperation.noBuoy;
+ int transmittingBuoyCount = transmittingBuoy.size();
+ switch (transmittingBuoyCount) {
+ case 0:
+ // no buoy
+ return TypeTransmittingBuoyOperation.noBuoy;
+ case 1:
+ // one buoy
+ TransmittingBuoyOperationReference operation = transmittingBuoy.iterator().next();
+ String code = operation.getCode();
+ for (TypeTransmittingBuoyOperation typeTransmittingBuoyOperation : TypeTransmittingBuoyOperation.values()) {
+ if (typeTransmittingBuoyOperation.getBuoyCount() == 1 && typeTransmittingBuoyOperation.getTransmittingBuoyOperationCodes()[0].equals(code)) {
+ return typeTransmittingBuoyOperation;
+ }
+ }
+ Set<String> availableCodes = new TreeSet<>();
+ for (TypeTransmittingBuoyOperation typeTransmittingBuoyOperation : TypeTransmittingBuoyOperation.values()) {
+ if (typeTransmittingBuoyOperation.getBuoyCount() == 1) {
+ availableCodes.add(typeTransmittingBuoyOperation.getTransmittingBuoyOperationCodes()[0]);
+ }
+ }
+ throw new IllegalStateException(String.format("When having a single buoy, TransmittingBuoyOperation code must be among: %s, but was %s", availableCodes, code));
+ case 2:
+ // two buoy
+ return TypeTransmittingBuoyOperation.grabAndChange;
+ default:
+ throw new IllegalStateException(String.format("A floating object, can only have 0, 1 or 2 buoy(s) but found %d buoys", transmittingBuoyCount));
}
- if (transmittingBuoy.size() == 1) {
- // one buoy
- TransmittingBuoyOperationReference operation = transmittingBuoy.iterator().next();
- String code = operation.getCode();
- switch (Integer.parseInt(code)) {
- case 1:
- return TypeTransmittingBuoyOperation.visit;
- case 2:
- return TypeTransmittingBuoyOperation.grab;
- case 3:
- return TypeTransmittingBuoyOperation.posing;
- case 4:
- return TypeTransmittingBuoyOperation.lost;
- case 5:
- return TypeTransmittingBuoyOperation.endOfUse;
- default:
- throw new IllegalStateException(String.format("operation must be between 1 to 5, but was %s", code));
- }
- }
- if (transmittingBuoy.size() == 2) {
- // two buoy
- return TypeTransmittingBuoyOperation.grabAndChange;
- }
- throw new IllegalStateException(String.format("A dcp, can only have 0, 1 or 2 buoys, found %d", transmittingBuoy.size()));
-
}
- TypeTransmittingBuoyOperation(boolean withCoordinate, String... codeOperation) {
- this.codeOperation = codeOperation;
+ TypeTransmittingBuoyOperation(boolean withCoordinate, String... transmittingBuoyOperationCodes) {
+ this.transmittingBuoyOperationCodes = transmittingBuoyOperationCodes;
this.withCoordinate = withCoordinate;
+ this.buoyCount = transmittingBuoyOperationCodes.length;
}
public boolean isWithCoordinate() {
return withCoordinate;
}
- public String[] getCodeOperation() {
- return codeOperation;
+ public String[] getTransmittingBuoyOperationCodes() {
+ return transmittingBuoyOperationCodes;
+ }
+
+ public int getBuoyCount() {
+ return buoyCount;
}
public String getLabel() {
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/0679edc1da3eebe7d21ff9aa…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/0679edc1da3eebe7d21ff9aa…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop] Review AVDTH migration documentation
by Tony CHEMIT (@tchemit) 06 Feb '23
by Tony CHEMIT (@tchemit) 06 Feb '23
06 Feb '23
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
290d4e76 by Tony Chemit at 2023-02-06T17:15:20+01:00
Review AVDTH migration documentation
- - - - -
5 changed files:
- src/site/markdown/avdth/common.md
- src/site/markdown/avdth/landing.md
- src/site/markdown/avdth/local_market.md
- src/site/markdown/avdth/logbook.md
- src/site/markdown/avdth/sample.md
Changes:
=====================================
src/site/markdown/avdth/common.md
=====================================
@@ -26,12 +26,12 @@ Cette table est intégralement déversée dans la table *Trip*.
| MAREE_16 | C_TOPIAID | ??? | |
| MAREE_17 | F_CAL_VID_DPT | Trip.departureWellContentStatus | [2](#n_2) |
-* Note 1
-### <a name="n_1"></a>
+* Note 1 <a name="n_1"></a>
+
```F_ENQ > 0 ? AcquisitionStatus(1) : AcquisitionStatus(99)```
-* Note 2
-### <a name="n_2"></a>
+* Note 2 <a name="n_2"></a>
+
```CODE == 0 ? WellContentStatus(2) : WellContentStatus(CODE)```
[Retour à l'introduction](./index.html)
\ No newline at end of file
=====================================
src/site/markdown/avdth/landing.md
=====================================
@@ -6,34 +6,33 @@ Toutes les données sont déversées dans le paquetage **ps_landing**.
Table déversée dans la table d'ObServe **Landing**.
-|n° | nom | destination |note |
-|:--- | :--- | :--- |:--- |
-| LOT_COM_01 | C_BAT | Landing.trip | [1](#n_0_1)|
-| LOT_COM_02 | D_DBQ | Landing.trip | [1](#n_0_1)|
-| LOT_COM_03 | N_LOT | Landing.homeId | |
-| LOT_COM_04 | C_ESP | Landing.species | [2](#n_0_2), [5](#n_0_5)|
-| LOT_COM_05 | C_CAT_C | Landing.weightCategory | [3](#n_0_3)|
-| LOT_COM_06 | V_POIDS_LC | Landing.weight | |
-| LOT_COM_07 | C_DEST | Landing.destination | [4](#n_0_4)|
-
-* Note 1
-### <a name="n_0_1"></a>
+| n° | nom | destination | note |
+|:-----------|:-----------|:-----------------------|:-------------------------|
+| LOT_COM_01 | C_BAT | Landing.trip | [1](#n_0_1) |
+| LOT_COM_02 | D_DBQ | Landing.trip | [1](#n_0_1) |
+| LOT_COM_03 | N_LOT | Landing.homeId | |
+| LOT_COM_04 | C_ESP | Landing.species | [2](#n_0_2), [5](#n_0_5) |
+| LOT_COM_05 | C_CAT_C | Landing.weightCategory | [3](#n_0_3) |
+| LOT_COM_06 | V_POIDS_LC | Landing.weight | |
+| LOT_COM_07 | C_DEST | Landing.destination | [4](#n_0_4) |
+
+* Note 1 <a name="n_0_1"></a>
+
Identifie la marée
-* Note 2
-### <a name="n_0_2"></a>
+* Note 2 <a name="n_0_2"></a>
+
Voir mapping [REF_SPECIES](./referential.html#REF_SPECIES)
-* Note 3
-### <a name="n_0_3"></a>
+* Note 3 <a name="n_0_3"></a>
+
Voir mapping [REF_LANDING_WEIGHT_CATEGORY](./referential.html#REF_LANDING_WEIGHT_CATEGORY)
-* Note 4
-### <a name="n_0_4"></a>
+* Note 4 <a name="n_0_4"></a>
+
Mapping direct sur le code du référentiel **ps_landing.Destination**.
-* Note 5
-### <a name="n_0_5"></a>
+* Note 5 <a name="n_0_5"></a>
On positionne **ps_landing.Landing.fate** à partir du code suivant
=====================================
src/site/markdown/avdth/local_market.md
=====================================
@@ -6,129 +6,130 @@ Toutes les données sont déversées dans le paquetage **ps_localmarket**.
Table déversée dans la table d'ObServe **Batch**
-|n° | nom | destination |note |
-|:--- | :--- | :--- |:--- |
-| FP_LOT_01 | C_BAT | Batch.trip | [1](#n_0_1)|
-| FP_LOT_02 | D_DBQ | Batch.trip | [1](#n_0_1)|
-| FP_LOT_03 | N_LOT | Batch.homeId | |
-| FP_LOT_04 | C_ESP | Batch.species | [2](#n_0_2)|
-| FP_LOT_05 | C_COND | Batch.packaging | [3](#n_0_3)|
-| FP_LOT_06 | N_UNIT | Batch.count | |
-| FP_LOT_07 | V_POIDS_PESE | Batch.weight | |
-| FP_LOT_08 | L_ORIGINE | Batch.origin | |
-| FP_LOT_09 | L_COM | Batch.comment | |
+| n° | nom | destination | note |
+|:----------|:-------------|:----------------|:------------|
+| FP_LOT_01 | C_BAT | Batch.trip | [1](#n_0_1) |
+| FP_LOT_02 | D_DBQ | Batch.trip | [1](#n_0_1) |
+| FP_LOT_03 | N_LOT | Batch.homeId | |
+| FP_LOT_04 | C_ESP | Batch.species | [2](#n_0_2) |
+| FP_LOT_05 | C_COND | Batch.packaging | [3](#n_0_3) |
+| FP_LOT_06 | N_UNIT | Batch.count | |
+| FP_LOT_07 | V_POIDS_PESE | Batch.weight | |
+| FP_LOT_08 | L_ORIGINE | Batch.origin | |
+| FP_LOT_09 | L_COM | Batch.comment | |
* Note 1
### <a name="n_0_1"></a>
+
Identifie la marée
* Note 2
### <a name="n_0_2"></a>
+
Voir mapping [REF_SPECIES](./referential.html#REF_SPECIES)
* Note 3
### <a name="n_0_3"></a>
+
Mapping direct sur le code du référentiel **ps_localmarket.Packaging**.
### Table FP_SONDAGE
Table déversée dans la table d'ObServe **Survey** et **SurveyPart**.
-|n° | nom | destination |note |
-|:--- | :--- | :--- |:--- |
-| FP_SONDAGE_01 | C_BAT | Survey.trip | [1](#n_1_1)|
-| FP_SONDAGE_02 | D_DBQ | Survey.trip | [1](#n_1_1)|
-| FP_SONDAGE_03 | N_SOND | Survey.homeId | |
-| FP_SONDAGE_04 | C_ESP | SurveyPart.species | [2](#n_1_2)|
-| FP_SONDAGE_05 | V_PROP | SurveyPart.proportion | |
+| n° | nom | destination | note |
+|:--------------|:-------|:----------------------|:------------|
+| FP_SONDAGE_01 | C_BAT | Survey.trip | [1](#n_1_1) |
+| FP_SONDAGE_02 | D_DBQ | Survey.trip | [1](#n_1_1) |
+| FP_SONDAGE_03 | N_SOND | Survey.homeId | |
+| FP_SONDAGE_04 | C_ESP | SurveyPart.species | [2](#n_1_2) |
+| FP_SONDAGE_05 | V_PROP | SurveyPart.proportion | |
+* Note 1 <a name="n_1_1"></a>
-* Note 1
-### <a name="n_1_1"></a>
Identifie la marée
-* Note 2
-### <a name="n_1_2"></a>
+* Note 2 <a name="n_1_2"></a>
+
Voir mapping [REF_SPECIES](./referential.html#REF_SPECIES)
### Table FP_ECHANTILLON
Table déversée dans la table d'ObServe **Sample**.
-|n° | nom | destination |note |
-|:--- | :--- | :--- |:--- |
-| FP_ECHANTILLON_01 | C_BAT | Sample.trip | [1](#n_2_1)|
-| FP_ECHANTILLON_02 | D_DBQ | Sample.trip | [1](#n_2_1)|
-| FP_ECHANTILLON_03 | N_ECH | Sample.number | |
-| FP_ECHANTILLON_04 | D_ECH | Sample.date | |
-| FP_ECHANTILLON_05 | C_BAT_REEL | ??? | |
+| n° | nom | destination | note |
+|:------------------|:-----------|:--------------|:------------|
+| FP_ECHANTILLON_01 | C_BAT | Sample.trip | [1](#n_2_1) |
+| FP_ECHANTILLON_02 | D_DBQ | Sample.trip | [1](#n_2_1) |
+| FP_ECHANTILLON_03 | N_ECH | Sample.number | |
+| FP_ECHANTILLON_04 | D_ECH | Sample.date | |
+| FP_ECHANTILLON_05 | C_BAT_REEL | ??? | |
+* Note 1 <a name="n_2_1"></a>
-* Note 1
-### <a name="n_2_1"></a>
Identifie la marée
### Table FP_ECH_ESP
Table déversée dans la table d'ObServe **SampleSpecies**.
-|n° | nom | destination |note |
-|:--- | :--- | :--- |:--- |
-| FP_ECH_ESP_01 | C_BAT | SampleSpecies.sample | [1](#n_3_1)|
-| FP_ECH_ESP_02 | D_DBQ | SampleSpecies.sample | [1](#n_3_1)|
-| FP_ECH_ESP_03 | N_ECH | SampleSpecies.sample | [1](#n_3_1)|
-| FP_ECH_ESP_04 | C_ESP | SampleSpecies.species | [2](#n_3_2)|
-| FP_ECH_ESP_05 | F_LDLF | SampleSpecies.sizeMeasureType | [3](#n_3_3)|
-| FP_ECH_ESP_06 | V_NB_MES | SampleSpecies.measureCount | |
+| n° | nom | destination | note |
+|:--------------|:---------|:------------------------------|:------------|
+| FP_ECH_ESP_01 | C_BAT | SampleSpecies.sample | [1](#n_3_1) |
+| FP_ECH_ESP_02 | D_DBQ | SampleSpecies.sample | [1](#n_3_1) |
+| FP_ECH_ESP_03 | N_ECH | SampleSpecies.sample | [1](#n_3_1) |
+| FP_ECH_ESP_04 | C_ESP | SampleSpecies.species | [2](#n_3_2) |
+| FP_ECH_ESP_05 | F_LDLF | SampleSpecies.sizeMeasureType | [3](#n_3_3) |
+| FP_ECH_ESP_06 | V_NB_MES | SampleSpecies.measureCount | |
+
+* Note 1 <a name="n_3_1"></a>
-* Note 1
-### <a name="n_3_1"></a>
Identifie l'échantillon
-* Note 2
-### <a name="n_3_2"></a>
+* Note 2 <a name="n_3_2"></a>
+
Voir mapping [REF_SPECIES](./referential.html#REF_SPECIES)
-* Note 3
-### <a name="n_3_3"></a>
+* Note 3 <a name="n_3_3"></a>
+
Voir mapping [REF_SIZE_MEASURE_TYPE](./referential.html#REF_SIZE_MEASURE_TYPE)
### Table FP_ECH_FREQT
Table déversée dans la table d'ObServe **SampleSpeciesMeasure**.
-|n° | nom | destination |note |
-|:--- | :--- | :--- |:--- |
-| FP_ECH_FREQT_01 | C_BAT | SampleSpeciesMeasure.sampleSpecies | [1](#n_4_1)|
-| FP_ECH_FREQT_02 | D_DBQ | SampleSpeciesMeasure.sampleSpecies | [1](#n_4_1)|
-| FP_ECH_FREQT_03 | N_ECH | SampleSpeciesMeasure.sampleSpecies | [1](#n_4_1)|
-| FP_ECH_FREQT_04 | C_ESP | SampleSpeciesMeasure.sampleSpecies | [1](#n_4_1)|
-| FP_ECH_FREQT_05 | F_LDLF | SampleSpeciesMeasure.sampleSpecies | [1](#n_4_1)|
-| FP_ECH_FREQT_06 | V_LONG | SampleSpeciesMeasure.sizeClass | |
-| FP_ECH_FREQT_07 | V_EFF | SampleSpeciesMeasure.count | |
+| n° | nom | destination | note |
+|:----------------|:-------|:-----------------------------------|:------------|
+| FP_ECH_FREQT_01 | C_BAT | SampleSpeciesMeasure.sampleSpecies | [1](#n_4_1) |
+| FP_ECH_FREQT_02 | D_DBQ | SampleSpeciesMeasure.sampleSpecies | [1](#n_4_1) |
+| FP_ECH_FREQT_03 | N_ECH | SampleSpeciesMeasure.sampleSpecies | [1](#n_4_1) |
+| FP_ECH_FREQT_04 | C_ESP | SampleSpeciesMeasure.sampleSpecies | [1](#n_4_1) |
+| FP_ECH_FREQT_05 | F_LDLF | SampleSpeciesMeasure.sampleSpecies | [1](#n_4_1) |
+| FP_ECH_FREQT_06 | V_LONG | SampleSpeciesMeasure.sizeClass | |
+| FP_ECH_FREQT_07 | V_EFF | SampleSpeciesMeasure.count | |
+
+* Note 1 <a name="n_4_1"></a>
-* Note 1
-### <a name="n_4_1"></a>
Identifie l'échantillon espèce
### Table FP_ECH_CUVE
Table déversée dans la table d'ObServe **Sample_Well**.
-|n° | nom | destination |note |
-|:--- | :--- | :--- |:--- |
-| FP_ECH_CUVE_01 | C_BAT | Sample_Well.sample | [1](#n_5_1)|
-| FP_ECH_CUVE_02 | D_DBQ | Sample_Well.sample | [1](#n_5_1)|
-| FP_ECH_CUVE_03 | N_ECH | Sample_Well.sample | [1](#n_5_1)|
-| FP_ECH_CUVE_04 | N_CUVE | Sample_Well.well | [2](#n_5_2)|
-| FP_ECH_CUVE_05 | C_POSITION | Sample_Well.well | [2](#n_5_2)|
+| n° | nom | destination | note |
+|:---------------|:-----------|:-------------------|:------------|
+| FP_ECH_CUVE_01 | C_BAT | Sample_Well.sample | [1](#n_5_1) |
+| FP_ECH_CUVE_02 | D_DBQ | Sample_Well.sample | [1](#n_5_1) |
+| FP_ECH_CUVE_03 | N_ECH | Sample_Well.sample | [1](#n_5_1) |
+| FP_ECH_CUVE_04 | N_CUVE | Sample_Well.well | [2](#n_5_2) |
+| FP_ECH_CUVE_05 | C_POSITION | Sample_Well.well | [2](#n_5_2) |
+
+* Note 1 <a name="n_5_1"></a>
-* Note 1
-### <a name="n_5_1"></a>
Identifie l'échantillon
-* Note 2
-### <a name="n_5_2"></a>
+* Note 2 <a name="n_5_2"></a>
+
Identifiant de cuve
Voir mapping [REF_WELL_ID](./referential.html#REF_WELL_ID)
=====================================
src/site/markdown/avdth/logbook.md
=====================================
@@ -55,54 +55,54 @@ La table est déversée dans plusieurs tables :
| ACTIVITE_35 | C_Z_FPA | Activity.fpaZone | [12](#n_0_12) |
-* Note 1
-### <a name="n_0_1"></a>
+* Note 1 <a name="n_0_1"></a>
+
Permet de construire l'heure de l'activité
-* Note 2
-### <a name="n_0_2"></a>
-Dans ObServe les coordonnées sont signés, on déduit les signes depuis le champs *Q_ACT* quadrant d'AVDTH
+* Note 2 <a name="n_0_2"></a>
+
+Dans ObServe les coordonnées sont signées, on déduit les signes depuis le champs *Q_ACT* quadrant d'AVDTH
+
+* Note 3 <a name="n_0_3"></a>
-* Note 3
-### <a name="n_0_3"></a>
On effecute la somme pour toutes les activités AVDTH du jour
-* Note 4
-### <a name="n_0_4"></a>
+* Note 4 <a name="n_0_4"></a>
+
Voir mapping [REF_VESSEL_ACTIVITY_TYPE](./referential.html#REF_VESSEL_ACTIVITY_TYPE)
-* Note 5
-### <a name="n_0_5"></a>
+* Note 5 <a name="n_0_5"></a>
+
Voir mapping [REF_SCHOOL_TYPE](./referential.html#REF_SCHOOL_TYPE).
-**À noter que cette donée est renseigné uniquement si ```ACTIVITE_C_OPERA in (0, 1, 2, 14)```**
+**À noter que cette donée est renseignée uniquement si l'activité est une activité de pêche ```ACTIVITE_C_OPERA in (0, 1, 2, 14)```**
+
+* Note 6 <a name="n_0_6"></a>
-* Note 6
-### <a name="n_0_6"></a>
F_DON_ORG == 0
-* Note 7
-### <a name="n_0_7"></a>
+* Note 7 <a name="n_0_7"></a>
+
F_POS_COR == 9
-* Note 8
-### <a name="n_0_8"></a>
+* Note 8 <a name="n_0_8"></a>
+
F_POS_VMS_D == 1
-* Note 9
-### <a name="n_0_9"></a>
+* Note 9 <a name="n_0_9"></a>
+
Utilisation des bornes minSpeed et maxSpeed sur common.Wind
-* Note 10
-### <a name="n_0_10"></a>
+* Note 10 <a name="n_0_10"></a>
+
Voir ajout d'un DCP
-* Note 11
-### <a name="n_0_11"></a>
+* Note 11 <a name="n_0_11"></a>
+
Donnée non persistée dans ObServe, (voir https://gitlab.com/ultreiaio/ird-observe/-/issues/2575#note_1247253501)
-* Note 12
-### <a name="n_0_12"></a>
+* Note 12 <a name="n_0_12"></a>
+
Mapping sur le code.
### Cas des activités de pêche à partir de ```ACTIVITE.C_OPERA```
@@ -116,23 +116,19 @@ Pour les activités de pêche, on rajoute des données sur l'activité pour déc
| 2 | 2 | non renseigné | [2](#n_5_2) | [3](#n_5_3) |
| 14 [4](#n_5_4) | 2 | non renseigné | [2](#n_5_2) | [3](#n_5_3) |
-* Note 1
-#### <a name="n_5_1"></a>
+* Note 1 <a name="n_5_1"></a>
On utilise le code du réferentiel ObServe
-* Note 2
-#### <a name="n_5_2"></a>
+* Note 2 <a name="n_5_2"></a>
Calculé depuis ```ACTIVITE.V_NB_OP```
-* Note 3
-#### <a name="n_5_3"></a>
+* Note 3 <a name="n_5_3"></a>
Calculé depuis ```ACTIVITE.C_TBANC```.
-* Note 4
-#### <a name="n_5_4"></a>
+* Note 4 <a name="n_5_4"></a>
Dans ce cas on rajoute aussi le système observé **110**.
@@ -140,31 +136,31 @@ Dans ce cas on rajoute aussi le système observé **110**.
Dans **AVDTH**, il existe trois notions à considéder :
-1. ```ACTIVITE.C_TYP_OBJET``` donne le type de DCP (la valeur ```NULL``` ou ```999``` indique pas de DCP)
-2. ```ACTIVITE.C_TYP_BALISE``` donne le type de balise (la valeur ```NULL``` ou ```999``` indique pas de bouée)
+1. ```ACTIVITE.C_TYP_OBJET``` donne le type de DCP (la valeur ```NULL``` ou ```999``` indique pas de DCP déclaré dans **AVDTH**)
+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**)
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)
-On va alors interdire l'ajout d'un DCP, si aucune des trois notions précédentes ne sont satisfaites, en clair on ne peut pas ajouté un DPC si :
+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 :
-1. Pas de DCP déclaré
-2. Pas de balise de déclarée
+1. Pas de DCP déclaré dans **AVDTH**
+2. Pas de balise déclarée dans **AVDTH**
3. Pas de système observé décrivant un DCP
-De plus dans **AVDTH**, il existe des DCP déclarés sur des activités qui ne sont pas compatible avec l'utilisation d'un DCP
-dans ObServe.
+De plus dans **AVDTH**, il existe des DCP déclarés sur des activités qui ne sont pas compatibles avec l'utilisation
+d'un DCP dans ObServe.
-On propose tout de meme une nouvelle correspondance sur les **vesselActivity** pour palier ce défaut.
+On propose tout de même une nouvelle correspondance sur les **vesselActivity** pour pallier à ce défaut.
| ACTIVITE.C_OPERA | ps_common.VesselActivity.code (si pas de DCP) | ps_common.VesselActivity.code (si DCP) |
|:-----------------|:----------------------------------------------|:---------------------------------------|
| 3 | 1 | 101 |
| 4 | 2 | 102 |
-Les codes ```101 et 102``` sont des clones des VesselActivity de code ```1 et 2``` avec la possibilité d'utilisation
-de DCP (```VesselActivity.allowFad = TRUE) et ont été introduits via migration de la version **9.1.0**.
+Les codes ```101 et 102``` sont des clones des VesselActivity de code ```1 et 2``` avec la possibilité d'utiliser
+des DCPs (```VesselActivity.allowFad = TRUE) (introduits via migration de la version **9.1.0**).
-Enfin on ne tient pas compte des DCP qui seraient crées uniquement via la notion **3** dans le cas où le type d'activité
-n'est pas compatible avec l'ajout de DCP et on **interdit** l'import dans tous les autres cas.
+Enfin on ne tient pas compte des DCP qui seraient crées uniquement via la notion des systèmes observés si le type
+d'activité n'est pas compatible avec l'ajout de DCP et on **interdit** l'import dans tous les autres cas.
### Ajout d'un DCP
@@ -177,7 +173,7 @@ Pour ajouter un DCP on procède de la manière suivante :
#### Calcul de FloatingObject.objectOperation
-Cela est réalisé via une translation de **ACTIVITE.C_OPERA** vers **ps_common.ObjectOperation.code**
+Cela est réalisé via la table de correspondace suivante :
| ACTIVITE.C_OPERA | ps_common.ObjectOperation.code |
|:-----------------|:-------------------------------|
@@ -218,7 +214,7 @@ On distingue un cas particulier pour ajouter un système observé **20 (DCP)** :
2. et la balise est déclarée dans **AVDTH**
3. et l'opération du DCP n'est pas une mise à l'eau
-Dans tous les autres cas, on peut ajouter un système observé en utilisant la tableau de correspondance suivant
+Dans tous les autres cas, on peut ajouter un système observé en utilisant la table de correspondance suivante :
| ACTIVITE.C_TYP_OBJET | ps_common.ObservedSystem.code |
|:---------------------|:------------------------------|
@@ -279,7 +275,7 @@ Cela est réalisé via la table de correspondance suivante :
##### Matériel Bioadégradable
Si le DCP est déclaré dans **AVDTH** et que la valeur de la colonne ```ACTIVITE.F_DCP_ECO``` vaut **2**, on ajoute alors
-le matériel **4-2 (Biodegradable materials).
+le matériel **4-2 (Biodegradable materials)**.
##### Matériaux provenants des systèmes observés d'AVDTH
@@ -295,14 +291,14 @@ tableau suivant :
| 24 [1](#n_6_1) | ALOG DFAD |
| 25 | AFAD |
-* Note 1
-### <a name="n_6_1"></a>
-Dans ce cas, on doit créer une balise de type **98** (Balise inconnue ou indéterminée) **uniquement dans le cas où la
-balise n'est pas déclarée dans AVDTH**.
+* Note 1 <a name="n_6_1"></a>
+
+Dans ce cas, on doit créer une balise de type **98** (Balise inconnue ou indéterminée) et ceci **uniquement dans le
+cas où la balise n'est pas déclarée dans AVDTH**.
##### Matériaux ajouté si le DCP est déclaré dans AVDTH
-Dans ce cas, on peut ajouté un éventel matériel en utilisant la table de correspondance suivante :
+Dans ce cas, on peut ajouter un éventel matériel en utilisant la table de correspondance suivante :
| ACTIVITE.C_TYP_OBJET | ObjectMaterial |
|:---------------------|:---------------|
@@ -332,7 +328,7 @@ On distingue deux cas :
##### Ajout d'une balise déclarée dans AVDTH
-L'opération de la balise est déterminé sur la table de correspondance suivante :
+L'opération de la balise est déterminée depuis la table de correspondance suivante :
| ACTIVITE.C_OPERA | TransmittingBuoyOperation |
|:-----------------|:--------------------------|
@@ -362,7 +358,6 @@ Si la correspondance n'est pas satisfaite, on bloque alors l'import avec une mes
Pour obtenir le type de la balise, on utilise la table dfe correspondance suivante :
-
| **ACTIVITE.C_TYP_BALISE** | **ps_common.TransmittingBuoyType.code** |
|:--------------------------|:----------------------------------------|
| 1 | 1 |
@@ -417,7 +412,7 @@ Pour renseigner le propriétaire de la balise ```transmittingBuoyOwnerShip``` (
Pour renseigner le code de la balise, on recopie la valeur de la colonne ```ACTIVITE.V_ID_BALISE```.
-Si l'opération de la balise est **11**, on recopie alors les coordonnées de l'activité.
+Si l'opération (dans **ObServe**) de la balise est **11**, on recopie alors les coordonnées de l'activité.
##### Ajout d'une balise non déclarée dans AVDTH, mais via les systèmes observés
@@ -439,12 +434,11 @@ On ajoute ici une balise avec les caractéristiques suivantes :
| ACT_ASSOC_05 | N_ASSOC | Not used | |
| ACT_ASSOC_06 | C_ASSOC | Activity_ObservedSystem.ObservedSystem | [2](#n_1_2) |
-* Note 1
-### <a name="n_1_1"></a>
+* Note 1 <a name="n_1_1"></a>
+
Identifie l'activité
-* Note 2
-### <a name="n_1_2"></a>
+* Note 2 <a name="n_1_2"></a>
Voir la section au dessus sur l'ajout de DCP depuis les systèmes observés d'AVDTH
@@ -461,16 +455,16 @@ Voir la section au dessus sur l'ajout de DCP depuis les systèmes observés d'AV
| CAPT_ELEM_07 | C_CAT_T | Catch.weightCategory | [3](#n_2_3) |
| CAPT_ELEM_08 | V_POIDS_CAPT | Catch.weight | |
-* Note 1
-### <a name="n_2_1"></a>
+* Note 1 <a name="n_2_1"></a>
+
Identifie l'activité
-* Note 2
-### <a name="n_2_2"></a>
+* Note 2 <a name="n_2_2"></a>
+
Voir mapping [REF_SPECIES](./referential.html#REF_SPECIES)
-* Note 3
-### <a name="n_2_3"></a>
+* Note 3 <a name="n_2_3"></a>
+
Voir mapping [REF_CATCH_WEIGHT_CATEGORY](./referential.html#REF_CATCH_WEIGHT_CATEGORY)
### Table CUVE
@@ -493,18 +487,17 @@ La table **CUVE** est reversée dans ces trois tables.
| CUVE_04 | F_POS_CUVE | Well.well | [2](#n_3_2) |
| CUVE_05 | C_DEST | Well.wellSamplingConformity et wellSamplingStatus | [3](#n_3_3) |
-* Note 1
-### <a name="n_3_1"></a>
+* Note 1 <a name="n_3_1"></a>
+
Identifie la marée
-* Note 2
-### <a name="n_3_2"></a>
+* Note 2 <a name="n_3_2"></a>
+
Identifiant de cuve
Voir mapping [REF_WELL_ID](./referential.html#REF_WELL_ID)
-* Note 3
-### <a name="n_3_3"></a>
+* Note 3 <a name="n_3_3"></a>
Voir mapping [REF_WELL_SAMPLING_CONFORMITY](./referential.html#REF_WELL_SAMPLING_CONFORMITY) et
[REF_WELL_SAMPLING_STATUS](./referential.html#REF_WELL_SAMPLING_STATUS)
@@ -527,20 +520,20 @@ Cette table définit les données du plan de cuve et est déversée dans les tab
| CUVE_CALEE_10 | V_POIDS | WellActivitySpecies.weight | |
| CUVE_CALEE_11 | V_NB | WellActivitySpecies.count | |
-* Note 1
-### <a name="n_4_1"></a>
+* Note 1 <a name="n_4_1"></a>
+
Identifie la cuve (donc l'identifiant de l'entrée dans **Well**).
-* Note 2
-### <a name="n_4_2"></a>
+* Note 2 <a name="n_4_2"></a>
+
Identifie l'activité associée (qui correspond exactement à une entrée dans **WellActivity**).
-* Note 3
-### <a name="n_4_3"></a>
+* Note 3 <a name="n_4_3"></a>
+
Voir mapping [REF_SPECIES](./referential.html#REF_SPECIES)
-* Note 4
-### <a name="n_4_4"></a>
+* Note 4 <a name="n_4_4"></a>
+
Voir mapping [REF_WELL_SAMPLE_WEIGHT_CATEGORY](./referential.html#REF_WELL_SAMPLE_WEIGHT_CATEGORY)
[Retour à l'introduction](./index.html)
\ No newline at end of file
=====================================
src/site/markdown/avdth/sample.md
=====================================
@@ -21,26 +21,26 @@ Table déversée dans la table d'ObServe **Sample**.
| ECHANTILLON_11 | V_POIDS_P10 | Sample.bigsWeight | |
| ECHANTILLON_12 | V_POIDS_ECH | Sample.totalWeight | |
-* Note 1
-### <a name="n_6_1"></a>
+* Note 1 <a name="n_6_1"></a>
+
Identifie la marée
-* Note 2
-### <a name="n_6_2"></a>
+* Note 2 <a name="n_6_2"></a>
+
Voir mapping [REF_SAMPLE_QUALITY](./referential.html#REF_SAMPLE_QUALITY)
-* Note 3
-### <a name="n_6_3"></a>
+* Note 3 <a name="n_6_3"></a>
+
Voir mapping [REF_SAMPLE_TYPE](./referential.html#REF_SAMPLE_TYPE)
-* Note 4
-### <a name="n_6_4"></a>
+* Note 4 <a name="n_6_4"></a>
+
Identifiant de cuve
Voir mapping [REF_WELL_ID](./referential.html#REF_WELL_ID)
-* Note 5
-### <a name="n_6_5"></a>
+* Note 5 <a name="n_6_5"></a>
+
F_S_ECH == 1
### Table ECH_CALEE
@@ -61,12 +61,12 @@ Table déversée dans la table d'ObServe **Sample_activity**.
| ECH_CALEE_10 | C_TBANC | ??? | |
| ECH_CALEE_11 | V_POND | ??? | |
-* Note 1
-### <a name="n_5_1"></a>
+* Note 1 <a name="n_5_1"></a>
+
Identifie l'échantillon
-* Note 2
-### <a name="n_5_2"></a>
+* Note 2 <a name="n_5_2"></a>
+
Identifie l'activité
### Table ECH_ESP
@@ -84,16 +84,16 @@ Table déversée dans la table d'ObServe **SampleSpecies**.
| ECH_ESP_07 | V_NB_MES | SampleSpecies.measureCount | |
| ECH_ESP_08 | V_NB_TOT | SampleSpecies.totalCount | |
-* Note 1
-### <a name="n_7_1"></a>
+* Note 1 <a name="n_7_1"></a>
+
Identifie l'échantillon
-* Note 2
-### <a name="n_7_2"></a>
+* Note 2 <a name="n_7_2"></a>
+
Voir mapping [REF_SPECIES](./referential.html#REF_SPECIES)
-* Note 3
-### <a name="n_7_3"></a>
+* Note 3 <a name="n_7_3"></a>
+
Voir mapping [REF_SIZE_MEASURE_TYPE](./referential.html#REF_SIZE_MEASURE_TYPE)
### Table ECH_FREQT
@@ -111,8 +111,8 @@ Table déversée dans la table d'ObServe **SampleSpeciesMeasure**.
| ECH_FREQT_07 | V_LONG | SampleSpeciesMeasure.sizeClass | |
| ECH_FREQT_08 | V_EFF | SampleSpeciesMeasure.count | |
-* Note 1
-### <a name="n_8_1"></a>
+* Note 1 <a name="n_8_1"></a>
+
Identifie l'échantilon espèce.
[Retour à l'introduction](./index.html)
\ No newline at end of file
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/290d4e764c86cc9077b293a71…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/290d4e764c86cc9077b293a71…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop] 2 commits: Update hibernate
by Tony CHEMIT (@tchemit) 06 Feb '23
by Tony CHEMIT (@tchemit) 06 Feb '23
06 Feb '23
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
315a135d by Tony Chemit at 2023-02-06T15:50:26+01:00
Update hibernate
- - - - -
7b2e9199 by Tony Chemit at 2023-02-06T16:31:55+01:00
Update pom
- - - - -
1 changed file:
- pom.xml
Changes:
=====================================
pom.xml
=====================================
@@ -23,7 +23,7 @@
<parent>
<groupId>io.ultreia.maven</groupId>
<artifactId>pom</artifactId>
- <version>2023.4</version>
+ <version>2023.5</version>
</parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
@@ -119,7 +119,7 @@
<lib.version.h2>1.4.196</lib.version.h2>
<!-- FIXME can't use 1.4.197 (date has changed + blob also)-->
<!-- FIXME <lib.version.h2>2.1.210</lib.version.h2>-->
- <lib.version.hibernate>5.6.14.Final</lib.version.hibernate>
+ <lib.version.hibernate>5.6.15.Final</lib.version.hibernate>
<!-- FIXME <lib.version.hibernate>6.1.0.Final</lib.version.hibernate>-->
<lib.version.jaxb-api>2.4.0-b180830.0359</lib.version.jaxb-api>
<lib.version.jaxb-runtime>2.4.0-b180830.0438</lib.version.jaxb-runtime>
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/16ef9cf48e93fd5b4231edb0…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/16ef9cf48e93fd5b4231edb0…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop-9.0.x] 2 commits: Update hibernate
by Tony CHEMIT (@tchemit) 06 Feb '23
by Tony CHEMIT (@tchemit) 06 Feb '23
06 Feb '23
Tony CHEMIT pushed to branch develop-9.0.x at ultreiaio / ird-observe
Commits:
60b14612 by Tony Chemit at 2023-02-06T16:32:07+01:00
Update hibernate
- - - - -
0679edc1 by Tony Chemit at 2023-02-06T16:32:10+01:00
Update pom
- - - - -
1 changed file:
- pom.xml
Changes:
=====================================
pom.xml
=====================================
@@ -23,7 +23,7 @@
<parent>
<groupId>io.ultreia.maven</groupId>
<artifactId>pom</artifactId>
- <version>2023.4</version>
+ <version>2023.5</version>
</parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
@@ -119,7 +119,7 @@
<lib.version.h2>1.4.196</lib.version.h2>
<!-- FIXME can't use 1.4.197 (date has changed + blob also)-->
<!-- FIXME <lib.version.h2>2.1.210</lib.version.h2>-->
- <lib.version.hibernate>5.6.14.Final</lib.version.hibernate>
+ <lib.version.hibernate>5.6.15.Final</lib.version.hibernate>
<!-- FIXME <lib.version.hibernate>6.1.0.Final</lib.version.hibernate>-->
<lib.version.jaxb-api>2.4.0-b180830.0359</lib.version.jaxb-api>
<lib.version.jaxb-runtime>2.4.0-b180830.0438</lib.version.jaxb-runtime>
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/707621985b090e49389760d7…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/707621985b090e49389760d7…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop] 3 commits: Avdth - Clean FloatingObjectReader and adapt migration documentation
by Tony CHEMIT (@tchemit) 06 Feb '23
by Tony CHEMIT (@tchemit) 06 Feb '23
06 Feb '23
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
3e6bfec8 by Tony Chemit at 2023-02-06T15:15:58+01:00
Avdth - Clean FloatingObjectReader and adapt migration documentation
- - - - -
d2aa4ad6 by Tony Chemit at 2023-02-06T15:39:36+01:00
Update entities documentation fixtures
- - - - -
16ef9cf4 by Tony Chemit at 2023-02-06T15:42:13+01:00
Update public API documentation
- - - - -
30 changed files:
- core/persistence/avdth/src/main/java/fr/ird/observe/persistence/avdth/data/logbook/FloatingObjectReader.java
- model/src/main/resources/fixtures/data/ll/common/Trip/Create-example-request.json
- model/src/main/resources/fixtures/data/ll/common/Trip/GetOne-example-response.json
- model/src/main/resources/fixtures/data/ll/common/Trip/GetSome-example-response.json
- model/src/main/resources/fixtures/data/ll/common/Trip/Update-example-request.json
- model/src/main/resources/fixtures/data/ll/common/Trip/content.json
- model/src/main/resources/fixtures/data/ll/common/Trip/create.json
- model/src/main/resources/fixtures/data/ll/landing/Landing/Create-example-request.json
- model/src/main/resources/fixtures/data/ll/landing/Landing/GetOne-example-response.json
- model/src/main/resources/fixtures/data/ll/landing/Landing/GetSome-example-response.json
- model/src/main/resources/fixtures/data/ll/landing/Landing/Update-example-request.json
- model/src/main/resources/fixtures/data/ll/landing/Landing/content.json
- model/src/main/resources/fixtures/data/ll/landing/Landing/create.json
- model/src/main/resources/fixtures/data/ps/common/Trip/Create-example-request.json
- model/src/main/resources/fixtures/data/ps/common/Trip/GetOne-example-response.json
- model/src/main/resources/fixtures/data/ps/common/Trip/GetSome-example-response.json
- model/src/main/resources/fixtures/data/ps/common/Trip/Update-example-request.json
- model/src/main/resources/fixtures/data/ps/common/Trip/content.json
- model/src/main/resources/fixtures/data/ps/common/Trip/create.json
- model/src/main/resources/fixtures/data/ps/localmarket/Batch/Create-example-request.json
- model/src/main/resources/fixtures/data/ps/localmarket/Batch/GetOne-example-response.json
- model/src/main/resources/fixtures/data/ps/localmarket/Batch/GetSome-example-response.json
- model/src/main/resources/fixtures/data/ps/localmarket/Batch/Update-example-request.json
- model/src/main/resources/fixtures/data/ps/localmarket/Batch/content.json
- model/src/main/resources/fixtures/data/ps/localmarket/Batch/create.json
- model/src/main/resources/fixtures/data/ps/logbook/Well/Create-example-request.json
- model/src/main/resources/fixtures/data/ps/logbook/Well/GetOne-example-response.json
- model/src/main/resources/fixtures/data/ps/logbook/Well/GetSome-example-response.json
- model/src/main/resources/fixtures/data/ps/logbook/Well/Update-example-request.json
- model/src/main/resources/fixtures/data/ps/logbook/Well/content.json
The diff was not included because it is too large.
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/7b0d4b31d03ac032fd85cb56…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/7b0d4b31d03ac032fd85cb56…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop] 11 commits: Model - Add Buyer referential and use it in Batch
by Tony CHEMIT (@tchemit) 06 Feb '23
by Tony CHEMIT (@tchemit) 06 Feb '23
06 Feb '23
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
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
- - - - -
4a2bb47a by Tony Chemit at 2023-02-06T10:46:17+01:00
Merge branch 'feature/issue_2619' into develop
Ajout d'un champ et d'une table de référence dans ps_localmarket - Closes
- - - - -
7b0d4b31 by Tony Chemit at 2023-02-06T10:47:07+01:00
Nettoyage de la table LastUpdateDate - Closes #2620
- - - - -
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/referential/ps/localmarket/BuyerDto-create-error-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/referential/ps/localmarket/BuyerDto-update-warning-validation.xml
- core/api/validation/src/test/resources/fixtures/api-validation.properties
- core/api/validation/src/test/resources/fixtures/validation/bean-validator-detector-n1-create.list
- core/api/validation/src/test/resources/fixtures/validation/bean-validator-detector-n1-update.list
The diff was not included because it is too large.
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/3ed06a7560ef2faed00362a8…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/3ed06a7560ef2faed00362a8…
You're receiving this email because of your account on gitlab.com.
1
0
06 Feb '23
Tony CHEMIT deleted branch feature/issue_2619 at ultreiaio / ird-observe
--
You're receiving this email because of your account on gitlab.com.
1
0