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
- 7199 discussions
[Git][ultreiaio/ird-observe][develop] Reconnexion - Closes #2067
by Tony CHEMIT (@tchemit) 25 Oct '21
by Tony CHEMIT (@tchemit) 25 Oct '21
25 Oct '21
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
cef03dd1 by Tony Chemit at 2021-10-25T21:30:21+02:00
Reconnexion - Closes #2067
- - - - -
4 changed files:
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/DataSourceEditorBodyContent.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/DataSourceEditorHandler.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/menu/actions/ReloadStorageAction.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/navigation/tree/root/RootNavigationNode.java
Changes:
=====================================
client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/DataSourceEditorBodyContent.java
=====================================
@@ -40,6 +40,7 @@ import fr.ird.observe.client.datasource.editor.api.menu.actions.CloseStorageActi
import fr.ird.observe.client.datasource.editor.api.menu.actions.ImportAvdthFileAction;
import fr.ird.observe.client.datasource.editor.api.menu.actions.ReloadStorageAction;
import fr.ird.observe.client.datasource.editor.api.menu.actions.ShowDataSourcePresetsAction;
+import fr.ird.observe.client.datasource.editor.api.navigation.tree.NavigationNode;
import fr.ird.observe.client.main.ObserveMainUI;
import fr.ird.observe.client.main.body.HideBodyContentNotAcceptedException;
import fr.ird.observe.client.main.body.MainUIBodyContent;
@@ -79,6 +80,7 @@ public class DataSourceEditorBodyContent extends MainUIBodyContent<DataSourceEdi
private DataSourceEditorMenu editorMenu;
private DataSourceEditorNavigationMenu navigationMenu;
private ObserveSwingDataSource dataSource;
+ private NavigationNode previousNode;
public DataSourceEditorBodyContent() {
super(1, DataSourceEditor.class);
@@ -86,6 +88,10 @@ public class DataSourceEditorBodyContent extends MainUIBodyContent<DataSourceEdi
this.reload = e -> reload();
}
+ public void setPreviousNode(NavigationNode previousNode) {
+ this.previousNode = previousNode;
+ }
+
private Supplier<DataSourceEditor> createSupplier() {
return () -> {
ObserveMainUI mainUI = getClientUIContext().getMainUI();
@@ -193,7 +199,10 @@ public class DataSourceEditorBodyContent extends MainUIBodyContent<DataSourceEdi
focusModel.addZone(new ContentZone(focusModel, dataSourceEditor));
navigationMenu.getUiModel().setConfig(dataSourceEditor.getNavigationUI().getTree().getModel().getConfig());
- dataSourceEditor.getHandler().loadNavigationUI(progressModel);
+ NavigationNode previousNode = this.previousNode;
+ // remove it right now
+ setPreviousNode(null);
+ dataSourceEditor.getHandler().loadNavigationUI(progressModel, previousNode);
progressModel.increments();
}
=====================================
client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/DataSourceEditorHandler.java
=====================================
@@ -30,6 +30,7 @@ import fr.ird.observe.client.datasource.editor.api.content.ContentUIManager;
import fr.ird.observe.client.datasource.editor.api.navigation.NavigationTree;
import fr.ird.observe.client.datasource.editor.api.navigation.NavigationTreeModel;
import fr.ird.observe.client.datasource.editor.api.navigation.NavigationUI;
+import fr.ird.observe.client.datasource.editor.api.navigation.tree.NavigationNode;
import fr.ird.observe.client.util.ProgressModel;
import fr.ird.observe.client.util.init.UIInitHelper;
import fr.ird.observe.client.util.session.ObserveSwingSessionHelper;
@@ -153,8 +154,9 @@ public class DataSourceEditorHandler implements UIHandler<DataSourceEditor>, Wit
* <b>Note:</b> cette méthode doit être appelée après tout rechargement de modèle de navigation.
*
* @param progressModel the progress model to interact with ui
+ * @param previousNode
*/
- public void loadNavigationUI(ProgressModel progressModel) {
+ public void loadNavigationUI(ProgressModel progressModel, NavigationNode previousNode) {
boolean canReadData = getClientUIContext().getDataSourcesManager().getMainDataSource().canReadData();
NavigationUI navigationUI = ui.getNavigationUI();
NavigationTree tree = navigationUI.getTree();
@@ -163,10 +165,20 @@ public class DataSourceEditorHandler implements UIHandler<DataSourceEditor>, Wit
treeModel.populate(null);
progressModel.increments();
// select initial node
- try {
- tree.selectInitialNode();
- } catch (Exception e) {
- log.error("Could not load initial node", e);
+ if (previousNode != null) {
+ try {
+ tree.reselectInitialNode(previousNode);
+ } catch (Exception e) {
+ log.error("Could not load previous node", e);
+ previousNode = null;
+ }
+ }
+ if (previousNode == null) {
+ try {
+ tree.selectInitialNode();
+ } catch (Exception e) {
+ log.error("Could not load initial node", e);
+ }
}
progressModel.increments();
tree.setVisible(true);
=====================================
client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/menu/actions/ReloadStorageAction.java
=====================================
@@ -23,8 +23,9 @@ package fr.ird.observe.client.datasource.editor.api.menu.actions;
*/
import fr.ird.observe.client.datasource.api.ObserveSwingDataSource;
+import fr.ird.observe.client.datasource.editor.api.DataSourceEditorBodyContent;
import fr.ird.observe.client.datasource.editor.api.menu.DataSourceEditorMenu;
-import fr.ird.observe.client.main.ObserveMainUI;
+import fr.ird.observe.client.datasource.editor.api.navigation.tree.NavigationNode;
import fr.ird.observe.client.util.ObserveSwingTechnicalException;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -60,28 +61,24 @@ public class ReloadStorageAction extends DataSourceEditorMenuActionSupport imple
log.info(String.format("Will close main data source: %s", dataSource));
- // Close
- getDataSourceEditorBodyContent().doCloseStorage();
+ DataSourceEditorBodyContent bodyContent = getDataSourceEditorBodyContent();
- ObserveMainUI mainUI = getClientUIContext().getMainUI();
+ // keep selected node to select it on new navigation tree
+ NavigationNode selectedNode = bodyContent.get().getNavigationUI().getTree().getSelectedNode();
+ bodyContent.setPreviousNode(selectedNode);
- //FIXME:BodyContent reload previous selected node
- getClientUIContext().getBusyModel().addTask("Reload storage");
- try {
-
- //FIXME:Datasource See why we do this?
- dataSource.setCanMigrate(getClientConfig());
+ // Close storage
+ bodyContent.doCloseStorage();
- log.info(String.format("Will load main data source: %s", dataSource));
+ //FIXME:Datasource See why we do this?
+ dataSource.setCanMigrate(getClientConfig());
- try {
- getDataSourceEditorBodyContent().loadStorage(mainUI, dataSource);
- } catch (Exception e) {
- throw new ObserveSwingTechnicalException(e);
- }
+ log.info(String.format("Will load main data source: %s", dataSource));
- } finally {
- getClientUIContext().getBusyModel().popTask();
+ try {
+ bodyContent.loadStorage(getClientUIContext().getMainUI(), dataSource);
+ } catch (Exception e) {
+ throw new ObserveSwingTechnicalException(e);
}
}
=====================================
client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/navigation/tree/root/RootNavigationNode.java
=====================================
@@ -141,7 +141,7 @@ public class RootNavigationNode extends NavigationNode {
return result;
}
- public <N extends NavigationNode> N findChildByType0(Class<N> childType, String id) {
+ public <N extends NavigationNode> N findChildByTypeWithNoCreate(Class<N> childType, String id) {
return super.findChildByType(childType, id);
}
@@ -173,7 +173,10 @@ public class RootNavigationNode extends NavigationNode {
NavigationNode next;
NavigationNode oldNode = (NavigationNode) treeNode;
if (oldNode.getLevel() == 0) {
- next = ((RootNavigationNode) result).findChildByType0(oldNode.getClass(), oldNode.getInitializer().getSelectNodeId());
+ next = result;
+ } else if (oldNode.getLevel() == 1) {
+ // use the method which will not create node
+ next = ((RootNavigationNode) result).findChildByTypeWithNoCreate(oldNode.getClass(), oldNode.getInitializer().getSelectNodeId());
} else if (oldNode.getScope().isSelectNode()) {
next = result.findChildByType(oldNode.getClass(), oldNode.getInitializer().getSelectNodeId());
} else {
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/cef03dd12cb2956c5468dcd27…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/cef03dd12cb2956c5468dcd27…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop] 4 commits: Contrôle total marché local - Closes #2059
by Tony CHEMIT (@tchemit) 25 Oct '21
by Tony CHEMIT (@tchemit) 25 Oct '21
25 Oct '21
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
d035bec2 by Tony Chemit at 2021-10-25T20:40:12+02:00
Contrôle total marché local - Closes #2059
- - - - -
140d751f by Tony Chemit at 2021-10-25T20:40:12+02:00
Unicité Trip PS & LL - Closes #2060
- - - - -
3273fd95 by Tony Chemit at 2021-10-25T20:40:12+02:00
Erreur sur ouverture des forms objet flottant en mode serveur, sur les logbooks et les observations - Closes #2055
- - - - -
1b95f2d2 by Tony Chemit at 2021-10-25T21:28:49+02:00
Reconnexion - Closes #2057
- - - - -
28 changed files:
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/DataSourceEditorBodyContent.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/DataSourceEditorHandler.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/menu/actions/ReloadStorageAction.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/navigation/tree/root/RootNavigationNode.java
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/common/TripUI.jaxx
- 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/FloatingObjectUICommon.jcss
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/dcp/presets/FloatingObjectPresetUI.jaxx
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/dcp/presets/FloatingObjectPresetUI.jcss
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/dcp/presets/FloatingObjectPresetUIHandler.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/logbook/FloatingObjectUIHandler.java
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/observation/FloatingObjectUI.jaxx
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/observation/FloatingObjectUIHandler.java
- models/definition/src/main/models/Observe/dto/attribute/boundNumber.properties
- models/dto/java/src/main/java/fr/ird/observe/dto/referential/ps/common/ObjectMaterialHierarchyDto.java
- models/persistence/java/src/main/java/fr/ird/observe/entities/data/ps/logbook/FloatingObjectSpi.java
- server/core/src/main/filtered-resources/META-INF/mapping-api-v1.wm
- services/api-test/src/main/java/fr/ird/observe/services/service/data/ps/common/TripServiceFixtures.java
- services/api/src/main/java/fr/ird/observe/services/service/data/ps/common/TripService.java
- services/local-impl/src/main/java/fr/ird/observe/services/local/service/data/ps/common/TripServiceLocalSupport.java
- services/validation/src/main/validation/fr/ird/observe/dto/data/ll/common/TripDto-create-error-validation.xml → services/validation/src/main/validation/fr/ird/observe/dto/data/ll/common/TripDto-create-warning-validation.xml
- services/validation/src/main/validation/fr/ird/observe/dto/data/ll/common/TripDto-update-error-validation.xml
- + services/validation/src/main/validation/fr/ird/observe/dto/data/ll/common/TripDto-update-warning-validation.xml
- services/validation/src/main/validation/fr/ird/observe/dto/data/ps/common/TripDto-create-error-validation.xml
- + services/validation/src/main/validation/fr/ird/observe/dto/data/ps/common/TripDto-create-warning-validation.xml
- services/validation/src/main/validation/fr/ird/observe/dto/data/ps/common/TripDto-update-error-validation.xml
- services/validation/src/main/validation/fr/ird/observe/dto/data/ps/common/TripDto-update-warning-validation.xml
Changes:
=====================================
client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/DataSourceEditorBodyContent.java
=====================================
@@ -40,6 +40,7 @@ import fr.ird.observe.client.datasource.editor.api.menu.actions.CloseStorageActi
import fr.ird.observe.client.datasource.editor.api.menu.actions.ImportAvdthFileAction;
import fr.ird.observe.client.datasource.editor.api.menu.actions.ReloadStorageAction;
import fr.ird.observe.client.datasource.editor.api.menu.actions.ShowDataSourcePresetsAction;
+import fr.ird.observe.client.datasource.editor.api.navigation.tree.NavigationNode;
import fr.ird.observe.client.main.ObserveMainUI;
import fr.ird.observe.client.main.body.HideBodyContentNotAcceptedException;
import fr.ird.observe.client.main.body.MainUIBodyContent;
@@ -79,6 +80,7 @@ public class DataSourceEditorBodyContent extends MainUIBodyContent<DataSourceEdi
private DataSourceEditorMenu editorMenu;
private DataSourceEditorNavigationMenu navigationMenu;
private ObserveSwingDataSource dataSource;
+ private NavigationNode previousNode;
public DataSourceEditorBodyContent() {
super(1, DataSourceEditor.class);
@@ -86,6 +88,10 @@ public class DataSourceEditorBodyContent extends MainUIBodyContent<DataSourceEdi
this.reload = e -> reload();
}
+ public void setPreviousNode(NavigationNode previousNode) {
+ this.previousNode = previousNode;
+ }
+
private Supplier<DataSourceEditor> createSupplier() {
return () -> {
ObserveMainUI mainUI = getClientUIContext().getMainUI();
@@ -193,7 +199,10 @@ public class DataSourceEditorBodyContent extends MainUIBodyContent<DataSourceEdi
focusModel.addZone(new ContentZone(focusModel, dataSourceEditor));
navigationMenu.getUiModel().setConfig(dataSourceEditor.getNavigationUI().getTree().getModel().getConfig());
- dataSourceEditor.getHandler().loadNavigationUI(progressModel);
+ NavigationNode previousNode = this.previousNode;
+ // remove it right now
+ setPreviousNode(null);
+ dataSourceEditor.getHandler().loadNavigationUI(progressModel, previousNode);
progressModel.increments();
}
=====================================
client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/DataSourceEditorHandler.java
=====================================
@@ -30,6 +30,7 @@ import fr.ird.observe.client.datasource.editor.api.content.ContentUIManager;
import fr.ird.observe.client.datasource.editor.api.navigation.NavigationTree;
import fr.ird.observe.client.datasource.editor.api.navigation.NavigationTreeModel;
import fr.ird.observe.client.datasource.editor.api.navigation.NavigationUI;
+import fr.ird.observe.client.datasource.editor.api.navigation.tree.NavigationNode;
import fr.ird.observe.client.util.ProgressModel;
import fr.ird.observe.client.util.init.UIInitHelper;
import fr.ird.observe.client.util.session.ObserveSwingSessionHelper;
@@ -153,8 +154,9 @@ public class DataSourceEditorHandler implements UIHandler<DataSourceEditor>, Wit
* <b>Note:</b> cette méthode doit être appelée après tout rechargement de modèle de navigation.
*
* @param progressModel the progress model to interact with ui
+ * @param previousNode
*/
- public void loadNavigationUI(ProgressModel progressModel) {
+ public void loadNavigationUI(ProgressModel progressModel, NavigationNode previousNode) {
boolean canReadData = getClientUIContext().getDataSourcesManager().getMainDataSource().canReadData();
NavigationUI navigationUI = ui.getNavigationUI();
NavigationTree tree = navigationUI.getTree();
@@ -163,10 +165,20 @@ public class DataSourceEditorHandler implements UIHandler<DataSourceEditor>, Wit
treeModel.populate(null);
progressModel.increments();
// select initial node
- try {
- tree.selectInitialNode();
- } catch (Exception e) {
- log.error("Could not load initial node", e);
+ if (previousNode != null) {
+ try {
+ tree.reselectInitialNode(previousNode);
+ } catch (Exception e) {
+ log.error("Could not load previous node", e);
+ previousNode = null;
+ }
+ }
+ if (previousNode == null) {
+ try {
+ tree.selectInitialNode();
+ } catch (Exception e) {
+ log.error("Could not load initial node", e);
+ }
}
progressModel.increments();
tree.setVisible(true);
=====================================
client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/menu/actions/ReloadStorageAction.java
=====================================
@@ -23,8 +23,9 @@ package fr.ird.observe.client.datasource.editor.api.menu.actions;
*/
import fr.ird.observe.client.datasource.api.ObserveSwingDataSource;
+import fr.ird.observe.client.datasource.editor.api.DataSourceEditorBodyContent;
import fr.ird.observe.client.datasource.editor.api.menu.DataSourceEditorMenu;
-import fr.ird.observe.client.main.ObserveMainUI;
+import fr.ird.observe.client.datasource.editor.api.navigation.tree.NavigationNode;
import fr.ird.observe.client.util.ObserveSwingTechnicalException;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -60,28 +61,24 @@ public class ReloadStorageAction extends DataSourceEditorMenuActionSupport imple
log.info(String.format("Will close main data source: %s", dataSource));
- // Close
- getDataSourceEditorBodyContent().doCloseStorage();
+ DataSourceEditorBodyContent bodyContent = getDataSourceEditorBodyContent();
- ObserveMainUI mainUI = getClientUIContext().getMainUI();
+ // keep selected node to select it on new navigation tree
+ NavigationNode selectedNode = bodyContent.get().getNavigationUI().getTree().getSelectedNode();
+ bodyContent.setPreviousNode(selectedNode);
- //FIXME:BodyContent reload previous selected node
- getClientUIContext().getBusyModel().addTask("Reload storage");
- try {
-
- //FIXME:Datasource See why we do this?
- dataSource.setCanMigrate(getClientConfig());
+ // Close storage
+ bodyContent.doCloseStorage();
- log.info(String.format("Will load main data source: %s", dataSource));
+ //FIXME:Datasource See why we do this?
+ dataSource.setCanMigrate(getClientConfig());
- try {
- getDataSourceEditorBodyContent().loadStorage(mainUI, dataSource);
- } catch (Exception e) {
- throw new ObserveSwingTechnicalException(e);
- }
+ log.info(String.format("Will load main data source: %s", dataSource));
- } finally {
- getClientUIContext().getBusyModel().popTask();
+ try {
+ bodyContent.loadStorage(getClientUIContext().getMainUI(), dataSource);
+ } catch (Exception e) {
+ throw new ObserveSwingTechnicalException(e);
}
}
=====================================
client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/navigation/tree/root/RootNavigationNode.java
=====================================
@@ -141,7 +141,7 @@ public class RootNavigationNode extends NavigationNode {
return result;
}
- public <N extends NavigationNode> N findChildByType0(Class<N> childType, String id) {
+ public <N extends NavigationNode> N findChildByTypeWithNoCreate(Class<N> childType, String id) {
return super.findChildByType(childType, id);
}
@@ -173,7 +173,10 @@ public class RootNavigationNode extends NavigationNode {
NavigationNode next;
NavigationNode oldNode = (NavigationNode) treeNode;
if (oldNode.getLevel() == 0) {
- next = ((RootNavigationNode) result).findChildByType0(oldNode.getClass(), oldNode.getInitializer().getSelectNodeId());
+ next = result;
+ } else if (oldNode.getLevel() == 1) {
+ // use the method which will not create node
+ next = ((RootNavigationNode) result).findChildByTypeWithNoCreate(oldNode.getClass(), oldNode.getInitializer().getSelectNodeId());
} else if (oldNode.getScope().isSelectNode()) {
next = result.findChildByType(oldNode.getClass(), oldNode.getInitializer().getSelectNodeId());
} else {
=====================================
client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/common/TripUI.jaxx
=====================================
@@ -320,8 +320,8 @@
</cell>
<cell anchor='west' weightx="0.5">
<JPanel layout="{new GridLayout()}">
- <NumberEditor id='landingTotalWeight' styleClass="float3 logbookEnabled"/>
<NumberEditor id='localMarketTotalWeight' styleClass="float3 logbookEnabled"/>
+ <NumberEditor id='landingTotalWeight' styleClass="float3 logbookEnabled"/>
</JPanel>
</cell>
</row>
=====================================
client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/dcp/DcpUIAdapter.java
=====================================
@@ -39,7 +39,7 @@ import fr.ird.observe.dto.referential.ps.common.ObjectMaterialDto;
import fr.ird.observe.dto.referential.ps.common.ObjectMaterialHierarchyDto;
import fr.ird.observe.dto.referential.ps.common.ObjectOperationReference;
import fr.ird.observe.dto.referential.ps.common.TransmittingBuoyTypeReference;
-import fr.ird.observe.services.service.data.ps.common.TripService;
+import fr.ird.observe.services.service.referential.ReferentialService;
import fr.ird.observe.spi.decoration.DecoratorService;
import io.ultreia.java4all.jaxx.widgets.combobox.BeanEnumEditor;
import io.ultreia.java4all.jaxx.widgets.combobox.FilterableComboBox;
@@ -60,6 +60,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
+import java.util.Set;
import java.util.TreeMap;
/**
@@ -86,7 +87,7 @@ public interface DcpUIAdapter<T extends TransmittingBuoyAware> extends JAXXObjec
JPanel getTransmittingBuoys();
- JLabel getNoBaliseEditor();
+ JLabel getNoBuoyEditor();
FilterableComboBox<TransmittingBuoyTypeReference> getTransmittingBuoyType1();
@@ -121,9 +122,10 @@ public interface DcpUIAdapter<T extends TransmittingBuoyAware> extends JAXXObjec
getTransmittingBuoy2());
}
- default void onInit(DcpUIModelStates<?> states, TripService psCommonTripService, DecoratorService decoratorService) {
+ default void onInit(DcpUIModelStates<?> states, ReferentialService referentialService, DecoratorService decoratorService) {
- ObjectMaterialHierarchyDto detailedForm = psCommonTripService.getObjectMaterialHierarchy();
+ Set<ObjectMaterialDto> dtoList = referentialService.loadDtoList(ObjectMaterialDto.class);
+ ObjectMaterialHierarchyDto detailedForm = ObjectMaterialHierarchyDto.build(dtoList);
Map<String, ObjectMaterialDto> allMap = new TreeMap<>();
detailedForm.getAllDto().forEach(s -> allMap.putIfAbsent(s.getId(), s));
@@ -141,13 +143,13 @@ public interface DcpUIAdapter<T extends TransmittingBuoyAware> extends JAXXObjec
states.getBean().addPropertyChangeListener(FloatingObjectDto.PROPERTY_OBJECT_OPERATION, e -> states.updateMaterials(getTable().getTreeTableModel(), (ObjectOperationReference) e.getNewValue()));
}
- default void installExtraActions(DcpUIModelStates<?> states) {
+ default void installExtraActions() {
AddFloatingObjectPreset.init((ContentUI) this, getAddPreset(), AddFloatingObjectPreset.class);
CopyFloatingObjectPartToRight.init((ContentUI) this, getCopyFloatingObjectPartToRight(), CopyFloatingObjectPartToRight.class);
CopyFloatingObjectPartToLeft.init((ContentUI) this, getCopyFloatingObjectPartToLeft(), CopyFloatingObjectPartToLeft.class);
}
- default void customizeUI(DcpUIModelStates<?> states) {
+ default void customizeUI() {
ContentUIInitializer.setDecoratorIndex(getVessel1(), 1);
ContentUIInitializer.setDecoratorIndex(getVessel2(), 1);
ContentUIInitializer.setDecoratorIndex(getCountry1(), 1);
@@ -160,7 +162,7 @@ public interface DcpUIAdapter<T extends TransmittingBuoyAware> extends JAXXObjec
changeTypeOperation(states, typeOperation, false);
}
- default void stopEditUI(DcpUIModelStates<?> states) {
+ default void stopEditUI() {
if (getMainTabbedPane().getSelectedIndex() == 1) {
getTable().editingCanceled(null);
}
@@ -214,17 +216,12 @@ public interface DcpUIAdapter<T extends TransmittingBuoyAware> extends JAXXObjec
getValidatorBuoy1().setBean(null);
getValidatorBuoy2().setBean(null);
}
-// if (TypeTransmittingBuoyOperation.retrait == typeOperation) {
-// addTransmittingBuoyCoordinate();
-// } else {
-// removeTransmittingBuoyCoordinate(reset);
-// }
String[] codeOperations = typeOperation.getCodeOperation();
JComponent focusOwner = null;
switch (typeOperation) {
case pasDeBalise:
- editorPanel.add(getNoBaliseEditor());
+ editorPanel.add(getNoBuoyEditor());
focusOwner = getComment();
break;
case recuperationEtRemplacement:
=====================================
client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/dcp/FloatingObjectUICommon.jcss
=====================================
@@ -85,7 +85,7 @@
visible:{typeOperation.getSelectedValue() != null};
}
-#noBaliseEditor {
+#noBuoyEditor {
horizontalAlignment:"center";
text:"observe.Common.noBuoy";
}
=====================================
client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/dcp/presets/FloatingObjectPresetUI.jaxx
=====================================
@@ -155,7 +155,7 @@
<JPanel id="buoys" layout="{new GridLayout(1,0)}">
<FloatingObjectBuoyPresetUI id="buoy1" constructorParams="this"/>
<FloatingObjectBuoyPresetUI id="buoy2" constructorParams="this"/>
- <JLabel id='noBaliseEditor' styleClass="skipI18n"/>
+ <JLabel id='noBuoyEditor' styleClass="skipI18n"/>
</JPanel>
</cell>
</row>
=====================================
client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/dcp/presets/FloatingObjectPresetUI.jcss
=====================================
@@ -92,7 +92,7 @@ JLabel {
border:{new TitledBorder(t("observe.Common.second.buoy"))};
}
-#noBaliseEditor {
+#noBuoyEditor {
horizontalAlignment:"center";
text:"observe.Common.noBuoy";
}
=====================================
client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/dcp/presets/FloatingObjectPresetUIHandler.java
=====================================
@@ -64,7 +64,7 @@ public class FloatingObjectPresetUIHandler implements UIHandler<FloatingObjectPr
initializer.disabledIfNull(model, bean, "keepSupplyName");
ui.getBuoys().removeAll();
SwingValidatorUtil.setValidatorBean(ui, bean);
- ui.getBuoys().add(ui.getNoBaliseEditor());
+ ui.getBuoys().add(ui.getNoBuoyEditor());
Optional.ofNullable(floatingObjectPreset.getBuoy1()).ifPresent(t -> prepareBuoy(t, ui, buoy1));
Optional.ofNullable(floatingObjectPreset.getBuoy2()).ifPresent(t -> prepareBuoy(t, ui, buoy2));
@@ -115,7 +115,7 @@ public class FloatingObjectPresetUIHandler implements UIHandler<FloatingObjectPr
FloatingObjectBuoyPreset bean = buoyUI.getBean();
FloatingObjectBuoyPresetUIModel model = buoyUI.getModel();
preset.copy(bean);
- ui.getBuoys().remove(ui.getNoBaliseEditor());
+ ui.getBuoys().remove(ui.getNoBuoyEditor());
ui.getBuoys().add(buoyUI);
SwingValidatorUtil.setValidatorBean(buoyUI, model.getBean());
=====================================
client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/logbook/FloatingObjectUI.jaxx
=====================================
@@ -323,7 +323,7 @@
</row>
</Table>
</JXTitledPanel>
- <JLabel id='noBaliseEditor' styleClass="skipI18n"/>
+ <JLabel id='noBuoyEditor' styleClass="skipI18n"/>
</JPanel>
</JPanel>
</tab>
=====================================
client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/logbook/FloatingObjectUIHandler.java
=====================================
@@ -43,19 +43,19 @@ public class FloatingObjectUIHandler extends GeneratedFloatingObjectUIHandler {
coordinate1Label = ui.transmittingBuoy1Editor.getComponent(10);
coordinate1 = ui.transmittingBuoy1Editor.getComponent(11);
comment1 = ui.transmittingBuoy1Editor.getComponent(12);
- ui.onInit(ui.getModel().getStates(), getPsCommonTripService(), getDecoratorService());
+ ui.onInit(ui.getModel().getStates(), getReferentialService(), getDecoratorService());
}
@Override
protected void customizeUI() {
super.customizeUI();
- ui.customizeUI(ui.getModel().getStates());
+ ui.customizeUI();
}
@Override
protected void installExtraActions() {
super.installExtraActions();
- ui.installExtraActions(ui.getModel().getStates());
+ ui.installExtraActions();
}
//FIXME:Focus ui.getModel().getStates().isCreatingMode() ? getUi().getObjectOperation() : getUi().getSupportVesselName()
@@ -72,7 +72,7 @@ public class FloatingObjectUIHandler extends GeneratedFloatingObjectUIHandler {
@Override
public void stopEditUI() {
- ui.stopEditUI(ui.getModel().getStates());
+ ui.stopEditUI();
super.stopEditUI();
}
=====================================
client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/observation/FloatingObjectUI.jaxx
=====================================
@@ -298,7 +298,7 @@
</row>
</Table>
</JXTitledPanel>
- <JLabel id='noBaliseEditor' styleClass="skipI18n"/>
+ <JLabel id='noBuoyEditor' styleClass="skipI18n"/>
</JPanel>
</JPanel>
</tab>
=====================================
client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/observation/FloatingObjectUIHandler.java
=====================================
@@ -32,19 +32,19 @@ public class FloatingObjectUIHandler extends GeneratedFloatingObjectUIHandler {
@Override
public void onInit(FloatingObjectUI ui) {
super.onInit(ui);
- ui.onInit(ui.getModel().getStates(), getPsCommonTripService(), getDecoratorService());
+ ui.onInit(ui.getModel().getStates(), getReferentialService(), getDecoratorService());
}
@Override
protected void customizeUI() {
super.customizeUI();
- ui.customizeUI(ui.getModel().getStates());
+ ui.customizeUI();
}
@Override
protected void installExtraActions() {
super.installExtraActions();
- ui.installExtraActions(ui.getModel().getStates());
+ ui.installExtraActions();
}
//FIXME:Focus ui.getModel().getStates().isCreatingMode() ? getUi().getObjectOperation() : getUi().getSupportVesselName()
@@ -61,7 +61,7 @@ public class FloatingObjectUIHandler extends GeneratedFloatingObjectUIHandler {
@Override
public void stopEditUI() {
- ui.stopEditUI(ui.getModel().getStates());
+ ui.stopEditUI();
super.stopEditUI();
}
=====================================
models/definition/src/main/models/Observe/dto/attribute/boundNumber.properties
=====================================
@@ -69,7 +69,7 @@ data.ll.observation.SizeMeasure.attribute.size=0.0:1000.0
data.ll.observation.WeightMeasure.attribute.weight=0.0:1000.0
data.ps.common.Trip.attribute.fishingTime=0:1300:!logbookEnabled
data.ps.common.Trip.attribute.landingTotalWeight=0.1:3000.0:!targetWellsSamplingEnabled
-data.ps.common.Trip.attribute.localMarketTotalWeight=0.1:3000.0:!localMarketWellsSamplingEnabled && !localMarketSurveySamplingEnabled
+data.ps.common.Trip.attribute.localMarketTotalWeight=0.0:1500.0:!localMarketWellsSamplingEnabled && !localMarketSurveySamplingEnabled
data.ps.common.Trip.attribute.timeAtSea=10:2400:!logbookEnabled
data.ps.landing.Landing.attribute.weight=0.0:600.0
data.ps.localmarket.Batch.attribute.weight=0.0:5.0:!countOrWeightValid
=====================================
models/dto/java/src/main/java/fr/ird/observe/dto/referential/ps/common/ObjectMaterialHierarchyDto.java
=====================================
@@ -22,13 +22,22 @@ package fr.ird.observe.dto.referential.ps.common;
* #L%
*/
+import com.google.common.collect.ArrayListMultimap;
+import com.google.common.collect.Multimap;
import fr.ird.observe.dto.referential.FormulaHelper;
import io.ultreia.java4all.bean.spi.GenerateJavaBeanDefinition;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Comparator;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.List;
+import java.util.Map;
+import java.util.Optional;
import java.util.Set;
+import java.util.TreeMap;
+import java.util.TreeSet;
/**
* Created by tchemit on 29/05/17.
@@ -40,6 +49,62 @@ public class ObjectMaterialHierarchyDto extends ObjectMaterialDto {
private final List<ObjectMaterialHierarchyDto> children;
+ public static class Builder {
+
+ private final List<ObjectMaterialDto> dtoList;
+
+ public Builder(Collection<ObjectMaterialDto> dtoList) {
+ this.dtoList = new ArrayList<>(dtoList);
+
+ }
+
+ public ObjectMaterialHierarchyDto build() {
+ dtoList.sort(Comparator.comparing(ObjectMaterialDto::getCode));
+ return getObjectMaterialHierarchyList(dtoList).get(0);
+ }
+
+
+ public List<ObjectMaterialHierarchyDto> getObjectMaterialHierarchyList(List<ObjectMaterialDto> objectMaterials) {
+ Multimap<String, ObjectMaterialDto> childrenByParent = ArrayListMultimap.create();
+ objectMaterials.forEach(o -> childrenByParent.put(Optional.ofNullable(o.getParent()).map(ObjectMaterialReference::getId).orElse("Yo"), o));
+ Collection<ObjectMaterialDto> topLevelMaterials = childrenByParent.get("Yo");
+ List<ObjectMaterialHierarchyDto> result = new LinkedList<>();
+ Set<String> idsDone = new TreeSet<>();
+ for (ObjectMaterialDto topLevelMaterial : topLevelMaterials) {
+ ObjectMaterialHierarchyDto hierarchyDto = fillHierarchyDto(childrenByParent, topLevelMaterial, idsDone);
+ result.add(hierarchyDto);
+ }
+ result.sort(Comparator.comparing(ObjectMaterialDto::getCode));
+ return result;
+ }
+
+ private ObjectMaterialHierarchyDto fillHierarchyDto(Multimap<String, ObjectMaterialDto> childrenByParent, ObjectMaterialDto topLevelMaterial, Set<String> idsDone) {
+ Collection<ObjectMaterialDto> childrenEntities = childrenByParent.get(topLevelMaterial.getId());
+ String code = topLevelMaterial.getCode();
+ int level = code == null || code.isEmpty() ? 0 : code.split("-").length;
+ Map<Integer, ObjectMaterialDto> orderMap = new TreeMap<>();
+ for (ObjectMaterialDto child : childrenEntities) {
+ String code1 = child.getCode().split("-")[level];
+ orderMap.put(Integer.valueOf(code1), child);
+ }
+ List<ObjectMaterialDto> orderedChildren = new LinkedList<>();
+ orderMap.forEach((k, v) -> orderedChildren.add(v));
+ ObjectMaterialHierarchyDto hierarchyDto = new ObjectMaterialHierarchyDto(topLevelMaterial);
+ boolean add = idsDone.add(hierarchyDto.getId());
+ if (add) {
+ for (ObjectMaterialDto child : orderedChildren) {
+ ObjectMaterialHierarchyDto hierarchyDto1 = fillHierarchyDto(childrenByParent, child, idsDone);
+ hierarchyDto.addChild(hierarchyDto1);
+ }
+ }
+ return hierarchyDto;
+ }
+ }
+
+ public static ObjectMaterialHierarchyDto build(Collection<ObjectMaterialDto> dtoList) {
+ return new Builder(dtoList).build();
+ }
+
public ObjectMaterialHierarchyDto(ObjectMaterialDto root) {
root.copy(this);
this.children = new LinkedList<>();
=====================================
models/persistence/java/src/main/java/fr/ird/observe/entities/data/ps/logbook/FloatingObjectSpi.java
=====================================
@@ -22,16 +22,12 @@ package fr.ird.observe.entities.data.ps.logbook;
* #L%
*/
-import com.google.common.collect.ArrayListMultimap;
-import com.google.common.collect.Multimap;
import fr.ird.observe.dto.ProtectedIdsPs;
import fr.ird.observe.dto.data.ps.dcp.FloatingObjectBuoyPreset;
import fr.ird.observe.dto.data.ps.dcp.FloatingObjectPreset;
import fr.ird.observe.dto.data.ps.logbook.FloatingObjectDto;
import fr.ird.observe.dto.form.Form;
import fr.ird.observe.dto.referential.ReferentialLocale;
-import fr.ird.observe.dto.referential.ps.common.ObjectMaterialDto;
-import fr.ird.observe.dto.referential.ps.common.ObjectMaterialHierarchyDto;
import fr.ird.observe.entities.ObserveTopiaPersistenceContextSupport;
import fr.ird.observe.entities.referential.common.Country;
import fr.ird.observe.entities.referential.common.Vessel;
@@ -44,19 +40,13 @@ import fr.ird.observe.entities.referential.ps.common.TransmittingBuoyType;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
-import java.util.Collection;
import java.util.Collections;
-import java.util.Comparator;
import java.util.Date;
import java.util.LinkedHashSet;
-import java.util.LinkedList;
-import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
-import java.util.TreeMap;
-import java.util.TreeSet;
import java.util.function.Supplier;
/**
@@ -68,12 +58,6 @@ import java.util.function.Supplier;
public class FloatingObjectSpi extends GeneratedFloatingObjectSpi {
private static final Logger log = LogManager.getLogger(FloatingObjectSpi.class);
- public ObjectMaterialHierarchyDto getObjectMaterialHierarchy(ObserveTopiaPersistenceContextSupport persistenceContext, ReferentialLocale referentialLocale) {
- List<ObjectMaterial> objectMaterials = ObjectMaterial.getDao(persistenceContext).findAll();
- objectMaterials.sort(Comparator.comparing(ObjectMaterial::getCode));
- return getObjectMaterialHierarchyList(objectMaterials, referentialLocale).get(0);
- }
-
public Form<FloatingObjectDto> preCreate(ObserveTopiaPersistenceContextSupport persistenceContext, Locale applicationLocale, ReferentialLocale referentialLocale, Supplier<Date> nowSupplier, FloatingObjectPreset floatingObjectPreset) {
Date now = nowSupplier.get();
FloatingObject entity = newEntity(now);
@@ -122,43 +106,6 @@ public class FloatingObjectSpi extends GeneratedFloatingObjectSpi {
super.onSave(persistenceContext, applicationLocale, referentialLocale, nowSupplier, parent, entity, dto);
}
- public List<ObjectMaterialHierarchyDto> getObjectMaterialHierarchyList(List<ObjectMaterial> objectMaterials, ReferentialLocale referentialLocale) {
- Multimap<String, ObjectMaterial> childrenByParent = ArrayListMultimap.create();
- objectMaterials.forEach(o -> childrenByParent.put(Optional.ofNullable(o.getParent()).map(ObjectMaterial::getTopiaId).orElse("Yo"), o));
- Collection<ObjectMaterial> topLevelMaterials = childrenByParent.get("Yo");
- List<ObjectMaterialHierarchyDto> result = new LinkedList<>();
- Set<String> idsDone = new TreeSet<>();
- for (ObjectMaterial topLevelMaterial : topLevelMaterials) {
- ObjectMaterialHierarchyDto hierarchyDto = fillHierarchyDto(childrenByParent, referentialLocale, ObjectMaterial.toDto(referentialLocale, topLevelMaterial), idsDone);
- result.add(hierarchyDto);
- }
- result.sort(Comparator.comparing(ObjectMaterialDto::getCode));
- return result;
- }
-
- private ObjectMaterialHierarchyDto fillHierarchyDto(Multimap<String, ObjectMaterial> childrenByParent, ReferentialLocale referentialLocale, ObjectMaterialDto topLevelMaterial, Set<String> idsDone) {
- Collection<ObjectMaterial> childrenEntities = childrenByParent.get(topLevelMaterial.getId());
- List<ObjectMaterialDto> children = ObjectMaterial.toDtoList(referentialLocale, childrenEntities.stream());
- String code = topLevelMaterial.getCode();
- int level = code == null|| code.isEmpty() ? 0 : code.split("-").length;
- Map<Integer, ObjectMaterialDto> orderMap = new TreeMap<>();
- for (ObjectMaterialDto child : children) {
- String code1 = child.getCode().split("-")[level];
- orderMap.put(Integer.valueOf(code1), child);
- }
- List<ObjectMaterialDto> orderedChildren = new LinkedList<>();
- orderMap.forEach((k, v) -> orderedChildren.add(v));
- ObjectMaterialHierarchyDto hierarchyDto = new ObjectMaterialHierarchyDto(topLevelMaterial);
- boolean add = idsDone.add(hierarchyDto.getId());
- if (add) {
- for (ObjectMaterialDto child : orderedChildren) {
- ObjectMaterialHierarchyDto hierarchyDto1 = fillHierarchyDto(childrenByParent, referentialLocale, child, idsDone);
- hierarchyDto.addChild(hierarchyDto1);
- }
- }
- return hierarchyDto;
- }
-
private TransmittingBuoy preCreate(ObserveTopiaPersistenceContextSupport topiaPersistenceContext, Locale applicationLocale, FloatingObjectBuoyPreset floatingObjectBuoyPreset, Date now) {
TransmittingBuoy transmittingBuoy = TransmittingBuoy.newEntity(now);
transmittingBuoy.setCode(floatingObjectBuoyPreset.getCode());
=====================================
server/core/src/main/filtered-resources/META-INF/mapping-api-v1.wm
=====================================
@@ -105,7 +105,6 @@ GET /data/ps/common/TripService/getAllTripIds data
GET /data/ps/common/TripService/getLogbookSetActivities data.ps.common.TripServiceRestApi.getLogbookSetActivities
GET /data/ps/common/TripService/getLogbookWellPlanActivities data.ps.common.TripServiceRestApi.getLogbookWellPlanActivities
GET /data/ps/common/TripService/getMatchingTripsVesselWithinDateRange data.ps.common.TripServiceRestApi.getMatchingTripsVesselWithinDateRange
-GET /data/ps/common/TripService/getObjectMaterialHierarchy data.ps.common.TripServiceRestApi.getObjectMaterialHierarchy
GET /data/ps/common/TripService/getSpeciesByListAndTrip data.ps.common.TripServiceRestApi.getSpeciesByListAndTrip
GET /data/ps/common/TripService/getTripMap data.ps.common.TripServiceRestApi.getTripMap
GET /data/ps/common/TripService/isActivityEndOfSearchFound data.ps.common.TripServiceRestApi.isActivityEndOfSearchFound
=====================================
services/api-test/src/main/java/fr/ird/observe/services/service/data/ps/common/TripServiceFixtures.java
=====================================
@@ -34,7 +34,6 @@ import fr.ird.observe.dto.reference.DataDtoReferenceSet;
import fr.ird.observe.dto.reference.ReferentialDtoReferenceSet;
import fr.ird.observe.dto.referential.ReferentialLocale;
import fr.ird.observe.dto.referential.common.SpeciesReference;
-import fr.ird.observe.dto.referential.ps.common.ObjectMaterialHierarchyDto;
import fr.ird.observe.services.ObserveServicesProvider;
import fr.ird.observe.services.service.data.EditableServiceFixtures;
import fr.ird.observe.services.service.data.OpenableServiceFixtures;
@@ -126,12 +125,6 @@ public class TripServiceFixtures extends GeneratedTripServiceFixtures {
Assert.assertTrue(activityEndOfSearchFound);
}
- @Override
- public void getObjectMaterialHierarchy(ObserveServicesProvider servicesProvider, TripService service) {
- ObjectMaterialHierarchyDto form = service.getObjectMaterialHierarchy();
- Assert.assertNotNull(form);
- }
-
@Override
public void preCreateLogbookFloatingObject(ObserveServicesProvider servicesProvider, TripService service) {
String activityId = getProperty("preCreateLogbookFloatingObject.activityId");
=====================================
services/api/src/main/java/fr/ird/observe/services/service/data/ps/common/TripService.java
=====================================
@@ -26,7 +26,6 @@ import fr.ird.observe.dto.data.ps.dcp.FloatingObjectPreset;
import fr.ird.observe.dto.data.ps.logbook.ActivityReference;
import fr.ird.observe.dto.form.Form;
import fr.ird.observe.dto.reference.DataDtoReferenceSet;
-import fr.ird.observe.dto.referential.ps.common.ObjectMaterialHierarchyDto;
import fr.ird.observe.security.Permission;
import fr.ird.observe.services.service.data.TripAwareService;
import fr.ird.observe.services.spi.MethodCredential;
@@ -65,10 +64,6 @@ public interface TripService extends TripAwareService {
@MethodCredential(Permission.READ_DATA)
boolean isActivityEndOfSearchFound(String routeId);
- @Get
- @MethodCredential(Permission.READ_REFERENTIAL)
- ObjectMaterialHierarchyDto getObjectMaterialHierarchy();
-
@Get
@MethodCredential(Permission.WRITE_DATA)
Form<fr.ird.observe.dto.data.ps.observation.FloatingObjectDto> preCreateObservationFloatingObject(String activityId, @Nullable FloatingObjectPreset floatingObjectPreset);
=====================================
services/local-impl/src/main/java/fr/ird/observe/services/local/service/data/ps/common/TripServiceLocalSupport.java
=====================================
@@ -29,13 +29,11 @@ import fr.ird.observe.dto.data.ps.logbook.ActivityReference;
import fr.ird.observe.dto.form.Form;
import fr.ird.observe.dto.reference.DataDtoReferenceSet;
import fr.ird.observe.dto.referential.ReferentialLocale;
-import fr.ird.observe.dto.referential.ps.common.ObjectMaterialHierarchyDto;
import fr.ird.observe.entities.data.ps.common.Program;
import fr.ird.observe.entities.data.ps.common.Trip;
import fr.ird.observe.entities.data.ps.common.TripSpi;
import fr.ird.observe.entities.data.ps.common.TripTopiaDao;
import fr.ird.observe.entities.data.ps.logbook.Activity;
-import fr.ird.observe.entities.data.ps.logbook.FloatingObject;
import fr.ird.observe.entities.data.ps.observation.Route;
import fr.ird.observe.services.service.data.ps.common.TripService;
@@ -73,11 +71,6 @@ public abstract class TripServiceLocalSupport extends fr.ird.observe.services.lo
return route.getActivity().stream().anyMatch(fr.ird.observe.entities.data.ps.observation.Activity::isActivityEndOfSearching);
}
- @Override
- public ObjectMaterialHierarchyDto getObjectMaterialHierarchy() {
- return FloatingObject.SPI.getObjectMaterialHierarchy(getTopiaPersistenceContext(), getReferentialLocale());
- }
-
@Override
public Form<fr.ird.observe.dto.data.ps.observation.FloatingObjectDto> preCreateObservationFloatingObject(String activityId, FloatingObjectPreset floatingObjectPreset) {
return fr.ird.observe.entities.data.ps.observation.FloatingObject.SPI.preCreate(getTopiaPersistenceContext(), getApplicationLocale(), getReferentialLocale(), this::now, floatingObjectPreset);
=====================================
services/validation/src/main/validation/fr/ird/observe/dto/data/ll/common/TripDto-create-error-validation.xml → services/validation/src/main/validation/fr/ird/observe/dto/data/ll/common/TripDto-create-warning-validation.xml
=====================================
=====================================
services/validation/src/main/validation/fr/ird/observe/dto/data/ll/common/TripDto-update-error-validation.xml
=====================================
@@ -23,13 +23,6 @@
"-//Apache Struts//XWork Validator 1.0.3//EN"
"http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd">
<validators>
- <field name="vessel">
- <!-- check vessel availability on trip -->
- <field-validator type="tripVessel" short-circuit="true">
- <param name="serviceName">servicesProvider.llCommonTripService</param>
- <message/>
- </field-validator>
- </field>
<field name="startDate">
<!-- startDate < any activity date -->
<field-validator type="collectionFieldExpression">
=====================================
services/validation/src/main/validation/fr/ird/observe/dto/data/ll/common/TripDto-update-warning-validation.xml
=====================================
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ #%L
+ ObServe Services :: Validation
+ %%
+ Copyright (C) 2008 - 2021 IRD, Code Lutin, 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="vessel">
+ <!-- check vessel availability on trip -->
+ <field-validator type="tripVessel" short-circuit="true">
+ <param name="serviceName">servicesProvider.psCommonTripService</param>
+ <message/>
+ </field-validator>
+ </field>
+</validators>
=====================================
services/validation/src/main/validation/fr/ird/observe/dto/data/ps/common/TripDto-create-error-validation.xml
=====================================
@@ -23,13 +23,6 @@
"-//Apache Struts//XWork Validator 1.0.3//EN"
"http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd">
<validators>
- <field name="vessel">
- <!-- check vessel availability on trip -->
- <field-validator type="tripVessel" short-circuit="true">
- <param name="serviceName">servicesProvider.psCommonTripService</param>
- <message/>
- </field-validator>
- </field>
<field name="formsUrl">
<!-- check url syntax except if !observationsAvailability -->
<field-validator type="url" short-circuit="true">
=====================================
services/validation/src/main/validation/fr/ird/observe/dto/data/ps/common/TripDto-create-warning-validation.xml
=====================================
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ #%L
+ ObServe Services :: Validation
+ %%
+ Copyright (C) 2008 - 2021 IRD, Code Lutin, 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="vessel">
+ <!-- check vessel availability on trip -->
+ <field-validator type="tripVessel" short-circuit="true">
+ <param name="serviceName">servicesProvider.psCommonTripService</param>
+ <message/>
+ </field-validator>
+ </field>
+</validators>
=====================================
services/validation/src/main/validation/fr/ird/observe/dto/data/ps/common/TripDto-update-error-validation.xml
=====================================
@@ -23,13 +23,6 @@
"-//Apache Struts//XWork Validator 1.0.3//EN"
"http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd">
<validators>
- <field name="vessel">
- <!-- check vessel availability on trip -->
- <field-validator type="tripVessel" short-circuit="true">
- <param name="serviceName">servicesProvider.psCommonTripService</param>
- <message/>
- </field-validator>
- </field>
<field name="startDate">
<!-- routes date check -->
<field-validator type="collectionFieldExpression">
=====================================
services/validation/src/main/validation/fr/ird/observe/dto/data/ps/common/TripDto-update-warning-validation.xml
=====================================
@@ -23,6 +23,13 @@
"-//Apache Struts//XWork Validator 1.0.3//EN"
"http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd">
<validators>
+ <field name="vessel">
+ <!-- check vessel availability on trip -->
+ <field-validator type="tripVessel" short-circuit="true">
+ <param name="serviceName">servicesProvider.psCommonTripService</param>
+ <message/>
+ </field-validator>
+ </field>
<field name="routeObs">
<!-- check routes loch -->
<field-validator type="collectionFieldExpression">
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/e828c2dbe1aecb14f3df14d5…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/e828c2dbe1aecb14f3df14d5…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop] 13 commits: flags Program.observation(s) et Program.logbook(s) - See ultreiaio/ird-observe#2052
by Tony CHEMIT (@tchemit) 25 Oct '21
by Tony CHEMIT (@tchemit) 25 Oct '21
25 Oct '21
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
b43b4567 by Tony Chemit at 2021-10-25T19:39:30+02:00
flags Program.observation(s) et Program.logbook(s) - See ultreiaio/ird-observe#2052
Rajouter un programme logbook sur la marée
Review program and trip API, reduce the program API.
See ultreiaio/ird-observe#1963
- - - - -
79dfba06 by Tony Chemit at 2021-10-25T19:39:30+02:00
normalisation i18n sur validateur dayBefore et dayAfter pour pouvoir les génerer :)
- - - - -
70d10c11 by Tony Chemit at 2021-10-25T19:39:30+02:00
generation des validateurs temporels
- - - - -
6f072321 by Tony Chemit at 2021-10-25T19:39:30+02:00
update public API doc
remove short-circuit on generated validation
update model
use generated temporal validators
- - - - -
6bfe6131 by Tony Chemit at 2021-10-25T19:39:30+02:00
Fix Trip vessel validator when no vessel
- - - - -
65ce10d3 by Tony Chemit at 2021-10-25T19:39:30+02:00
clean and improve AVDTH Species management
- - - - -
f8be56a0 by Tony Chemit at 2021-10-25T19:39:30+02:00
update pom
- - - - -
bfac7362 by Tony Chemit at 2021-10-25T19:39:30+02:00
fix decorator usage
- - - - -
e7e30ce7 by Tony Chemit at 2021-10-25T19:39:30+02:00
Amélioration des éditeurs de type combo-box - Closes #2057
- - - - -
4ce25fcc by Tony Chemit at 2021-10-25T19:39:30+02:00
By default, do not see validate range label in referential decorations, only for referential forms.
- - - - -
ac8d5fe9 by Tony Chemit at 2021-10-25T19:39:30+02:00
Souci de validation sur form FP Sondage - Closes #2062
- - - - -
05e3f27b by Tony Chemit at 2021-10-25T19:39:30+02:00
Unicité Trip PS & LL - Closes #2060
- - - - -
e828c2db by Tony Chemit at 2021-10-25T20:25:43+02:00
Erreur sur ouverture des forms objet flottant en mode serveur, sur les logbooks et les observations - Closes #2055
- - - - -
30 changed files:
- client/configuration/pom.xml
- client/core/pom.xml
- client/core/src/main/java/fr/ird/observe/client/datasource/api/cache/ReferencesCache.java
- client/core/src/main/java/fr/ird/observe/client/datasource/api/cache/ReferencesFilterHelper.java
- client/core/src/main/java/fr/ird/observe/client/main/body/ClientConfigUI.java
- client/core/src/main/java/fr/ird/observe/client/main/focus/FocusDispatcher.java
- client/core/src/main/java/fr/ird/observe/client/util/UIHelper.java
- client/core/src/main/java/fr/ird/observe/client/util/init/DefaultUIInitializer.java
- client/core/src/main/java/fr/ird/observe/client/util/init/DefaultUIInitializerContext.java
- client/core/src/main/java/fr/ird/observe/client/util/init/DefaultUIInitializerResult.java
- client/core/src/main/java/fr/ird/observe/client/util/init/UIInitHelper.java
- client/core/src/main/java/fr/ird/observe/client/util/session/ObserveSwingSessionHelper.java
- client/core/src/main/resources/fr/ird/observe/client/ui/ObserveCommon.jcss
- client/datasource/actions/pom.xml
- client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/pairing/ll/tree/ActivityLlPairingTreeTable.java
- client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/report/ReportUIHandler.java
- client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/legacy/SynchronizeUIHandler.java
- client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/legacy/actions/Apply.java
- client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/ReferentialReplaceUI.jaxx
- client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/ReferentialReplaceUIHandler.java
- client/datasource/api/pom.xml
- client/datasource/editor/api/pom.xml
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/avdth/ImportDialog.jaxx
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/avdth/ImportDialogModel.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/ContentUIInitializer.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/actions/move/MoveRequestBuilder.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/actions/open/ContentOpen.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/sample/actions/ResetSizeMeasureType.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/sample/actions/ResetWeightMeasureType.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/referential/ContentReferentialUIInitializer.java
The diff was not included because it is too large.
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/9ff3df0a9ebffda552e6a845…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/9ff3df0a9ebffda552e6a845…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop] 13 commits: Rajouter un programme logbook sur la marée
by Tony CHEMIT (@tchemit) 25 Oct '21
by Tony CHEMIT (@tchemit) 25 Oct '21
25 Oct '21
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
9fd2659d by Tony Chemit at 2021-10-25T18:20:02+02:00
Rajouter un programme logbook sur la marée
Review program and trip API, reduce the program API.
See ultreiaio/ird-observe#1963
- - - - -
b5cb5a68 by Tony Chemit at 2021-10-25T18:20:02+02:00
normalisation i18n sur validateur dayBefore et dayAfter pour pouvoir les génerer :)
- - - - -
f47b390b by Tony Chemit at 2021-10-25T18:20:02+02:00
generation des validateurs temporels
- - - - -
2c14e557 by Tony Chemit at 2021-10-25T18:20:02+02:00
flags Program.observation(s) et Program.logbook(s) - See ultreiaio/ird-observe#2052
- - - - -
43edc293 by Tony Chemit at 2021-10-25T18:20:02+02:00
update public API doc
remove short-circuit on generated validation
update model
use generated temporal validators
- - - - -
939e786f by Tony Chemit at 2021-10-25T18:20:02+02:00
Fix Trip vessel validator when no vessel
- - - - -
21d8418f by Tony Chemit at 2021-10-25T18:20:02+02:00
clean and improve AVDTH Species management
- - - - -
6d885090 by Tony Chemit at 2021-10-25T18:20:02+02:00
update pom
- - - - -
914292a9 by Tony Chemit at 2021-10-25T18:20:02+02:00
fix decorator usage
- - - - -
a549fa0a by Tony Chemit at 2021-10-25T18:20:02+02:00
Amélioration des éditeurs de type combo-box - Closes #2057
- - - - -
45a3f631 by Tony Chemit at 2021-10-25T18:20:02+02:00
By default, do not see validate range label in referential decorations, only for referential forms.
- - - - -
e0f809ee by Tony Chemit at 2021-10-25T18:20:02+02:00
Souci de validation sur form FP Sondage - Closes #2062
- - - - -
9ff3df0a by Tony Chemit at 2021-10-25T18:20:02+02:00
Unicité Trip PS & LL - Closes #2060
- - - - -
30 changed files:
- client/configuration/pom.xml
- client/core/pom.xml
- client/core/src/main/java/fr/ird/observe/client/datasource/api/cache/ReferencesCache.java
- client/core/src/main/java/fr/ird/observe/client/datasource/api/cache/ReferencesFilterHelper.java
- client/core/src/main/java/fr/ird/observe/client/main/body/ClientConfigUI.java
- client/core/src/main/java/fr/ird/observe/client/main/focus/FocusDispatcher.java
- client/core/src/main/java/fr/ird/observe/client/util/UIHelper.java
- client/core/src/main/java/fr/ird/observe/client/util/init/DefaultUIInitializer.java
- client/core/src/main/java/fr/ird/observe/client/util/init/DefaultUIInitializerContext.java
- client/core/src/main/java/fr/ird/observe/client/util/init/DefaultUIInitializerResult.java
- client/core/src/main/java/fr/ird/observe/client/util/init/UIInitHelper.java
- client/core/src/main/java/fr/ird/observe/client/util/session/ObserveSwingSessionHelper.java
- client/core/src/main/resources/fr/ird/observe/client/ui/ObserveCommon.jcss
- client/datasource/actions/pom.xml
- client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/pairing/ll/tree/ActivityLlPairingTreeTable.java
- client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/report/ReportUIHandler.java
- client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/legacy/SynchronizeUIHandler.java
- client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/legacy/actions/Apply.java
- client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/ReferentialReplaceUI.jaxx
- client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/ReferentialReplaceUIHandler.java
- client/datasource/api/pom.xml
- client/datasource/editor/api/pom.xml
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/avdth/ImportDialog.jaxx
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/avdth/ImportDialogModel.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/ContentUIInitializer.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/actions/move/MoveRequestBuilder.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/actions/open/ContentOpen.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/sample/actions/ResetSizeMeasureType.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/sample/actions/ResetWeightMeasureType.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/referential/ContentReferentialUIInitializer.java
The diff was not included because it is too large.
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/1b4b3c0de0bb432148ee566a…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/1b4b3c0de0bb432148ee566a…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop] 13 commits: Rajouter un programme logbook sur la marée
by Tony CHEMIT (@tchemit) 25 Oct '21
by Tony CHEMIT (@tchemit) 25 Oct '21
25 Oct '21
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
465f7039 by Tony Chemit at 2021-10-25T17:40:57+02:00
Rajouter un programme logbook sur la marée
Review program and trip API, reduce the program API.
See ultreiaio/ird-observe#1963
- - - - -
f48b2aa9 by Tony Chemit at 2021-10-25T17:41:00+02:00
normalisation i18n sur validateur dayBefore et dayAfter pour pouvoir les génerer :)
- - - - -
6c0bda63 by Tony Chemit at 2021-10-25T17:41:00+02:00
generation des validateurs temporels
- - - - -
76207278 by Tony Chemit at 2021-10-25T17:41:00+02:00
flags Program.observation(s) et Program.logbook(s) - See ultreiaio/ird-observe#2052
- - - - -
167f68fb by Tony Chemit at 2021-10-25T17:41:00+02:00
update public API doc
remove short-circuit on generated validation
update model
use generated temporal validators
- - - - -
19310498 by Tony Chemit at 2021-10-25T17:41:00+02:00
Fix Trip vessel validator when no vessel
- - - - -
1fbf6506 by Tony Chemit at 2021-10-25T17:41:00+02:00
clean and improve AVDTH Species management
- - - - -
470252e7 by Tony Chemit at 2021-10-25T17:44:26+02:00
update pom
- - - - -
f57129be by Tony Chemit at 2021-10-25T17:44:26+02:00
fix decorator usage
- - - - -
053b24b9 by Tony Chemit at 2021-10-25T17:44:26+02:00
Amélioration des éditeurs de type combo-box - Closes #2057
- - - - -
e3bb8b61 by Tony Chemit at 2021-10-25T17:44:26+02:00
By default, do not see validate range label in referential decorations, only for referential forms.
- - - - -
8f096945 by Tony Chemit at 2021-10-25T17:44:26+02:00
Souci de validation sur form FP Sondage - Closes #2062
- - - - -
1b4b3c0d by Tony Chemit at 2021-10-25T17:44:26+02:00
Unicité Trip PS & LL - Closes #2060
- - - - -
30 changed files:
- client/configuration/pom.xml
- client/core/pom.xml
- client/core/src/main/java/fr/ird/observe/client/datasource/api/cache/ReferencesCache.java
- client/core/src/main/java/fr/ird/observe/client/datasource/api/cache/ReferencesFilterHelper.java
- client/core/src/main/java/fr/ird/observe/client/main/body/ClientConfigUI.java
- client/core/src/main/java/fr/ird/observe/client/main/focus/FocusDispatcher.java
- client/core/src/main/java/fr/ird/observe/client/util/UIHelper.java
- client/core/src/main/java/fr/ird/observe/client/util/init/DefaultUIInitializer.java
- client/core/src/main/java/fr/ird/observe/client/util/init/DefaultUIInitializerContext.java
- client/core/src/main/java/fr/ird/observe/client/util/init/DefaultUIInitializerResult.java
- client/core/src/main/java/fr/ird/observe/client/util/init/UIInitHelper.java
- client/core/src/main/java/fr/ird/observe/client/util/session/ObserveSwingSessionHelper.java
- client/core/src/main/resources/fr/ird/observe/client/ui/ObserveCommon.jcss
- client/datasource/actions/pom.xml
- client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/pairing/ll/tree/ActivityLlPairingTreeTable.java
- client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/report/ReportUIHandler.java
- client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/legacy/SynchronizeUIHandler.java
- client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/legacy/actions/Apply.java
- client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/ReferentialReplaceUI.jaxx
- client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/ReferentialReplaceUIHandler.java
- client/datasource/api/pom.xml
- client/datasource/editor/api/pom.xml
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/avdth/ImportDialog.jaxx
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/avdth/ImportDialogModel.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/ContentUIInitializer.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/actions/move/MoveRequestBuilder.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/actions/open/ContentOpen.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/sample/actions/ResetSizeMeasureType.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/sample/actions/ResetWeightMeasureType.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/referential/ContentReferentialUIInitializer.java
The diff was not included because it is too large.
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/14089809dc3e40e016e8986e…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/14089809dc3e40e016e8986e…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][pages] Site checkin for project ObServe (version 9.0.0-RC-17-SNAPSHOT)
by Tony CHEMIT (@tchemit) 22 Oct '21
by Tony CHEMIT (@tchemit) 22 Oct '21
22 Oct '21
Tony CHEMIT pushed to branch pages at ultreiaio / ird-observe
Commits:
19622dc2 by Tony Chemit at 2021-10-22T18:03:14+02:00
Site checkin for project ObServe (version 9.0.0-RC-17-SNAPSHOT)
- - - - -
1 changed file:
- + 9.0.0-RC-17-SNAPSHOT/CHANGELOG.html
The diff was not included because it is too large.
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/19622dc2a4fe37be27edfd000…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/19622dc2a4fe37be27edfd000…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop] 8 commits: Rajouter un programme logbook sur la marée
by Tony CHEMIT (@tchemit) 22 Oct '21
by Tony CHEMIT (@tchemit) 22 Oct '21
22 Oct '21
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
7bf3ff56 by Tony Chemit at 2021-10-22T14:32:16+02:00
Rajouter un programme logbook sur la marée
Review program and trip API, reduce the program API.
See ultreiaio/ird-observe#1963
- - - - -
17d9a470 by Tony Chemit at 2021-10-22T14:32:16+02:00
normalisation i18n sur validateur dayBefore et dayAfter pour pouvoir les génerer :)
- - - - -
d975f78d by Tony Chemit at 2021-10-22T14:32:16+02:00
generation des validateurs temporels
- - - - -
880ec253 by Tony Chemit at 2021-10-22T14:32:16+02:00
flags Program.observation(s) et Program.logbook(s) - See ultreiaio/ird-observe#2052
- - - - -
eb68bb80 by Tony Chemit at 2021-10-22T14:32:16+02:00
update public API doc
remove short-circuit on generated validation
update model
use generated temporal validators
- - - - -
b6376078 by Tony Chemit at 2021-10-22T15:17:52+02:00
Fix Trip vessel validator when no vessel
- - - - -
7930caeb by Tony Chemit at 2021-10-22T15:18:17+02:00
clean and improve AVDTH Species management
- - - - -
14089809 by Tony Chemit at 2021-10-22T17:36:15+02:00
update pom and use last jaxx
- - - - -
30 changed files:
- client/configuration/pom.xml
- client/core/pom.xml
- client/datasource/actions/pom.xml
- client/datasource/api/pom.xml
- client/datasource/editor/api/pom.xml
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/avdth/ImportDialogModel.java
- client/datasource/editor/common/pom.xml
- client/datasource/editor/common/src/main/i18n/getters/jaxx.getter
- client/datasource/editor/common/src/main/java/fr/ird/observe/client/datasource/editor/common/referential/common/ProgramUI.jaxx
- client/datasource/editor/ll/pom.xml
- client/datasource/editor/ll/src/main/i18n/getters/jaxx.getter
- client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/common/TripUI.jaxx
- client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/common/TripUI.jcss
- client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/common/TripUIModelStates.java
- client/datasource/editor/ll/src/main/resources/fr/ird/observe/client/datasource/editor/ll/data/common/TripListUINavigationNode.scope
- client/datasource/editor/ps/pom.xml
- client/datasource/editor/ps/src/main/i18n/getters/jaxx.getter
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/common/TripUI.jaxx
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/common/TripUIModelStates.java
- client/datasource/editor/ps/src/main/resources/fr/ird/observe/client/datasource/editor/ps/data/common/TripListUINavigationNode.scope
- client/datasource/editor/ps/src/main/resources/fr/ird/observe/client/datasource/editor/ps/data/logbook/LightActivityUIModel-create-error-validation.xml
- client/i18n/pom.xml
- models/definition/src/main/models/Observe/dto/01-referential-common.model
- models/definition/src/main/models/Observe/dto/25-data-ps-common.model
- models/definition/src/main/models/Observe/dto/35-data-ll-common.model
- models/definition/src/main/models/Observe/dto/attribute/commentNeeded.properties
- + models/definition/src/main/models/Observe/dto/attribute/dayAfter.properties
- + models/definition/src/main/models/Observe/dto/attribute/dayAfterWarning.properties
- + models/definition/src/main/models/Observe/dto/attribute/dayBefore.properties
- models/definition/src/main/models/Observe/dto/attribute/notNullIf.properties
The diff was not included because it is too large.
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/d29934e05ca34fd031b2590a…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/d29934e05ca34fd031b2590a…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop] 33 commits: Libellé form plan de cuves - Closes #2045
by Tony CHEMIT (@tchemit) 21 Oct '21
by Tony CHEMIT (@tchemit) 21 Oct '21
21 Oct '21
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
28d61251 by Tony Chemit at 2021-10-20T09:19:05+02:00
Libellé form plan de cuves - Closes #2045
- - - - -
515d7e98 by Tony Chemit at 2021-10-20T09:19:05+02:00
Organisation du form PS/Logbook/Activité - Closes #2043
- - - - -
4b8e0056 by Tony Chemit at 2021-10-20T09:19:05+02:00
Ajout de 2 colonnes dates sur Vessel - Closes #2040
- - - - -
d84222a0 by Tony Chemit at 2021-10-20T09:19:05+02:00
Note d'information sur le form Activité - Closes #2041
- - - - -
de793ba1 by Tony Chemit at 2021-10-20T09:19:05+02:00
revert remove LastUpdateDate entity from referential replication at last.
- - - - -
f96cbab1 by Tony Chemit at 2021-10-20T09:19:05+02:00
Fix decorator issues in ListHEader and DoubleList - Closes ultreiaio/jaxx#802
- - - - -
e7e55544 by Tony Chemit at 2021-10-20T09:19:05+02:00
Organisation du form PS/Logbook/Activité - Closes #2043
- - - - -
86e89b0a by Tony Chemit at 2021-10-20T09:19:05+02:00
Note d'information sur le form Activité - Closes #2041
- - - - -
66490e40 by Tony Chemit at 2021-10-20T09:19:05+02:00
update pom
- - - - -
c8a8eded by Tony Chemit at 2021-10-20T09:19:05+02:00
fix bad focus in ContentListUI when not empty (list lost fpcus to header)
- - - - -
38197f63 by Tony Chemit at 2021-10-20T09:19:05+02:00
Marché local : conseil à donner lorsque la liste des conditionnements est vide - See #1840
- - - - -
fb708cd9 by Tony Chemit at 2021-10-20T09:19:05+02:00
validator redundant
- - - - -
78ced7a0 by Tony Chemit at 2021-10-20T09:19:05+02:00
Passage ps local market SurveyPart en tableau inline
Correction validation Survey
- - - - -
e5182c83 by Tony Chemit at 2021-10-20T09:19:05+02:00
do not display messages coming from validator without ui
- - - - -
8c6b9807 by Tony Chemit at 2021-10-20T09:19:05+02:00
be able to change the bean on a ContentSimpleUI
- - - - -
1fa0cf08 by Tony Chemit at 2021-10-20T09:19:05+02:00
improve ps landing date validation
- - - - -
3e3bf2aa by Tony Chemit at 2021-10-20T09:19:05+02:00
add missing status in ps TripDto
- - - - -
3cef3e87 by Tony Chemit at 2021-10-20T09:19:05+02:00
improve extra decorators
- - - - -
53d2db87 by Tony Chemit at 2021-10-20T09:19:05+02:00
Passage ps local market SurveyPart en tableau inline
- - - - -
7e3f1b9b by Tony Chemit at 2021-10-20T09:19:05+02:00
Improve ps local market batch form (use short packaging decorator)
- - - - -
2e38ca3d by Tony Chemit at 2021-10-20T09:19:05+02:00
improve species decoration in data
use at last decorator renderer defined in the concrete project (so can make any modification on them :))
- - - - -
803f5bd1 by Tony Chemit at 2021-10-20T09:19:05+02:00
use jaxx editors decorator classifier for table references render
- - - - -
11b196da by Tony Chemit at 2021-10-20T09:19:05+02:00
Revue de la modélisation ps logbook Sample - See ultreiaio/ird-observe#2001
- - - - -
23dd0257 by Tony Chemit at 2021-10-20T09:19:05+02:00
revue layout ps logbook activity catch
- - - - -
1b87f6d3 by Tony Chemit at 2021-10-20T09:19:05+02:00
fix default logbook value on trip create (ps)
- - - - -
08ea23d9 by Tony Chemit at 2021-10-20T09:19:05+02:00
add tooltip on tables :)
- - - - -
97a00c7b by Tony Chemit at 2021-10-20T09:19:05+02:00
Amélioration d'un libellé - Closes #2038
- - - - -
7c6a1fa9 by Tony Chemit at 2021-10-20T09:19:05+02:00
Nouvelle marée : onglet focusé - Closes #2050
- - - - -
54bbfcd1 by Tony Chemit at 2021-10-20T09:19:05+02:00
add missing Trip.departureWellContentStatus not null if validation
- - - - -
50840820 by Tony Chemit at 2021-10-20T11:36:30+02:00
update fixtures
- - - - -
eec818f8 by Tony Chemit at 2021-10-21T17:17:42+02:00
Rajouter un programme logbook sur la marée
Review program and trip API, reduce the program API.
See ultreiaio/ird-observe#1963
- - - - -
1940412a by Tony Chemit at 2021-10-21T17:17:42+02:00
normalisation i18n sur validateur dayBefore et dayAfter pour pouvoir les génerer :)
- - - - -
d29934e0 by Tony Chemit at 2021-10-21T20:07:41+02:00
generation des validateurs temporels
- - - - -
30 changed files:
- client/core/src/main/java/fr/ird/observe/client/datasource/api/cache/ReferencesCache.java
- client/core/src/main/java/fr/ird/observe/client/datasource/validation/ContentMessageTableModel.java
- client/core/src/main/java/fr/ird/observe/client/util/table/JXTableUtil.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/TripUIHelper.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/list/ContentListUIHandler.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/simple/ContentSimpleUI.jaxx
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/simple/ContentSimpleUIModelStatesSupport.java
- client/datasource/editor/common/src/main/java/fr/ird/observe/client/datasource/editor/common/referential/common/VesselUI.jaxx
- client/datasource/editor/ll/src/main/i18n/getters/jaxx.getter
- client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/common/TripUI.jaxx
- client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/common/TripUI.jcss
- client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/common/TripUIModelStates.java
- client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/observation/LonglinePositionAware.jcss
- client/datasource/editor/ll/src/main/resources/fr/ird/observe/client/datasource/editor/ll/data/common/TripListUINavigationNode.scope
- client/datasource/editor/ps/src/main/i18n/getters/java.getter
- 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/common/TripUI.jaxx
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/common/TripUI.jcss
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/common/TripUIModelStates.java
- + client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/localmarket/SurveyPartTableModel.java
- − client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/localmarket/SurveyPartUI.jaxx
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/localmarket/SurveyUI.jaxx
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/localmarket/SurveyUI.jcss
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/localmarket/SurveyUIHandler.java
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/localmarket/SurveyUIModelStates.java
- 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/data/logbook/ActivityCatchUITableModel.java
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/logbook/ActivityUI.jaxx
The diff was not included because it is too large.
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/73332d7e509158bd45553c39…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/73332d7e509158bd45553c39…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop] 2 commits: Nouvelle marée : onglet focusé - Closes #2050
by Tony CHEMIT (@tchemit) 20 Oct '21
by Tony CHEMIT (@tchemit) 20 Oct '21
20 Oct '21
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
284ca5c6 by Tony Chemit at 2021-10-20T08:49:21+02:00
Nouvelle marée : onglet focusé - Closes #2050
- - - - -
73332d7e by Tony Chemit at 2021-10-20T09:11:54+02:00
add missing Trip.departureWellContentStatus not null if validation
- - - - -
6 changed files:
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/TripUIHelper.java
- models/definition/src/main/models/Observe/dto/attribute/notNullIf.properties
- services/i18n/src/main/i18n/translations/services_en_GB.properties
- services/i18n/src/main/i18n/translations/services_es_ES.properties
- services/i18n/src/main/i18n/translations/services_fr_FR.properties
- services/validation/src/main/i18n/getters/validation-messages.getter
Changes:
=====================================
client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/TripUIHelper.java
=====================================
@@ -98,6 +98,9 @@ public abstract class TripUIHelper<D extends OpenableDto, U extends ContentOpena
// Re-set mapTab enabled state
ui.processDataBinding("mapTab.enabled");
ui.getMainTabbedPane().setEnabledAt(ui.getMainTabbedPane().getTabCount() - 1, ui.getMapTab().isEnabled());
+ if (ui.getModel().getStates().isCreatingMode()) {
+ ui.getMainTabbedPane().setSelectedIndex(0);
+ }
}
private void buildTripMap() {
=====================================
models/definition/src/main/models/Observe/dto/attribute/notNullIf.properties
=====================================
@@ -31,6 +31,7 @@ data.ll.logbook.SamplePart.attribute.sizeMeasureType=length == null
data.ll.logbook.SamplePart.attribute.weight=acquisitionMode == 0 || length != null
data.ll.logbook.SamplePart.attribute.weightMeasureType=weight == null
data.ll.observation.Catch.attribute.count=acquisitionMode == 0
+data.ps.common.Trip.attribute.departureWellContentStatus=!logbookEnabled
data.ps.common.Trip.attribute.landingWellContentStatus=!logbookEnabled
data.ps.common.Trip.attribute.logbookDataEntryOperator=!logbookCommonEnabled
data.ps.common.Trip.attribute.logbookDataQuality=!logbookCommonEnabled
=====================================
services/i18n/src/main/i18n/translations/services_en_GB.properties
=====================================
@@ -914,6 +914,7 @@ observe.data.ps.common.Trip.action.openLinkFormsUrl.tip=View forms in a web brow
observe.data.ps.common.Trip.action.openLinkReportsUrl.tip=View reports in a web browser
observe.data.ps.common.Trip.advancedSamplingAcquisitionStatus=Advanced sampling
observe.data.ps.common.Trip.departureWellContentStatus=Departure well content status
+observe.data.ps.common.Trip.departureWellContentStatus.validation.required=Required departure well content status if logbook data is selected.
observe.data.ps.common.Trip.fishingTime=Fishing time (h)
observe.data.ps.common.Trip.landingAcquisitionStatus=Landing sheet collection
observe.data.ps.common.Trip.landingAcquisitionStatusLabel.tip=Only choices that indicate existence of data allow acquisition for landing
=====================================
services/i18n/src/main/i18n/translations/services_es_ES.properties
=====================================
@@ -914,6 +914,7 @@ observe.data.ps.common.Trip.action.openLinkFormsUrl.tip=Acceder a los formulario
observe.data.ps.common.Trip.action.openLinkReportsUrl.tip=Accéder aux rapports dans un navigateur web
observe.data.ps.common.Trip.advancedSamplingAcquisitionStatus=Advanced sampling TODO
observe.data.ps.common.Trip.departureWellContentStatus=État de remplissage des cuves au départ \#TODO
+observe.data.ps.common.Trip.departureWellContentStatus.validation.required=Required departure well content status if logbook data is selected. \#TODO
observe.data.ps.common.Trip.fishingTime=Heures de peche \#TODO
observe.data.ps.common.Trip.landingAcquisitionStatus=Landing sheet collection \#TODO
observe.data.ps.common.Trip.landingAcquisitionStatusLabel.tip=Only choices that indicate existence of data allow acquisition for landing
=====================================
services/i18n/src/main/i18n/translations/services_fr_FR.properties
=====================================
@@ -914,6 +914,7 @@ observe.data.ps.common.Trip.action.openLinkFormsUrl.tip=Accéder aux formulaires
observe.data.ps.common.Trip.action.openLinkReportsUrl.tip=Accéder aux rapports dans un navigateur web
observe.data.ps.common.Trip.advancedSamplingAcquisitionStatus=Échantillonnage avancé
observe.data.ps.common.Trip.departureWellContentStatus=État de remplissage des cuves au départ
+observe.data.ps.common.Trip.departureWellContentStatus.validation.required=Champs obligatoire si données livre de bord est sélectionné.
observe.data.ps.common.Trip.fishingTime=Heures de pêche
observe.data.ps.common.Trip.landingAcquisitionStatus=Collecte du bon de débarquement
observe.data.ps.common.Trip.landingAcquisitionStatusLabel.tip=Seuls les choix reflétant l'existence des données permettront la collecte du bon de débarquement
=====================================
services/validation/src/main/i18n/getters/validation-messages.getter
=====================================
@@ -69,6 +69,7 @@ observe.data.ps.Route.validation.invalid.quadrant
observe.data.ps.Route.validation.invalid.time
observe.data.ps.Route.validation.unclosed.activity
observe.data.ps.SampleSpecies.validation.mismatch.measuredCount
+observe.data.ps.common.Trip.departureWellContentStatus.validation.required
observe.data.ps.common.Trip.landingWellContentStatus.validation.required
observe.data.ps.landing.Landing.validation.date.after.currentTrip.endDate
observe.data.ps.landing.Landing.validation.date.after.currentTrip.startDate
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/bad538ef1e512e1969a4e24d…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/bad538ef1e512e1969a4e24d…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop] 7 commits: improve species decoration in data
by Tony CHEMIT (@tchemit) 20 Oct '21
by Tony CHEMIT (@tchemit) 20 Oct '21
20 Oct '21
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
8ab949b2 by Tony Chemit at 2021-10-20T08:31:31+02:00
improve species decoration in data
use at last decorator renderer defined in the concrete project (so can make any modification on them :))
- - - - -
50711231 by Tony Chemit at 2021-10-20T08:31:31+02:00
use jaxx editors decorator classifier for table references render
- - - - -
2b8167b1 by Tony Chemit at 2021-10-20T08:31:31+02:00
Revue de la modélisation ps logbook Sample - See ultreiaio/ird-observe#2001
- - - - -
3b026463 by Tony Chemit at 2021-10-20T08:31:31+02:00
revue layout ps logbook activity catch
- - - - -
2e5cdb3f by Tony Chemit at 2021-10-20T08:31:31+02:00
fix default logbook value on trip create (ps)
- - - - -
2680d23a by Tony Chemit at 2021-10-20T08:31:31+02:00
add tooltip on tables :)
- - - - -
bad538ef by Tony Chemit at 2021-10-20T08:31:59+02:00
Amélioration d'un libellé - Closes #2038
- - - - -
19 changed files:
- client/core/src/main/java/fr/ird/observe/client/util/table/JXTableUtil.java
- client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/observation/LonglinePositionAware.jcss
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/common/TripUIModelStates.java
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/logbook/ActivityCatchUITableModel.java
- client/datasource/editor/spi/src/main/java/fr/ird/observe/client/datasource/editor/spi/content/data/table/GenerateContentTableUITableModel.java
- models/definition/src/main/models/Observe/dto/attribute/notNullIf.properties
- models/definition/src/main/models/Observe/dto/class/containerChildDataDtoProperties.properties
- models/definition/src/main/models/Observe/dto/class/decorator.properties
- models/definition/src/main/models/Observe/dto/class/i18nLabels.properties
- models/definition/src/main/models/Observe/dto/class/references.properties
- models/dto/i18n/src/main/i18n/getters/labels.getter
- models/dto/java/src/main/i18n/getters/java.getter
- + models/dto/java/src/main/java/fr/ird/observe/spi/decoration/ObserveDefaultDecoratorRenderer.java
- + models/dto/java/src/main/java/fr/ird/observe/spi/decoration/ObserveDtoDecoratorRenderer.java
- + models/dto/java/src/main/java/fr/ird/observe/spi/decoration/ObserveDtoReferenceDecoratorRenderer.java
- + models/persistence/java/src/main/java/fr/ird/observe/spi/decoration/ObserveEntityDecoratorRenderer.java
- services/i18n/src/main/i18n/translations/services_en_GB.properties
- services/i18n/src/main/i18n/translations/services_es_ES.properties
- services/i18n/src/main/i18n/translations/services_fr_FR.properties
Changes:
=====================================
client/core/src/main/java/fr/ird/observe/client/util/table/JXTableUtil.java
=====================================
@@ -31,11 +31,14 @@ import org.jdesktop.swingx.JXTable;
import org.jdesktop.swingx.renderer.DefaultTableRenderer;
import org.jdesktop.swingx.renderer.StringValue;
+import javax.swing.JComponent;
import javax.swing.JScrollPane;
+import javax.swing.JTable;
import javax.swing.table.TableCellEditor;
import javax.swing.table.TableCellRenderer;
import javax.swing.table.TableColumn;
import javax.swing.table.TableColumnModel;
+import java.awt.Component;
import java.awt.Dimension;
import java.util.EnumSet;
import java.util.Enumeration;
@@ -107,7 +110,7 @@ public class JXTableUtil {
reference.registerDecorator(decorator);
return reference.decorate();
};
- return new DefaultTableRenderer(sv);
+ return getDefaultTableRenderer(sv, true);
}
public static TableCellRenderer newEmptyNumberTableCellRenderer() {
@@ -128,7 +131,7 @@ public class JXTableUtil {
}
return result;
};
- return new DefaultTableRenderer(sv);
+ return getDefaultTableRenderer(sv, true);
}
public static TableCellRenderer newBooleanTableCellRenderer2() {
@@ -139,10 +142,10 @@ public class JXTableUtil {
Boolean reference = (Boolean) value;
return reference ? t("boolean.true") : t("boolean.false");
};
- return new DefaultTableRenderer(sv);
+ return getDefaultTableRenderer(sv, true);
}
- public static TableCellRenderer newStringTableCellRenderer(int length, boolean tooltip) {
+ public static TableCellRenderer newStringTableCellRenderer(int length) {
StringValue sv = value -> {
if (value == null) {
return null;
@@ -150,7 +153,7 @@ public class JXTableUtil {
String reference = (String) value;
return reference.length() > length ? reference.substring(0, length - 3) + "..." : reference;
};
- return new DefaultTableRenderer(sv);
+ return getDefaultTableRenderer(sv, false);
}
public static <E extends Enum<E>> TableCellRenderer newEnumTableCellRenderer(Class<E> enumClass) {
@@ -172,7 +175,19 @@ public class JXTableUtil {
}
return null;
};
- return new DefaultTableRenderer(sv);
+ return getDefaultTableRenderer(sv, true);
+ }
+
+ private static DefaultTableRenderer getDefaultTableRenderer(StringValue sv, boolean useStringValue) {
+ return new DefaultTableRenderer(sv) {
+ @Override
+ public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
+ JComponent tableCellRendererComponent = (JComponent) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
+ String toolTipText = useStringValue ? sv.getString(value) : value == null ? null : String.valueOf(value);
+ tableCellRendererComponent.setToolTipText(toolTipText);
+ return tableCellRendererComponent;
+ }
+ };
}
}
=====================================
client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/observation/LonglinePositionAware.jcss
=====================================
@@ -26,15 +26,15 @@
#section {
_listNoLoad:{true};
- /*_decoratorClassifier:{SectionReference.ONLY_HAULING_IDENTIFIER};*/
+ _decoratorClassifier:{SectionReference.ONLY_HAULING_IDENTIFIER};
}
#basket {
_listNoLoad:{true};
- /*_decoratorClassifier:{BasketReference.ONLY_HAULING_IDENTIFIER};*/
+ _decoratorClassifier:{BasketReference.ONLY_HAULING_IDENTIFIER};
}
#branchline {
_listNoLoad:{true};
- /*_decoratorClassifier:{BranchlineReference.ONLY_HAULING_IDENTIFIER};*/
+ _decoratorClassifier:{BranchlineReference.ONLY_HAULING_IDENTIFIER};
}
=====================================
client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/common/TripUIModelStates.java
=====================================
@@ -91,20 +91,13 @@ public class TripUIModelStates extends GeneratedTripUIModelStates {
referenceCache.addReferentialFilter(TripDto.PROPERTY_ADVANCED_SAMPLING_ACQUISITION_STATUS, newAcquisitionStatusList(TripDto::isAdvancedSamplingFilled, AcquisitionStatusReference::isAdvancedSampling));
}
- //FIXME Check this is ok to move it to copyFormToBean
-// @Override
-// public void setForm(Form<TripDto> form) {
-// super.setForm(form);
-// // set end date to current day if necessary
-// if (isUpdatingMode() && getBean().getEndDate() == null) {
-// Date date = Dates.getEndOfDay(new Date());
-// getBean().setEndDate(date);
-// }
-// }
-
@Override
protected void copyFormToBean(Form<TripDto> form) {
super.copyFormToBean(form);
+ if (isCreatingMode()) {
+ // reset logbook default values
+ setDefaultLogbookValues(true);
+ }
// set end date to current day if necessary
if (isUpdatingMode() && getBean().getEndDate() == null) {
Date date = Dates.getEndOfDay(new Date());
=====================================
client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/logbook/ActivityCatchUITableModel.java
=====================================
@@ -37,7 +37,9 @@ class ActivityCatchUITableModel extends GeneratedActivityCatchUITableModel {
@Override
public void initTableUISize(JTable table) {
UIHelper.fixTableColumnWidth(table, 3, 55);
- UIHelper.fixTableColumnWidth(table, 4, 65);
+ UIHelper.fixTableColumnWidth(table, 4, 55);
+ UIHelper.fixTableColumnWidth(table, 5, 55);
+ UIHelper.fixTableColumnWidth(table, 6, 55);
}
@Override
=====================================
client/datasource/editor/spi/src/main/java/fr/ird/observe/client/datasource/editor/spi/content/data/table/GenerateContentTableUITableModel.java
=====================================
@@ -26,7 +26,6 @@ import fr.ird.observe.client.datasource.editor.api.content.EditableContentUI;
import fr.ird.observe.client.datasource.editor.api.content.data.table.ContentTableMeta;
import fr.ird.observe.client.datasource.editor.api.content.data.table.ContentTableUITableModel;
import fr.ird.observe.client.util.table.JXTableUtil;
-import fr.ird.observe.dto.data.ll.observation.LonglineElementAware;
import fr.ird.observe.dto.reference.DataDtoReference;
import fr.ird.observe.dto.reference.ReferentialDtoReference;
import fr.ird.observe.spi.TagValues;
@@ -150,15 +149,12 @@ public class GenerateContentTableUITableModel extends GenerateContentTableUISupp
if (Number.class.isAssignableFrom(propertyType)) {
rendererBuilder.append("\n , JXTableUtil.newEmptyNumberTableCellRenderer()");
} else if (String.class.isAssignableFrom(propertyType)) {
- rendererBuilder.append("\n , JXTableUtil.newStringTableCellRenderer(10, true)");
+ rendererBuilder.append("\n , JXTableUtil.newStringTableCellRenderer(10)");
} else if (ReferentialDtoReference.class.isAssignableFrom(propertyType)) {
- rendererBuilder.append(String.format("\n , JXTableUtil.newDecoratedRenderer(%s.class)", propertyType.getName()));
+ String classifier = String.format("(String) getContext().get%s().getClientProperty(fr.ird.observe.client.util.init.UIInitHelper.DECORATOR_CLASSIFIER)", StringUtils.capitalize(propertyName));
+ rendererBuilder.append(String.format("\n , JXTableUtil.newDecoratedRenderer(%s.class, %s)", propertyType.getName(), classifier));
} else if (DataDtoReference.class.isAssignableFrom(propertyType)) {
- //FIXME Decorator Using hardcoded name was HAULING_IDENTIFIER
- String classifier = "null";
- if (LonglineElementAware.class.isAssignableFrom(propertyType)) {
- classifier = propertyType.getName() + ".ONLY_HAULING_IDENTIFIER";
- }
+ String classifier = String.format("(String) getContext().get%s().getClientProperty(fr.ird.observe.client.util.init.UIInitHelper.DECORATOR_CLASSIFIER)", StringUtils.capitalize(propertyName));
rendererBuilder.append(String.format("\n , JXTableUtil.newDecoratedRenderer(%s.class, %s)", propertyType.getName(), classifier));
} else if (boolean.class.isAssignableFrom(propertyType)) {
rendererBuilder.append("\n ,table.getDefaultRenderer(Boolean.class)");
=====================================
models/definition/src/main/models/Observe/dto/attribute/notNullIf.properties
=====================================
@@ -40,7 +40,7 @@ data.ps.localmarket.Batch.attribute.count=countOrWeightValid
data.ps.localmarket.Batch.attribute.weight=countOrWeightValid
data.ps.logbook.Sample.attribute.bigsWeight=totalWeight != null && totalWeight > 0
data.ps.logbook.Sample.attribute.smallsWeight=totalWeight != null && totalWeight > 0
-data.ps.logbook.Sample.attribute.totalWeight=bigsWeight != null && bigsWeight > 0 && smallsWeight != null && smallsWeight > 0
+data.ps.logbook.Sample.attribute.totalWeight=bigsWeight != null && bigsWeight >= 0 && smallsWeight != null && smallsWeight >= 0
data.ps.observation.Catch.attribute.catchWeight=totalCount != null
data.ps.observation.Catch.attribute.totalCount=catchWeight != null
data.ps.observation.SampleMeasure.attribute.length=acquisitionMode == 1 && weight != null
=====================================
models/definition/src/main/models/Observe/dto/class/containerChildDataDtoProperties.properties
=====================================
@@ -39,7 +39,7 @@ data.ps.common.GearUseFeatures=gear,number,usedInTrip,comment
data.ps.landing.Landing=species,weightCategory,weight,destination,fate,fateVessel
data.ps.localmarket.Batch=species,packaging,count,weight
data.ps.localmarket.SampleSpecies=species,sizeMeasureType,measuredCount,comment
-data.ps.logbook.Catch=species,speciesFate,weightCategory,well,weight,count,comment
+data.ps.logbook.Catch=species,weightCategory,speciesFate,well,weight,count,comment
data.ps.logbook.SampleSpecies=subSampleNumber,species,sizeMeasureType,measuredCount,totalCount,comment
data.ps.logbook.WellPlan=activity,well,species,weightCategory,weight
data.ps.observation.Catch=species,speciesFate,reasonForDiscard,well,catchWeight,totalCount,meanWeight,meanLength,comment
=====================================
models/definition/src/main/models/Observe/dto/class/decorator.properties
=====================================
@@ -24,7 +24,7 @@ data.ll.common.GearUseFeaturesMeasurement=${gearCharacteristic::label}##${measur
data.ll.common.Program=[${gearType/prefix}]##$(observe.Common.program) ${this::label}
data.ll.common.Trip=${startDate::date}##${endDate::date}##${vessel::label}
data.ll.landing.Landing=${startDate::date}##${harbour::label}##${vessel::label}
-data.ll.landing.LandingPart=${species::scientificLabel}##${categoryMin}##${categoryMax}##${weight}
+data.ll.landing.LandingPart=${species::speciesLabel}##${categoryMin}##${categoryMax}##${weight}
data.ll.logbook.Activity=${startTimeStamp::timestamp}##${vesselActivity::label}
data.ll.logbook.ActivitySample=${timeStamp::timestamp}##${coordinateStr}
data.ll.logbook.BaitsComposition=${baitType::label}##${proportion}
@@ -33,7 +33,7 @@ data.ll.logbook.Catch=${homeId}
data.ll.logbook.FloatlinesComposition=${lineType::label}##${proportion}
data.ll.logbook.HooksComposition=${hookType::label}##${proportion}
data.ll.logbook.Sample=${timeStamp::timestamp}##${coordinateStr}
-data.ll.logbook.SamplePart=${species::scientificLabel}##${length}##${weight}
+data.ll.logbook.SamplePart=${species::speciesLabel}##${length}##${weight}
data.ll.logbook.Set=$(observe.data.ll.logbook.Set.type)
data.ll.observation.Activity=${timeStamp::timestamp}##${vesselActivity::label}
data.ll.observation.BaitsComposition=${baitType::label}##${proportion}
@@ -41,7 +41,7 @@ data.ll.observation.Basket=${settingIdentifier} ( $(observe.Common.settingIdenti
data.ll.observation.Branchline=${settingIdentifier} ( $(observe.Common.settingIdentifier) )##${haulingIdentifier} ( $(observe.Common.haulingIdentifier) )
data.ll.observation.BranchlinesComposition=${length}##${proportion}
data.ll.observation.Catch=${homeId}
-data.ll.observation.Encounter=${encounterType::label}##${species::scientificLabel}
+data.ll.observation.Encounter=${encounterType::label}##${species::speciesLabel}
data.ll.observation.FloatlinesComposition=${lineType::label}##${proportion}
data.ll.observation.HooksComposition=${hookType::label}##${proportion}
data.ll.observation.Section=${settingIdentifier} ( $(observe.Common.settingIdentifier) )##${haulingIdentifier} ( $(observe.Common.haulingIdentifier) )
@@ -56,38 +56,38 @@ data.ps.common.GearUseFeatures=${gear::label}##${number}
data.ps.common.GearUseFeaturesMeasurement=${gearCharacteristic::label}##${measurementValue}
data.ps.common.Program=[${gearType/prefix}]##$(observe.Common.program) ${this::label}
data.ps.common.Trip=${startDate::date}##${endDate::date}##${vessel::label}
-data.ps.landing.Landing=${species::scientificLabel}##${weightCategory::label}##${weight}
-data.ps.localmarket.Batch=${species::scientificLabel}##${packaging::label}##${count}
+data.ps.landing.Landing=${species::speciesLabel}##${weightCategory::label}##${weight}
+data.ps.localmarket.Batch=${species::speciesLabel}##${packaging::label}##${count}
data.ps.localmarket.Sample=${date::niceDate}##${number}
-data.ps.localmarket.SampleSpecies=${species::scientificLabel}##${sizeMeasureType::label}
+data.ps.localmarket.SampleSpecies=${species::speciesLabel}##${sizeMeasureType::label}
data.ps.localmarket.SampleSpeciesMeasure=${sizeClass}##${count}
data.ps.localmarket.Survey=${number}##${date::niceDate}
-data.ps.localmarket.SurveyPart=${species::scientificLabel}##${proportion}
+data.ps.localmarket.SurveyPart=${species::speciesLabel}##${proportion}
data.ps.localmarket.WellId=${well}
data.ps.logbook.Activity=${number}##${time::niceTime}##${vesselActivity::label}
data.ps.logbook.ActivityStub=${number}%s##${time::niceTime}
-data.ps.logbook.Catch=${species::scientificLabel}##${speciesFate::label}
+data.ps.logbook.Catch=${species::speciesLabel}##${speciesFate::label}
data.ps.logbook.FloatingObject=DCP ${objectOperation::label}
data.ps.logbook.FloatingObjectPart=${objectMaterial::label}##${whenArriving}##${whenLeaving}
data.ps.logbook.Route=${date::niceDate}
data.ps.logbook.Sample=$(observe.Common.well) ${wellLabel}##${sampleType::label}
data.ps.logbook.SampleActivity=${activityLabel}##${weightedWeight}
-data.ps.logbook.SampleSpecies=$(observe.Common.sample) ${subSampleNumber}##${species::scientificLabel}##${sizeMeasureType::label}
+data.ps.logbook.SampleSpecies=$(observe.Common.sample) ${subSampleNumber}##${species::speciesLabel}##${sizeMeasureType::label}
data.ps.logbook.SampleSpeciesMeasure=${sizeClass}##${count}
data.ps.logbook.TransmittingBuoy=${transmittingBuoyType::label}##${transmittingBuoyOperation::label}##${code}##${comment}
-data.ps.logbook.WellPlan=${species::scientificLabel}##$(observe.Common.well) ${wellLabel}##${weightCategory::label}##${weight}
+data.ps.logbook.WellPlan=${species::speciesLabel}##$(observe.Common.well) ${wellLabel}##${weightCategory::label}##${weight}
data.ps.observation.Activity=${time::niceTime}##${vesselActivity::label}
data.ps.observation.ActivityStub=${time::niceTime}
-data.ps.observation.Catch=${species::scientificLabel}##${speciesFate::label}
+data.ps.observation.Catch=${species::speciesLabel}##${speciesFate::label}
data.ps.observation.FloatingObject=DCP ${objectOperation::label}
data.ps.observation.FloatingObjectPart=${objectMaterial::label}##${whenArriving}##${whenLeaving}
-data.ps.observation.NonTargetCatchRelease=${species::scientificLabel}##${speciesGroupReleaseMode::label}
-data.ps.observation.ObjectObservedSpecies=${species::scientificLabel}##${speciesStatus::label}##${count}
-data.ps.observation.ObjectSchoolEstimate=${species::scientificLabel}##${totalWeight}
+data.ps.observation.NonTargetCatchRelease=${species::speciesLabel}##${speciesGroupReleaseMode::label}
+data.ps.observation.ObjectObservedSpecies=${species::speciesLabel}##${speciesStatus::label}##${count}
+data.ps.observation.ObjectSchoolEstimate=${species::speciesLabel}##${totalWeight}
data.ps.observation.Route=${date::niceDate}
data.ps.observation.Sample=${homeId}
-data.ps.observation.SampleMeasure=${species::scientificLabel}##${length}##${sex::label}
-data.ps.observation.SchoolEstimate=${species::scientificLabel}##${totalWeight}##${meanWeight}
+data.ps.observation.SampleMeasure=${species::speciesLabel}##${length}##${sex::label}
+data.ps.observation.SchoolEstimate=${species::speciesLabel}##${totalWeight}##${meanWeight}
data.ps.observation.Set=$(observe.data.ps.observation.Set.type)
data.ps.observation.TransmittingBuoy=${transmittingBuoyType::label}##${transmittingBuoyOperation::label}##${code}##${comment}
referential.common.FpaZone=${code}##${this::label}##${validityRangeLabel}
@@ -102,7 +102,7 @@ referential.common.Vessel=${code}##${this::label}##${validityRangeLabel}
referential.common.VesselSizeCategory=${code}##${gaugeLabel}##${capacityLabel}
referential.common.Wind=${code}##${this::label}##${speedRange}##${swellHeight}
referential.ll.observation.SensorBrand=${code}##${brandName}
-referential.ps.common.AcquisitionStatus=${code}##${this::label}
+referential.ps.common.AcquisitionStatus=${code}##${this::label}##${_fieldEnabler::fieldEnabler}
referential.ps.common.ObjectMaterial=${code::noCode}##${this::label}
-referential.ps.common.WeightCategory=${code}##${species::scientificLabel}##${this::label}
+referential.ps.common.WeightCategory=${code}##${species::speciesLabel}##${this::label}
referential.ps.localmarket.Packaging=${code}##${this::label}##${harbour::label}##${batchComposition::label}##${batchWeightType::label}##${validityRangeLabel}
=====================================
models/definition/src/main/models/Observe/dto/class/i18nLabels.properties
=====================================
@@ -115,7 +115,7 @@ referential.common.WeightMeasureType=action.reset.to.default.tip
referential.common.Wind=maxSpeed,maxSwellHeight,minSpeed,minSwellHeight,speedMinMax,swellHeightMinMax
referential.ll.observation.MaturityStatus=lowerValue,upperValue,lowerValueUpperValue
referential.ll.observation.SensorBrand=brandName
-referential.ps.common.AcquisitionStatus=advancedSampling,fieldEnabler,landing,localMarket,localMarketSurveySampling,localMarketWellsSampling,logbook,observation,targetWellsSampling
+referential.ps.common.AcquisitionStatus=advancedSampling,fieldEnabler,fieldEnabled,fieldDisabled,landing,localMarket,localMarketSurveySampling,localMarketWellsSampling,logbook,observation,targetWellsSampling
referential.ps.common.ObjectMaterial=biodegradable,childSelectionMandatory,childrenMultiSelectable,legacyCode,nonEntangling,objectMaterialType,parent,standardCode,validation,legacyCodeStandardCode,parentCode,validationInformation
referential.ps.common.ObjectOperation=whenArriving,whenLeaving
referential.ps.common.ObservedSystem=allowLogbook,allowObservation,schoolType
=====================================
models/definition/src/main/models/Observe/dto/class/references.properties
=====================================
@@ -24,7 +24,7 @@ data.ll.common.GearUseFeaturesMeasurement=measurementValue,gearCharacteristicLab
data.ll.common.Program=code,label,uri,gearType,childrenSize,startDate,endDate,status,needComment,homeId
data.ll.common.Trip=startDate,endDate,program,tripTypeId,activityObsSize,activityLogbookSize,landingSize,sampleSize,vessel,observationsAvailability,logbookAvailability,gearUseFeaturesSize
data.ll.landing.Landing=startDate,harbourLabel,vesselLabel
-data.ll.landing.LandingPart=speciesLabel,categoryMin,categoryMax,weight
+data.ll.landing.LandingPart=species,categoryMin,categoryMax,weight
data.ll.logbook.Activity=startTimeStamp,endTimeStamp,latitude,longitude,vesselActivity,set,activitySample,relatedObservedActivity
data.ll.logbook.ActivitySample=timeStamp,latitude,longitude
data.ll.logbook.BaitsComposition=proportion,baitTypeLabel,baitSettingStatusLabel,individualSize,individualWeight
@@ -33,7 +33,7 @@ data.ll.logbook.Catch=homeId
data.ll.logbook.FloatlinesComposition=proportion,lineTypeLabel,length
data.ll.logbook.HooksComposition=proportion,hookTypeLabel,hookSizeLabel,hookOffset
data.ll.logbook.Sample=timeStamp,latitude,longitude
-data.ll.logbook.SamplePart=speciesLabel,length,weight
+data.ll.logbook.SamplePart=species,length,weight
data.ll.logbook.Set=homeId,catchesSize
data.ll.observation.Activity=timeStamp,latitude,longitude,vesselActivity,set,encounterSize,sensorUsedSize
data.ll.observation.BaitsComposition=proportion,baitTypeLabel,baitSettingStatusLabel,individualSize,individualWeight
@@ -41,7 +41,7 @@ data.ll.observation.Basket=settingIdentifier,haulingIdentifier,parentId,notUsed
data.ll.observation.Branchline=settingIdentifier,haulingIdentifier,parentId,notUsed
data.ll.observation.BranchlinesComposition=proportion,topTypeLabel,tracelineTypeLabel,length
data.ll.observation.Catch=homeId
-data.ll.observation.Encounter=encounterTypeLabel,speciesLabel
+data.ll.observation.Encounter=encounterTypeLabel,species
data.ll.observation.FloatlinesComposition=proportion,lineTypeLabel,length
data.ll.observation.HooksComposition=proportion,hookTypeLabel,hookSizeLabel,hookOffset
data.ll.observation.Section=settingIdentifier,haulingIdentifier,parentId,notUsed
@@ -54,35 +54,35 @@ data.ps.common.GearUseFeatures=gearLabel,number,usedInTrip
data.ps.common.GearUseFeaturesMeasurement=measurementValue,gearCharacteristicLabel
data.ps.common.Program=code,label,uri,gearType,childrenSize,startDate,endDate,status,needComment,homeId
data.ps.common.Trip=startDate,endDate,program,gearUseFeaturesSize,routeObsSize,routeLogbookSize,landingSize,wellPlanSize,sampleSize,localmarketBatchSize,localmarketSurveySize,localmarketSampleSize,vessel,observationsAcquisitionStatus,logbookAcquisitionStatus,targetWellsSamplingAcquisitionStatus,landingAcquisitionStatus,localMarketAcquisitionStatus,localMarketWellsSamplingAcquisitionStatus,localMarketSurveySamplingAcquisitionStatus,advancedSamplingAcquisitionStatus,observationsFilled,logbookFilled,targetWellsSamplingFilled,landingFilled,localMarketFilled,localMarketWellsSamplingFilled,localMarketSurveySamplingFilled,advancedSamplingFilled
-data.ps.landing.Landing=date,speciesLabel,weightCategory,fateLabel,fateVesselLabel,weight
+data.ps.landing.Landing=date,species,weightCategory,fateLabel,fateVesselLabel,weight
data.ps.localmarket.Batch=species,packaging,count,weight
data.ps.localmarket.Sample=number,date,sampleSpeciesSize
-data.ps.localmarket.SampleSpecies=speciesLabel,sizeMeasureTypeLabel,measuredCount
+data.ps.localmarket.SampleSpecies=species,sizeMeasureTypeLabel,measuredCount
data.ps.localmarket.SampleSpeciesMeasure=sizeClass,count
data.ps.localmarket.Survey=number,date
data.ps.localmarket.SurveyPart=species,proportion
data.ps.logbook.Activity=number,date,time,latitude,longitude,vesselActivity,relatedObservedActivity,catchesSize
-data.ps.logbook.Catch=speciesLabel,speciesFateLabel,well
+data.ps.logbook.Catch=species,speciesFateLabel,well
data.ps.logbook.FloatingObject=objectOperationLabel
data.ps.logbook.FloatingObjectPart=objectMaterialId,objectMaterialLabel,whenArriving,whenLeaving
data.ps.logbook.Route=date,comment,activitySize
data.ps.logbook.Sample=well,number,superSample,sampleTypeLabel,sampleSpeciesSize,totalWeight,bigsWeight,smallsWeight
data.ps.logbook.SampleActivity=activity,weightedWeight
-data.ps.logbook.SampleSpecies=subSampleNumber,speciesLabel,sizeMeasureTypeLabel,measuredCount,totalCount
+data.ps.logbook.SampleSpecies=subSampleNumber,species,sizeMeasureTypeLabel,measuredCount,totalCount
data.ps.logbook.SampleSpeciesMeasure=sizeClass,count
data.ps.logbook.TransmittingBuoy=code,comment,transmittingBuoyTypeLabel,transmittingBuoyOperationLabel
data.ps.logbook.WellPlan=species,well,weight,weightCategoryLabel
data.ps.observation.Activity=date,time,latitude,longitude,vesselActivity,set
-data.ps.observation.Catch=speciesLabel,speciesFateLabel,catchWeight,meanWeight,meanLength,well
+data.ps.observation.Catch=species,speciesFateLabel,catchWeight,meanWeight,meanLength,well
data.ps.observation.FloatingObject=objectOperationLabel,objectSchoolEstimateSize,objectObservedSpeciesSize
data.ps.observation.FloatingObjectPart=objectMaterialId,objectMaterialLabel,whenArriving,whenLeaving
-data.ps.observation.NonTargetCatchRelease=speciesLabel,speciesGroupReleaseModeLabel,statusLabel,conformityLabel,releasingTimeLabel,length
-data.ps.observation.ObjectObservedSpecies=speciesLabel,speciesStatusLabel,count
-data.ps.observation.ObjectSchoolEstimate=speciesLabel,totalWeight
+data.ps.observation.NonTargetCatchRelease=species,speciesGroupReleaseModeLabel,statusLabel,conformityLabel,releasingTimeLabel,length
+data.ps.observation.ObjectObservedSpecies=species,speciesStatusLabel,count
+data.ps.observation.ObjectSchoolEstimate=species,totalWeight
data.ps.observation.Route=date,startLogValue,endLogValue,comment,activitySize
data.ps.observation.Sample=homeId
-data.ps.observation.SampleMeasure=speciesLabel,length,weight,count,sexLabel
-data.ps.observation.SchoolEstimate=speciesLabel,meanWeight,totalWeight
+data.ps.observation.SampleMeasure=species,length,weight,count,sexLabel
+data.ps.observation.SchoolEstimate=species,meanWeight,totalWeight
data.ps.observation.Set=comment,sampleMeasureEnabled,nonTargetCatchReleaseEnabled,catchesSize,nonTargetCatchReleaseSize,schoolEstimateSize,sampleMeasureSize
data.ps.observation.TransmittingBuoy=code,comment,transmittingBuoyTypeLabel,transmittingBuoyOperationLabel
referential.common.Country=code,label,uri,iso2Code,iso3Code
=====================================
models/dto/i18n/src/main/i18n/getters/labels.getter
=====================================
@@ -1266,6 +1266,8 @@ observe.referential.ll.observation.SensorDataFormat.type
observe.referential.ll.observation.SensorType.type
observe.referential.ll.observation.StomachFullness.type
observe.referential.ps.common.AcquisitionStatus.advancedSampling
+observe.referential.ps.common.AcquisitionStatus.fieldDisabled
+observe.referential.ps.common.AcquisitionStatus.fieldEnabled
observe.referential.ps.common.AcquisitionStatus.fieldEnabler
observe.referential.ps.common.AcquisitionStatus.landing
observe.referential.ps.common.AcquisitionStatus.localMarket
=====================================
models/dto/java/src/main/i18n/getters/java.getter
=====================================
@@ -22,3 +22,5 @@ observe.data.pairing.ActivityPairingResultItem.type
observe.data.ps.observation.Set.type
observe.referential.common.Vessel.flagCountry
observe.referential.common.Vessel.fleetCountry
+observe.referential.ps.common.AcquisitionStatus.fieldDisabled
+observe.referential.ps.common.AcquisitionStatus.fieldEnabled
=====================================
models/dto/java/src/main/java/fr/ird/observe/spi/decoration/ObserveDefaultDecoratorRenderer.java
=====================================
@@ -0,0 +1,47 @@
+package fr.ird.observe.spi.decoration;
+
+/*-
+ * #%L
+ * ObServe Models :: Dto :: Java
+ * %%
+ * Copyright (C) 2008 - 2021 IRD, Code Lutin, 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%
+ */
+
+import io.ultreia.java4all.i18n.I18n;
+
+import java.util.Locale;
+
+/**
+ * Created on 19/10/2021.
+ *
+ * @author Tony Chemit - dev(a)tchemit.fr
+ * @since 9.0.0
+ */
+public interface ObserveDefaultDecoratorRenderer {
+
+ default String speciesLabel(String faoCode, String scientificLabel, String label) {
+ if ("xx".equals(scientificLabel)) {
+ return String.format("%s - %s", faoCode, label);
+ }
+ return String.format("%s - %s - %s", faoCode, scientificLabel, label);
+ }
+
+ default String fieldEnabler(Locale locale, boolean fieldEnabler) {
+ return fieldEnabler ? I18n.l(locale, "observe.referential.ps.common.AcquisitionStatus.fieldEnabled") : I18n.l(locale, "observe.referential.ps.common.AcquisitionStatus.fieldDisabled");
+ }
+}
=====================================
models/dto/java/src/main/java/fr/ird/observe/spi/decoration/ObserveDtoDecoratorRenderer.java
=====================================
@@ -0,0 +1,57 @@
+package fr.ird.observe.spi.decoration;
+
+/*-
+ * #%L
+ * ObServe Models :: Dto :: Java
+ * %%
+ * Copyright (C) 2008 - 2021 IRD, Code Lutin, 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%
+ */
+
+import fr.ird.observe.dto.BusinessDto;
+import fr.ird.observe.dto.referential.common.SpeciesReference;
+import fr.ird.observe.dto.referential.ps.common.AcquisitionStatusReference;
+
+import java.util.Locale;
+
+/**
+ * Created on 19/10/2021.
+ *
+ * @author Tony Chemit - dev(a)tchemit.fr
+ * @since 9.0.0
+ */
+public class ObserveDtoDecoratorRenderer<O extends BusinessDto> extends DtoDecoratorRenderer<O> implements ObserveDefaultDecoratorRenderer {
+
+ public ObserveDtoDecoratorRenderer(Class<O> type) {
+ super(type);
+ }
+
+ public String speciesLabel(Locale locale, SpeciesReference species) {
+ if (species == null) {
+ return onNullValue(locale, null);
+ }
+ String faoCode = species.getFaoCode();
+ String scientificLabel = species.getScientificLabel();
+ String label = label(locale, species);
+ return speciesLabel(faoCode, scientificLabel, label);
+ }
+
+ public String fieldEnabler(Locale locale, AcquisitionStatusReference reference) {
+ return fieldEnabler(locale, reference.isFieldEnabler());
+ }
+
+}
=====================================
models/dto/java/src/main/java/fr/ird/observe/spi/decoration/ObserveDtoReferenceDecoratorRenderer.java
=====================================
@@ -0,0 +1,56 @@
+package fr.ird.observe.spi.decoration;
+
+/*-
+ * #%L
+ * ObServe Models :: Dto :: Java
+ * %%
+ * Copyright (C) 2008 - 2021 IRD, Code Lutin, 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%
+ */
+
+import fr.ird.observe.dto.reference.DtoReference;
+import fr.ird.observe.dto.referential.common.SpeciesReference;
+import fr.ird.observe.dto.referential.ps.common.AcquisitionStatusReference;
+
+import java.util.Locale;
+
+/**
+ * Created on 19/10/2021.
+ *
+ * @author Tony Chemit - dev(a)tchemit.fr
+ * @since 9.0.0
+ */
+public class ObserveDtoReferenceDecoratorRenderer<O extends DtoReference> extends DtoReferenceDecoratorRenderer<O> implements ObserveDefaultDecoratorRenderer{
+
+ public ObserveDtoReferenceDecoratorRenderer(Class<O> type) {
+ super(type);
+ }
+
+ public String speciesLabel(Locale locale, SpeciesReference species) {
+ if (species == null) {
+ return onNullValue(locale, null);
+ }
+ String faoCode = species.getFaoCode();
+ String scientificLabel = species.getScientificLabel();
+ String label = label(locale, species);
+ return speciesLabel(faoCode, scientificLabel, label);
+ }
+
+ public String fieldEnabler(Locale locale, AcquisitionStatusReference reference) {
+ return fieldEnabler(locale, reference.isFieldEnabler());
+ }
+}
=====================================
models/persistence/java/src/main/java/fr/ird/observe/spi/decoration/ObserveEntityDecoratorRenderer.java
=====================================
@@ -0,0 +1,56 @@
+package fr.ird.observe.spi.decoration;
+
+/*-
+ * #%L
+ * ObServe Models :: Persistence :: Java
+ * %%
+ * Copyright (C) 2008 - 2021 IRD, Code Lutin, 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%
+ */
+
+import fr.ird.observe.entities.Entity;
+import fr.ird.observe.entities.referential.common.Species;
+import fr.ird.observe.entities.referential.ps.common.AcquisitionStatus;
+
+import java.util.Locale;
+
+/**
+ * Created on 19/10/2021.
+ *
+ * @author Tony Chemit - dev(a)tchemit.fr
+ * @since 9.0.0
+ */
+public class ObserveEntityDecoratorRenderer<O extends Entity> extends EntityDecoratorRenderer<O> implements ObserveDefaultDecoratorRenderer {
+
+ public ObserveEntityDecoratorRenderer(Class<O> type) {
+ super(type);
+ }
+
+ public String speciesLabel(Locale locale, Species species) {
+ if (species == null) {
+ return onNullValue(locale, null);
+ }
+ String faoCode = species.getFaoCode();
+ String scientificLabel = species.getScientificLabel();
+ String label = label(locale, species);
+ return speciesLabel(faoCode, scientificLabel, label);
+ }
+
+ public String fieldEnabler(Locale locale, AcquisitionStatus reference) {
+ return fieldEnabler(locale, reference.isFieldEnabler());
+ }
+}
=====================================
services/i18n/src/main/i18n/translations/services_en_GB.properties
=====================================
@@ -1503,6 +1503,8 @@ observe.referential.ll.observation.SensorDataFormat.type=Sensor data format
observe.referential.ll.observation.SensorType.type=Sensor type
observe.referential.ll.observation.StomachFullness.type=Stomac fullness
observe.referential.ps.common.AcquisitionStatus.advancedSampling=Advanced Sampling
+observe.referential.ps.common.AcquisitionStatus.fieldDisabled=Data acquisition not allowed
+observe.referential.ps.common.AcquisitionStatus.fieldEnabled=Data acquisition allowed
observe.referential.ps.common.AcquisitionStatus.fieldEnabler=Can acquire data?
observe.referential.ps.common.AcquisitionStatus.landing=Landing
observe.referential.ps.common.AcquisitionStatus.localMarket=Local market
=====================================
services/i18n/src/main/i18n/translations/services_es_ES.properties
=====================================
@@ -1503,6 +1503,8 @@ observe.referential.ll.observation.SensorDataFormat.type=Formato de los datos de
observe.referential.ll.observation.SensorType.type=Tipo de sensor
observe.referential.ll.observation.StomachFullness.type=Nivel de llenado del estomago
observe.referential.ps.common.AcquisitionStatus.advancedSampling=Advanced Sampling \#TODO
+observe.referential.ps.common.AcquisitionStatus.fieldDisabled=Data acquisition not allowed
+observe.referential.ps.common.AcquisitionStatus.fieldEnabled=Data acquisition allowed
observe.referential.ps.common.AcquisitionStatus.fieldEnabler=Can acquire data? \#TODO
observe.referential.ps.common.AcquisitionStatus.landing=Landing
observe.referential.ps.common.AcquisitionStatus.localMarket=Local market
=====================================
services/i18n/src/main/i18n/translations/services_fr_FR.properties
=====================================
@@ -1503,6 +1503,8 @@ observe.referential.ll.observation.SensorDataFormat.type=Format de données de c
observe.referential.ll.observation.SensorType.type=Type de capteur
observe.referential.ll.observation.StomachFullness.type=Niveau de remplissage de l'estomac
observe.referential.ps.common.AcquisitionStatus.advancedSampling=Échantillonnage avancé
+observe.referential.ps.common.AcquisitionStatus.fieldDisabled=Saisie de données non autorisée
+observe.referential.ps.common.AcquisitionStatus.fieldEnabled=Saisie de données autorisée
observe.referential.ps.common.AcquisitionStatus.fieldEnabler=Saisie de données autorisée ?
observe.referential.ps.common.AcquisitionStatus.landing=Débarquement
observe.referential.ps.common.AcquisitionStatus.localMarket=Marché local
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/3735d66f66237f68a2407a97…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/3735d66f66237f68a2407a97…
You're receiving this email because of your account on gitlab.com.
1
0