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

Commits:

29 changed files:

Changes:

  • client-core/src/main/java/fr/ird/observe/client/main/ObserveMainUI.jcss
    ... ... @@ -22,7 +22,6 @@
    22 22
     
    
    23 23
     #mainFrame {
    
    24 24
       defaultCloseOperation: "do_nothing_on_close";
    
    25
    -  iconImage: {SwingUtil.createImageIcon("logo.png").getImage()};
    
    26 25
     }
    
    27 26
     
    
    28 27
     #menu {
    

  • client-core/src/main/java/fr/ird/observe/client/main/ObserveMainUIHandler.java
    ... ... @@ -74,6 +74,7 @@ public class ObserveMainUIHandler implements UIHandler<ObserveMainUI>, WithClien
    74 74
     
    
    75 75
         @Override
    
    76 76
         public void afterInit(ObserveMainUI ui) {
    
    77
    +        UIHelper.addApplicationIcon(ui);
    
    77 78
             getClientUIContext().setMainUI(ui);
    
    78 79
             ui.getMainUIBodyContentManager().install();
    
    79 80
             KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(keyEventDispatcher = new MainUIKeyEventDispatcher(ui.getModel()));
    

  • client-core/src/main/java/fr/ird/observe/client/util/UIHelper.java
    ... ... @@ -61,7 +61,9 @@ import javax.swing.table.TableCellEditor;
    61 61
     import javax.swing.table.TableCellRenderer;
    
    62 62
     import java.awt.Color;
    
    63 63
     import java.awt.Component;
    
    64
    +import java.awt.Container;
    
    64 65
     import java.awt.Toolkit;
    
    66
    +import java.awt.Window;
    
    65 67
     import java.awt.datatransfer.Clipboard;
    
    66 68
     import java.awt.datatransfer.StringSelection;
    
    67 69
     import java.awt.event.KeyEvent;
    
    ... ... @@ -86,6 +88,10 @@ public class UIHelper extends SwingUtil {
    86 88
         public static final PropertyChangeListener LOG_PROPERTY_CHANGE_LISTENER = new LogPropertyChanged();
    
    87 89
         public static final String NO_PACK = "NoPack";
    
    88 90
     
    
    91
    +    public static void addApplicationIcon(Window window) {
    
    92
    +        window.setIconImage(createImageIcon("logo.png").getImage());
    
    93
    +    }
    
    94
    +
    
    89 95
         public static void handlingError(String message, Exception e) {
    
    90 96
     
    
    91 97
             if (log.isErrorEnabled()) {
    

  • client-datasource-editor-api/src/main/java/fr/ird/observe/client/datasource/editor/content/ContentUIHandler.java
    ... ... @@ -218,6 +218,7 @@ public abstract class ContentUIHandler<U extends ContentUI> implements ObserveSe
    218 218
                             break;
    
    219 219
                         case 1:
    
    220 220
                             // wil reset ui
    
    221
    +                        //FIXME If checking from closing, we should do nothing ?
    
    221 222
                             ui.resetEdit();
    
    222 223
                             break;
    
    223 224
                     }
    
    ... ... @@ -241,6 +242,7 @@ public abstract class ContentUIHandler<U extends ContentUI> implements ObserveSe
    241 242
                             break;
    
    242 243
                         case 0:
    
    243 244
                             // wil reset ui
    
    245
    +                        //FIXME If checking from closing, we should do nothing ?
    
    244 246
                             ui.resetEdit();
    
    245 247
                             break;
    
    246 248
                     }
    

  • client-datasource-editor-api/src/main/java/fr/ird/observe/client/datasource/editor/wizard/RemoteUILauncher.java
    ... ... @@ -23,6 +23,7 @@ package fr.ird.observe.client.datasource.editor.wizard;
    23 23
     
    
    24 24
     import fr.ird.observe.client.constants.DbMode;
    
    25 25
     import fr.ird.observe.client.datasource.editor.wizard.tabs.SecurityModel;
    
    26
    +import fr.ird.observe.client.util.UIHelper;
    
    26 27
     import org.apache.logging.log4j.LogManager;
    
    27 28
     import org.apache.logging.log4j.Logger;
    
    28 29
     import org.nuiton.jaxx.runtime.JAXXContext;
    
    ... ... @@ -87,6 +88,7 @@ public abstract class RemoteUILauncher extends StorageUILauncher {
    87 88
     
    
    88 89
             model.setSteps(steps.toArray(new StorageStep[0]));
    
    89 90
             ui.setSize(800, 600);
    
    91
    +        UIHelper.addApplicationIcon(ui);
    
    90 92
         }
    
    91 93
     
    
    92 94
         @Override
    

  • client-datasource-editor-ps/src/main/i18n/getters/java.getter
    ... ... @@ -67,10 +67,10 @@ observe.data.ps.observation.NonTargetCatch.table.meanWeight
    67 67
     observe.data.ps.observation.NonTargetCatch.table.meanWeight.tip
    
    68 68
     observe.data.ps.observation.NonTargetCatch.table.reasonForDiscard
    
    69 69
     observe.data.ps.observation.NonTargetCatch.table.reasonForDiscard.tip
    
    70
    +observe.data.ps.observation.NonTargetCatch.table.species
    
    71
    +observe.data.ps.observation.NonTargetCatch.table.species.tip
    
    70 72
     observe.data.ps.observation.NonTargetCatch.table.speciesFate
    
    71 73
     observe.data.ps.observation.NonTargetCatch.table.speciesFate.tip
    
    72
    -observe.data.ps.observation.NonTargetCatch.table.speciesFaune
    
    73
    -observe.data.ps.observation.NonTargetCatch.table.speciesFaune.tip
    
    74 74
     observe.data.ps.observation.NonTargetCatch.table.totalCount
    
    75 75
     observe.data.ps.observation.NonTargetCatch.table.totalCount.tip
    
    76 76
     observe.data.ps.observation.NonTargetCatch.table.well
    
    ... ... @@ -100,16 +100,16 @@ observe.data.ps.observation.NonTargetLength.table.length
    100 100
     observe.data.ps.observation.NonTargetLength.table.length.tip
    
    101 101
     observe.data.ps.observation.NonTargetLength.table.meanWeight
    
    102 102
     observe.data.ps.observation.NonTargetLength.table.meanWeight.tip
    
    103
    -observe.data.ps.observation.NonTargetLength.table.nonTargetSpecies
    
    104
    -observe.data.ps.observation.NonTargetLength.table.nonTargetSpecies.tip
    
    105 103
     observe.data.ps.observation.NonTargetLength.table.picturesReferences
    
    106 104
     observe.data.ps.observation.NonTargetLength.table.picturesReferences.tip
    
    107 105
     observe.data.ps.observation.NonTargetLength.table.sizeMeasureType
    
    108 106
     observe.data.ps.observation.NonTargetLength.table.sizeMeasureType.tip
    
    107
    +observe.data.ps.observation.NonTargetLength.table.species
    
    108
    +observe.data.ps.observation.NonTargetLength.table.species.tip
    
    109 109
     observe.data.ps.observation.ObjectObservedSpecies.table.count
    
    110 110
     observe.data.ps.observation.ObjectObservedSpecies.table.count.tip
    
    111
    -observe.data.ps.observation.ObjectObservedSpecies.table.speciesFaune
    
    112
    -observe.data.ps.observation.ObjectObservedSpecies.table.speciesFaune.tip
    
    111
    +observe.data.ps.observation.ObjectObservedSpecies.table.species
    
    112
    +observe.data.ps.observation.ObjectObservedSpecies.table.species.tip
    
    113 113
     observe.data.ps.observation.ObjectObservedSpecies.table.speciesStatus
    
    114 114
     observe.data.ps.observation.ObjectObservedSpecies.table.speciesStatus.tip
    
    115 115
     observe.data.ps.observation.Route.action.moves
    
    ... ... @@ -124,8 +124,8 @@ observe.data.ps.observation.Sample.weight.computed.tip
    124 124
     observe.data.ps.observation.Sample.weight.observed.tip
    
    125 125
     observe.data.ps.observation.SchoolEstimate.table.meanWeight
    
    126 126
     observe.data.ps.observation.SchoolEstimate.table.meanWeight.tip
    
    127
    -observe.data.ps.observation.SchoolEstimate.table.speciesThon
    
    128
    -observe.data.ps.observation.SchoolEstimate.table.speciesThon.tip
    
    127
    +observe.data.ps.observation.SchoolEstimate.table.species
    
    128
    +observe.data.ps.observation.SchoolEstimate.table.species.tip
    
    129 129
     observe.data.ps.observation.SchoolEstimate.table.weight
    
    130 130
     observe.data.ps.observation.SchoolEstimate.table.weight.tip
    
    131 131
     observe.data.ps.observation.Set.message.no.nonTargetCatchRelease
    
    ... ... @@ -136,8 +136,8 @@ observe.data.ps.observation.Set.schoolType.not.fill
    136 136
     observe.data.ps.observation.TargetCatch.message.table.will.delete.targetLength
    
    137 137
     observe.data.ps.observation.TargetCatch.table.comment
    
    138 138
     observe.data.ps.observation.TargetCatch.table.comment.tip
    
    139
    -observe.data.ps.observation.TargetCatch.table.speciesThon
    
    140
    -observe.data.ps.observation.TargetCatch.table.speciesThon.tip
    
    139
    +observe.data.ps.observation.TargetCatch.table.species
    
    140
    +observe.data.ps.observation.TargetCatch.table.species.tip
    
    141 141
     observe.data.ps.observation.TargetCatch.table.weight
    
    142 142
     observe.data.ps.observation.TargetCatch.table.weight.tip
    
    143 143
     observe.data.ps.observation.TargetCatch.table.weightCategory
    
    ... ... @@ -151,8 +151,8 @@ observe.data.ps.observation.TargetDiscard.table.comment
    151 151
     observe.data.ps.observation.TargetDiscard.table.comment.tip
    
    152 152
     observe.data.ps.observation.TargetDiscard.table.reasonForDiscard
    
    153 153
     observe.data.ps.observation.TargetDiscard.table.reasonForDiscard.tip
    
    154
    +observe.data.ps.observation.TargetDiscard.table.species
    
    154 155
     observe.data.ps.observation.TargetDiscard.table.species.tip
    
    155
    -observe.data.ps.observation.TargetDiscard.table.speciesThon
    
    156 156
     observe.data.ps.observation.TargetDiscard.table.weight
    
    157 157
     observe.data.ps.observation.TargetDiscard.table.weight.tip
    
    158 158
     observe.data.ps.observation.TargetDiscard.table.weightCategory
    
    ... ... @@ -167,8 +167,8 @@ observe.data.ps.observation.TargetLength.table.sex
    167 167
     observe.data.ps.observation.TargetLength.table.sex.tip
    
    168 168
     observe.data.ps.observation.TargetLength.table.sizeMeasureType
    
    169 169
     observe.data.ps.observation.TargetLength.table.sizeMeasureType.tip
    
    170
    -observe.data.ps.observation.TargetLength.table.speciesThon
    
    171
    -observe.data.ps.observation.TargetLength.table.speciesThon.tip
    
    170
    +observe.data.ps.observation.TargetLength.table.species
    
    171
    +observe.data.ps.observation.TargetLength.table.species.tip
    
    172 172
     observe.data.ps.observation.TargetLength.table.totalWeight
    
    173 173
     observe.data.ps.observation.TargetLength.table.totalWeight.tip
    
    174 174
     observe.menu.navigation.action.move.activity
    

  • client-datasource-editor-ps/src/main/i18n/getters/jaxx.getter
    ... ... @@ -158,7 +158,7 @@ observe.data.ps.observation.Sample.weight
    158 158
     observe.data.ps.observation.SchoolEstimate.action.create
    
    159 159
     observe.data.ps.observation.SchoolEstimate.action.create.tip
    
    160 160
     observe.data.ps.observation.SchoolEstimate.meanWeight
    
    161
    -observe.data.ps.observation.SchoolEstimate.table.speciesThon.tip
    
    161
    +observe.data.ps.observation.SchoolEstimate.table.species.tip
    
    162 162
     observe.data.ps.observation.SchoolEstimate.title
    
    163 163
     observe.data.ps.observation.SchoolEstimate.totalWeight
    
    164 164
     observe.data.ps.observation.Set.currentDirection
    
    ... ... @@ -186,7 +186,7 @@ observe.data.ps.observation.TargetCatch.broughtOnDeckInformation
    186 186
     observe.data.ps.observation.TargetCatch.catchWeight
    
    187 187
     observe.data.ps.observation.TargetCatch.reasonForDiscard
    
    188 188
     observe.data.ps.observation.TargetCatch.table.deleteExtraMessage
    
    189
    -observe.data.ps.observation.TargetCatch.table.speciesThon.tip
    
    189
    +observe.data.ps.observation.TargetCatch.table.species.tip
    
    190 190
     observe.data.ps.observation.TargetCatch.table.weightCategory.tip
    
    191 191
     observe.data.ps.observation.TargetCatch.table.well.tip
    
    192 192
     observe.data.ps.observation.TargetCatch.targetCatchCompositionEstimatedByObserver
    

  • client-datasource-editor-ps/src/main/java/fr/ird/observe/client/datasource/editor/content/data/ps/observation/NonTargetCatchUIHandler.java
    ... ... @@ -141,8 +141,8 @@ public class NonTargetCatchUIHandler extends ContentTableUIHandler<SetNonTargetC
    141 141
             UIHelper.fixTableColumnWidth(table, 7, 50);
    
    142 142
             UIHelper.setI18nTableHeaderRenderer(
    
    143 143
                     table,
    
    144
    -                n("observe.data.ps.observation.NonTargetCatch.table.speciesFaune"),
    
    145
    -                n("observe.data.ps.observation.NonTargetCatch.table.speciesFaune.tip"),
    
    144
    +                n("observe.data.ps.observation.NonTargetCatch.table.species"),
    
    145
    +                n("observe.data.ps.observation.NonTargetCatch.table.species.tip"),
    
    146 146
                     n("observe.data.ps.observation.NonTargetCatch.table.speciesFate"),
    
    147 147
                     n("observe.data.ps.observation.NonTargetCatch.table.speciesFate.tip"),
    
    148 148
                     n("observe.data.ps.observation.NonTargetCatch.table.reasonForDiscard"),
    

  • client-datasource-editor-ps/src/main/java/fr/ird/observe/client/datasource/editor/content/data/ps/observation/NonTargetSampleUIHandler.java
    ... ... @@ -160,8 +160,8 @@ public class NonTargetSampleUIHandler extends AbstractSampleUIHandler<NonTargetS
    160 160
     
    
    161 161
             UIHelper.setI18nTableHeaderRenderer(
    
    162 162
                     table,
    
    163
    -                n("observe.data.ps.observation.NonTargetLength.table.nonTargetSpecies"),
    
    164
    -                n("observe.data.ps.observation.NonTargetLength.table.nonTargetSpecies.tip"),
    
    163
    +                n("observe.data.ps.observation.NonTargetLength.table.species"),
    
    164
    +                n("observe.data.ps.observation.NonTargetLength.table.species.tip"),
    
    165 165
                     n("observe.data.ps.observation.NonTargetLength.table.sizeMeasureType"),
    
    166 166
                     n("observe.data.ps.observation.NonTargetLength.table.sizeMeasureType.tip"),
    
    167 167
                     n("observe.data.ps.observation.NonTargetLength.table.length"),
    

  • client-datasource-editor-ps/src/main/java/fr/ird/observe/client/datasource/editor/content/data/ps/observation/ObjectObservedSpeciesUIHandler.java
    ... ... @@ -69,8 +69,8 @@ public class ObjectObservedSpeciesUIHandler extends ContentTableUIHandler<Floati
    69 69
             JTable table = getUi().getTable();
    
    70 70
     
    
    71 71
             UIHelper.setI18nTableHeaderRenderer(table,
    
    72
    -                                            n("observe.data.ps.observation.ObjectObservedSpecies.table.speciesFaune"),
    
    73
    -                                            n("observe.data.ps.observation.ObjectObservedSpecies.table.speciesFaune.tip"),
    
    72
    +                                            n("observe.data.ps.observation.ObjectObservedSpecies.table.species"),
    
    73
    +                                            n("observe.data.ps.observation.ObjectObservedSpecies.table.species.tip"),
    
    74 74
                                                 n("observe.data.ps.observation.ObjectObservedSpecies.table.speciesStatus"),
    
    75 75
                                                 n("observe.data.ps.observation.ObjectObservedSpecies.table.speciesStatus.tip"),
    
    76 76
                                                 n("observe.data.ps.observation.ObjectObservedSpecies.table.count"),
    

  • client-datasource-editor-ps/src/main/java/fr/ird/observe/client/datasource/editor/content/data/ps/observation/ObjectSchoolEstimateUIHandler.java
    ... ... @@ -67,8 +67,8 @@ public class ObjectSchoolEstimateUIHandler extends ContentTableUIHandler<Floatin
    67 67
             JTable table = getUi().getTable();
    
    68 68
     
    
    69 69
             UIHelper.setI18nTableHeaderRenderer(table,
    
    70
    -                                            n("observe.data.ps.observation.SchoolEstimate.table.speciesThon"),
    
    71
    -                                            n("observe.data.ps.observation.SchoolEstimate.table.speciesThon.tip"),
    
    70
    +                                            n("observe.data.ps.observation.SchoolEstimate.table.species"),
    
    71
    +                                            n("observe.data.ps.observation.SchoolEstimate.table.species.tip"),
    
    72 72
                                                 n("observe.data.ps.observation.SchoolEstimate.table.weight"),
    
    73 73
                                                 n("observe.data.ps.observation.SchoolEstimate.table.weight.tip"));
    
    74 74
     
    

  • client-datasource-editor-ps/src/main/java/fr/ird/observe/client/datasource/editor/content/data/ps/observation/SchoolEstimateUI.jcss
    ... ... @@ -21,9 +21,5 @@
    21 21
      */
    
    22 22
     
    
    23 23
     #speciesLabel {
    
    24
    -  toolTipText:"observe.data.ps.observation.SchoolEstimate.table.speciesThon.tip";
    
    25
    -}
    
    26
    -
    
    27
    -#species {
    
    28
    -  enabled:{!tableModel.isEditable() || !model.isRowSaved()};
    
    24
    +  toolTipText:"observe.data.ps.observation.SchoolEstimate.table.species.tip";
    
    29 25
     }

  • client-datasource-editor-ps/src/main/java/fr/ird/observe/client/datasource/editor/content/data/ps/observation/SchoolEstimateUIHandler.java
    ... ... @@ -40,7 +40,6 @@ import javax.swing.JTable;
    40 40
     import javax.swing.table.DefaultTableCellRenderer;
    
    41 41
     import java.awt.Component;
    
    42 42
     import java.awt.Container;
    
    43
    -import java.util.Collections;
    
    44 43
     import java.util.List;
    
    45 44
     import java.util.Set;
    
    46 45
     import java.util.stream.Collectors;
    
    ... ... @@ -64,31 +63,24 @@ public class SchoolEstimateUIHandler extends ContentTableUIHandler<SetSchoolEsti
    64 63
             ContentTableModel<SetSchoolEstimateDto, SchoolEstimateDto> model = getTableModel();
    
    65 64
     
    
    66 65
             if (!model.isEditable()) {
    
    67
    -
    
    68 66
                 // rien a faire
    
    69 67
                 return;
    
    70 68
             }
    
    71
    -
    
    72 69
             SchoolEstimateUI ui = getUi();
    
    73
    -        List<SpeciesReference> availableEspeces;
    
    74 70
             JComponent requestFocus;
    
    75
    -
    
    71
    +        List<SpeciesReference> listSpeciesUsed = model.getColumnValues(0);
    
    72
    +        Set<String> listSpeciesIdUsed = listSpeciesUsed.stream().map(ReferentialDtoReference::getId).collect(Collectors.toSet());
    
    73
    +        List<SpeciesReference> references = getModel().getReferenceCache().getReferentialReferences(SchoolEstimateDto.PROPERTY_SPECIES);
    
    74
    +        List<SpeciesReference> availableSpecies = DtoReferenceCollection.filterNotContains(references, listSpeciesIdUsed);
    
    76 75
             if (create) {
    
    77
    -            List<SpeciesReference> references = getModel().getReferenceCache().getReferentialReferences(SchoolEstimateDto.PROPERTY_SPECIES);
    
    78
    -
    
    79
    -            List<SpeciesReference> listSpeciesUsed = model.getColumnValues(0);
    
    80
    -
    
    81
    -            Set<String> listSpeciesIdUsed = listSpeciesUsed.stream().map(ReferentialDtoReference::getId).collect(Collectors.toSet());
    
    82
    -
    
    83
    -            availableEspeces = DtoReferenceCollection.filterNotContains(references, listSpeciesIdUsed);
    
    84
    -
    
    85 76
                 requestFocus = ui.getSpecies();
    
    86 77
             } else {
    
    87
    -            SpeciesReference species = bean.getSpecies();
    
    88
    -            availableEspeces = Collections.singletonList(species);
    
    78
    +            if (bean.getSpecies() != null) {
    
    79
    +                availableSpecies.add(bean.getSpecies());
    
    80
    +            }
    
    89 81
                 requestFocus = ui.getTotalWeight();
    
    90 82
             }
    
    91
    -        ui.getSpecies().setData(availableEspeces);
    
    83
    +        ui.getSpecies().setData(availableSpecies);
    
    92 84
             setFormFocusOwner(requestFocus);
    
    93 85
         }
    
    94 86
     
    
    ... ... @@ -98,8 +90,8 @@ public class SchoolEstimateUIHandler extends ContentTableUIHandler<SetSchoolEsti
    98 90
     
    
    99 91
             UIHelper.setI18nTableHeaderRenderer(
    
    100 92
                     table,
    
    101
    -                n("observe.data.ps.observation.SchoolEstimate.table.speciesThon"),
    
    102
    -                n("observe.data.ps.observation.SchoolEstimate.table.speciesThon.tip"),
    
    93
    +                n("observe.data.ps.observation.SchoolEstimate.table.species"),
    
    94
    +                n("observe.data.ps.observation.SchoolEstimate.table.species.tip"),
    
    103 95
                     n("observe.data.ps.observation.SchoolEstimate.table.weight"),
    
    104 96
                     n("observe.data.ps.observation.SchoolEstimate.table.weight.tip"),
    
    105 97
                     n("observe.data.ps.observation.SchoolEstimate.table.meanWeight"),
    

  • client-datasource-editor-ps/src/main/java/fr/ird/observe/client/datasource/editor/content/data/ps/observation/TargetCatchUI.jcss
    ... ... @@ -25,25 +25,14 @@
    25 25
     }
    
    26 26
     
    
    27 27
     #speciesLabel {
    
    28
    -  toolTipText:"observe.data.ps.observation.TargetCatch.table.speciesThon.tip";
    
    29
    -}
    
    30
    -
    
    31
    -#species {
    
    32
    -  enabled:{!tableModel.isEditable() || !model.isRowSaved()};
    
    28
    +  toolTipText:"observe.data.ps.observation.TargetCatch.table.species.tip";
    
    33 29
     }
    
    34 30
     
    
    35 31
     #weightCategoryLabel {
    
    36 32
       toolTipText:"observe.data.ps.observation.TargetCatch.table.weightCategory.tip";
    
    37 33
     }
    
    38 34
     
    
    39
    -#weightCategory {
    
    40
    -  enabled:{!tableModel.isEditable() || !model.isRowSaved()};
    
    41
    -}
    
    42
    -
    
    43 35
     #wellLabel {
    
    44 36
       toolTipText:"observe.data.ps.observation.TargetCatch.table.well.tip";
    
    45 37
     }
    
    46 38
     
    47
    -#well {
    
    48
    -  enabled:{!tableModel.isEditable() || !model.isRowSaved()};
    
    49
    -}

  • client-datasource-editor-ps/src/main/java/fr/ird/observe/client/datasource/editor/content/data/ps/observation/TargetCatchUIHandler.java
    ... ... @@ -135,11 +135,9 @@ public class TargetCatchUIHandler extends ContentTableUIHandler<SetTargetCatchDt
    135 135
                     log.debug("response : " + reponse);
    
    136 136
                 }
    
    137 137
                 boolean canContinue = false;
    
    138
    -            switch (reponse) {
    
    139
    -                case 0:
    
    138
    +            if (reponse == 0) {
    
    140 139
                         // wil reset ui
    
    141
    -                    canContinue = true;
    
    142
    -                    break;
    
    140
    +                canContinue = true;
    
    143 141
                 }
    
    144 142
                 if (!canContinue) {
    
    145 143
                     return false;
    
    ... ... @@ -182,13 +180,15 @@ public class TargetCatchUIHandler extends ContentTableUIHandler<SetTargetCatchDt
    182 180
                 // au singleton de sa valeur correspondante dans le bean
    
    183 181
                 // puisque dans ce mode, pas possibilite de modifier de cette
    
    184 182
                 // valeur (clef metier)
    
    183
    +            ui.getSpecies().setSelectedItem(null);
    
    185 184
                 ui.getSpecies().setSelectedItem(species);
    
    186
    -            ui.getWeightCategory().setData(Collections.singletonList(weightCategory));
    
    185
    +//            ui.getWeightCategory().setData(Collections.singletonList(weightCategory));
    
    187 186
                 ui.getWeightCategory().setSelectedItem(weightCategory);
    
    188 187
     
    
    189 188
                 requestFocus = ui.getCatchWeight();
    
    190 189
             }
    
    191 190
     
    
    191
    +
    
    192 192
             if (log.isDebugEnabled()) {
    
    193 193
                 log.debug("selected weightCategory " + weightCategory);
    
    194 194
                 log.debug("selected species " + species);
    
    ... ... @@ -207,8 +207,8 @@ public class TargetCatchUIHandler extends ContentTableUIHandler<SetTargetCatchDt
    207 207
     
    
    208 208
             UIHelper.setI18nTableHeaderRenderer(
    
    209 209
                     table,
    
    210
    -                n("observe.data.ps.observation.TargetCatch.table.speciesThon"),
    
    211
    -                n("observe.data.ps.observation.TargetCatch.table.speciesThon.tip"),
    
    210
    +                n("observe.data.ps.observation.TargetCatch.table.species"),
    
    211
    +                n("observe.data.ps.observation.TargetCatch.table.species.tip"),
    
    212 212
                     n("observe.data.ps.observation.TargetCatch.table.weightCategory"),
    
    213 213
                     n("observe.data.ps.observation.TargetCatch.table.weightCategory.tip"),
    
    214 214
                     n("observe.data.ps.observation.TargetCatch.table.well"),
    
    ... ... @@ -265,9 +265,6 @@ public class TargetCatchUIHandler extends ContentTableUIHandler<SetTargetCatchDt
    265 265
         protected void loadEditBean(String beanId) {
    
    266 266
             Form<SetTargetCatchDto> form = getPsObservationTargetCatchService().loadForm(beanId, false);
    
    267 267
             getModel().openForm(form);
    
    268
    -//        loadReferentialReferenceSetsInModel(form);
    
    269
    -//        getModel().setForm(form);
    
    270
    -//        SetTargetCatchHelper.copySetTargetCatchDto(form.getObject(), getBean());
    
    271 268
         }
    
    272 269
     
    
    273 270
         @Override
    

  • client-datasource-editor-ps/src/main/java/fr/ird/observe/client/datasource/editor/content/data/ps/observation/TargetDiscardCatchUI.jcss
    ... ... @@ -28,18 +28,10 @@
    28 28
       toolTipText:"observe.data.ps.observation.TargetDiscard.table.species.tip";
    
    29 29
     }
    
    30 30
     
    
    31
    -#species {
    
    32
    -  enabled:{!tableModel.isEditable() || !model.isRowSaved()};
    
    33
    -}
    
    34
    -
    
    35 31
     #weightCategoryLabel {
    
    36 32
       toolTipText:"observe.data.ps.observation.TargetDiscard.table.weightCategory.tip";
    
    37 33
     }
    
    38 34
     
    
    39
    -#weightCategory {
    
    40
    -  enabled:{!tableModel.isEditable() || !model.isRowSaved()};
    
    41
    -}
    
    42
    -
    
    43 35
     #reasonForDiscardLabel {
    
    44 36
       toolTipText:"observe.data.ps.observation.TargetDiscard.table.reasonForDiscard.tip";
    
    45 37
     }
    

  • client-datasource-editor-ps/src/main/java/fr/ird/observe/client/datasource/editor/content/data/ps/observation/TargetDiscardCatchUIHandler.java
    ... ... @@ -218,10 +218,16 @@ public class TargetDiscardCatchUIHandler extends ContentTableUIHandler<SetTarget
    218 218
                 // au singleton de sa valeur correspondante dans le bean
    
    219 219
                 // puisque dans ce mode, pas possibilite de modifier de cette
    
    220 220
                 // valeur (clef metier)
    
    221
    +
    
    222
    +            // on recalcule la liste des speciess disponibles
    
    223
    +            List<SpeciesReference> availableSpecies = buildSpeciesList(weightCategory);
    
    224
    +            ui.getSpecies().setData(availableSpecies);
    
    225
    +
    
    226
    +            ui.getSpecies().setSelectedItem(null);
    
    221 227
                 ui.getSpecies().setSelectedItem(species);
    
    222
    -            ui.getWeightCategory().setData(Collections.singletonList(weightCategory));
    
    228
    +//            ui.getWeightCategory().setData(Collections.singletonList(weightCategory));
    
    223 229
                 ui.getWeightCategory().setSelectedItem(weightCategory);
    
    224
    -            ui.getReasonForDiscard().setData(Collections.singletonList(reasonForDiscard));
    
    230
    +//            ui.getReasonForDiscard().setData(Collections.singletonList(reasonForDiscard));
    
    225 231
                 ui.getReasonForDiscard().setSelectedItem(reasonForDiscard);
    
    226 232
     
    
    227 233
                 requestFocus = ui.getCatchWeight();
    
    ... ... @@ -239,7 +245,7 @@ public class TargetDiscardCatchUIHandler extends ContentTableUIHandler<SetTarget
    239 245
     
    
    240 246
             UIHelper.setI18nTableHeaderRenderer(
    
    241 247
                     table,
    
    242
    -                n("observe.data.ps.observation.TargetDiscard.table.speciesThon"),
    
    248
    +                n("observe.data.ps.observation.TargetDiscard.table.species"),
    
    243 249
                     n("observe.data.ps.observation.TargetDiscard.table.species.tip"),
    
    244 250
                     n("observe.data.ps.observation.TargetDiscard.table.weightCategory"),
    
    245 251
                     n("observe.data.ps.observation.TargetDiscard.table.weightCategory.tip"),
    
    ... ... @@ -362,7 +368,6 @@ public class TargetDiscardCatchUIHandler extends ContentTableUIHandler<SetTarget
    362 368
     
    
    363 369
         }
    
    364 370
     
    
    365
    -    @SuppressWarnings("unchecked")
    
    366 371
         private List<ReasonForDiscardReference> buildReasonFordiscardList() {
    
    367 372
             return getModel().getReferenceCache().getReferentialReferences(TargetCatchDto.PROPERTY_REASON_FOR_DISCARD);
    
    368 373
         }
    
    ... ... @@ -382,9 +387,6 @@ public class TargetDiscardCatchUIHandler extends ContentTableUIHandler<SetTarget
    382 387
         protected void loadEditBean(String beanId) {
    
    383 388
             Form<SetTargetCatchDto> form = getPsObservationTargetCatchService().loadForm(beanId, true);
    
    384 389
             getModel().openForm(form);
    
    385
    -//        loadReferentialReferenceSetsInModel(form);
    
    386
    -//        getModel().setForm(form);
    
    387
    -//        SetTargetCatchHelper.copySetTargetCatchDto(form.getObject(), getBean());
    
    388 390
         }
    
    389 391
     
    
    390 392
         @Override
    

  • client-datasource-editor-ps/src/main/java/fr/ird/observe/client/datasource/editor/content/data/ps/observation/TargetSampleUIHandler.java
    ... ... @@ -157,8 +157,8 @@ public class TargetSampleUIHandler<U extends ContentTableUI<TargetSampleDto, Tar
    157 157
     
    
    158 158
             UIHelper.setI18nTableHeaderRenderer(
    
    159 159
                     table,
    
    160
    -                n("observe.data.ps.observation.TargetLength.table.speciesThon"),
    
    161
    -                n("observe.data.ps.observation.TargetLength.table.speciesThon.tip"),
    
    160
    +                n("observe.data.ps.observation.TargetLength.table.species"),
    
    161
    +                n("observe.data.ps.observation.TargetLength.table.species.tip"),
    
    162 162
                     n("observe.data.ps.observation.TargetLength.table.sex"),
    
    163 163
                     n("observe.data.ps.observation.TargetLength.table.sex.tip"),
    
    164 164
                     n("observe.data.ps.observation.TargetLength.table.sizeMeasureType"),
    

  • observe-i18n/src/main/i18n/translations/observe_en_GB.properties
    ... ... @@ -2005,10 +2005,10 @@ observe.data.ps.observation.NonTargetCatch.table.meanWeight=Mean weight
    2005 2005
     observe.data.ps.observation.NonTargetCatch.table.meanWeight.tip=Mean weight (in Kg)
    
    2006 2006
     observe.data.ps.observation.NonTargetCatch.table.reasonForDiscard=Reason for discard
    
    2007 2007
     observe.data.ps.observation.NonTargetCatch.table.reasonForDiscard.tip=Reason for discard
    
    2008
    +observe.data.ps.observation.NonTargetCatch.table.species=Species
    
    2009
    +observe.data.ps.observation.NonTargetCatch.table.species.tip=non target species
    
    2008 2010
     observe.data.ps.observation.NonTargetCatch.table.speciesFate=Species fate
    
    2009 2011
     observe.data.ps.observation.NonTargetCatch.table.speciesFate.tip=Species fate
    
    2010
    -observe.data.ps.observation.NonTargetCatch.table.speciesFaune=Species
    
    2011
    -observe.data.ps.observation.NonTargetCatch.table.speciesFaune.tip=non target species
    
    2012 2012
     observe.data.ps.observation.NonTargetCatch.table.totalCount=Count
    
    2013 2013
     observe.data.ps.observation.NonTargetCatch.table.totalCount.tip=Estimated count
    
    2014 2014
     observe.data.ps.observation.NonTargetCatch.table.well=Well
    
    ... ... @@ -2064,12 +2064,12 @@ observe.data.ps.observation.NonTargetLength.table.length=Length
    2064 2064
     observe.data.ps.observation.NonTargetLength.table.length.tip=Length
    
    2065 2065
     observe.data.ps.observation.NonTargetLength.table.meanWeight=Indiv. Weight
    
    2066 2066
     observe.data.ps.observation.NonTargetLength.table.meanWeight.tip=Individual weight (en Kg)
    
    2067
    -observe.data.ps.observation.NonTargetLength.table.nonTargetSpecies=Species
    
    2068
    -observe.data.ps.observation.NonTargetLength.table.nonTargetSpecies.tip=Non target species
    
    2069 2067
     observe.data.ps.observation.NonTargetLength.table.picturesReferences=Pictures references
    
    2070 2068
     observe.data.ps.observation.NonTargetLength.table.picturesReferences.tip=Pictures references
    
    2071 2069
     observe.data.ps.observation.NonTargetLength.table.sizeMeasureType=Measure type
    
    2072 2070
     observe.data.ps.observation.NonTargetLength.table.sizeMeasureType.tip=Size measure type
    
    2071
    +observe.data.ps.observation.NonTargetLength.table.species=Species
    
    2072
    +observe.data.ps.observation.NonTargetLength.table.species.tip=Non target species
    
    2073 2073
     observe.data.ps.observation.NonTargetLength.tagNumber=Sample number
    
    2074 2074
     observe.data.ps.observation.NonTargetLength.title=Non target lengths
    
    2075 2075
     observe.data.ps.observation.NonTargetLength.type=Non target length
    
    ... ... @@ -2092,8 +2092,8 @@ observe.data.ps.observation.ObjectObservedSpecies.species=Species
    2092 2092
     observe.data.ps.observation.ObjectObservedSpecies.speciesStatus=Species status
    
    2093 2093
     observe.data.ps.observation.ObjectObservedSpecies.table.count=Count
    
    2094 2094
     observe.data.ps.observation.ObjectObservedSpecies.table.count.tip=Count
    
    2095
    -observe.data.ps.observation.ObjectObservedSpecies.table.speciesFaune=Species
    
    2096
    -observe.data.ps.observation.ObjectObservedSpecies.table.speciesFaune.tip=Object observed species
    
    2095
    +observe.data.ps.observation.ObjectObservedSpecies.table.species=Species
    
    2096
    +observe.data.ps.observation.ObjectObservedSpecies.table.species.tip=Object observed species
    
    2097 2097
     observe.data.ps.observation.ObjectObservedSpecies.table.speciesStatus=Status
    
    2098 2098
     observe.data.ps.observation.ObjectObservedSpecies.table.speciesStatus.tip=Species status
    
    2099 2099
     observe.data.ps.observation.ObjectObservedSpecies.title=Object observed species
    
    ... ... @@ -2155,8 +2155,8 @@ observe.data.ps.observation.SchoolEstimate.meanWeight=Mean weight
    2155 2155
     observe.data.ps.observation.SchoolEstimate.species=Species
    
    2156 2156
     observe.data.ps.observation.SchoolEstimate.table.meanWeight=Mean weight (in Kg)
    
    2157 2157
     observe.data.ps.observation.SchoolEstimate.table.meanWeight.tip=Mean weight (in Kg)
    
    2158
    -observe.data.ps.observation.SchoolEstimate.table.speciesThon=Species
    
    2159
    -observe.data.ps.observation.SchoolEstimate.table.speciesThon.tip=Target species
    
    2158
    +observe.data.ps.observation.SchoolEstimate.table.species=Species
    
    2159
    +observe.data.ps.observation.SchoolEstimate.table.species.tip=Target species
    
    2160 2160
     observe.data.ps.observation.SchoolEstimate.table.weight=Weight (in t)
    
    2161 2161
     observe.data.ps.observation.SchoolEstimate.table.weight.tip=Weight (in t)
    
    2162 2162
     observe.data.ps.observation.SchoolEstimate.title=School estimate
    
    ... ... @@ -2213,8 +2213,8 @@ observe.data.ps.observation.TargetCatch.species=Species
    2213 2213
     observe.data.ps.observation.TargetCatch.table.comment=Com
    
    2214 2214
     observe.data.ps.observation.TargetCatch.table.comment.tip=comment
    
    2215 2215
     observe.data.ps.observation.TargetCatch.table.deleteExtraMessage=\nDeleting a target catch will delete all the sample for this species.
    
    2216
    -observe.data.ps.observation.TargetCatch.table.speciesThon=Species
    
    2217
    -observe.data.ps.observation.TargetCatch.table.speciesThon.tip=Targt species
    
    2216
    +observe.data.ps.observation.TargetCatch.table.species=Species
    
    2217
    +observe.data.ps.observation.TargetCatch.table.species.tip=Targt species
    
    2218 2218
     observe.data.ps.observation.TargetCatch.table.weight=Weight (in t)
    
    2219 2219
     observe.data.ps.observation.TargetCatch.table.weight.tip=Weight (in t)
    
    2220 2220
     observe.data.ps.observation.TargetCatch.table.weightCategory=Weight category
    
    ... ... @@ -2237,8 +2237,8 @@ observe.data.ps.observation.TargetDiscard.table.comment.tip=Comment
    2237 2237
     observe.data.ps.observation.TargetDiscard.table.deleteExtraMessage=\nDeleting a discarded target catch will delete all the sample for this species.
    
    2238 2238
     observe.data.ps.observation.TargetDiscard.table.reasonForDiscard=Reason for discard
    
    2239 2239
     observe.data.ps.observation.TargetDiscard.table.reasonForDiscard.tip=Reason for discard
    
    2240
    +observe.data.ps.observation.TargetDiscard.table.species=Species
    
    2240 2241
     observe.data.ps.observation.TargetDiscard.table.species.tip=Target discarded species
    
    2241
    -observe.data.ps.observation.TargetDiscard.table.speciesThon=Species
    
    2242 2242
     observe.data.ps.observation.TargetDiscard.table.weight=Weight (in t)
    
    2243 2243
     observe.data.ps.observation.TargetDiscard.table.weight.tip=Weight (in t)
    
    2244 2244
     observe.data.ps.observation.TargetDiscard.table.weightCategory=Weight category
    
    ... ... @@ -2262,8 +2262,8 @@ observe.data.ps.observation.TargetLength.table.sex=Sex
    2262 2262
     observe.data.ps.observation.TargetLength.table.sex.tip=Sex
    
    2263 2263
     observe.data.ps.observation.TargetLength.table.sizeMeasureType=Measure type
    
    2264 2264
     observe.data.ps.observation.TargetLength.table.sizeMeasureType.tip=Measure type (LF or LD1)
    
    2265
    -observe.data.ps.observation.TargetLength.table.speciesThon=Species
    
    2266
    -observe.data.ps.observation.TargetLength.table.speciesThon.tip=Target sample species
    
    2265
    +observe.data.ps.observation.TargetLength.table.species=Species
    
    2266
    +observe.data.ps.observation.TargetLength.table.species.tip=Target sample species
    
    2267 2267
     observe.data.ps.observation.TargetLength.table.totalWeight=Total weight (in t)
    
    2268 2268
     observe.data.ps.observation.TargetLength.table.totalWeight.tip=Total weight (in t)
    
    2269 2269
     observe.data.ps.observation.TargetLength.tagNumber=Tag number
    

  • observe-i18n/src/main/i18n/translations/observe_es_ES.properties
    ... ... @@ -2005,10 +2005,10 @@ observe.data.ps.observation.NonTargetCatch.table.meanWeight=Peso medio
    2005 2005
     observe.data.ps.observation.NonTargetCatch.table.meanWeight.tip=Peso medio (en Kg)
    
    2006 2006
     observe.data.ps.observation.NonTargetCatch.table.reasonForDiscard=Razón del descarte
    
    2007 2007
     observe.data.ps.observation.NonTargetCatch.table.reasonForDiscard.tip=Razón del descarte
    
    2008
    +observe.data.ps.observation.NonTargetCatch.table.species=Especie
    
    2009
    +observe.data.ps.observation.NonTargetCatch.table.species.tip=Especie
    
    2008 2010
     observe.data.ps.observation.NonTargetCatch.table.speciesFate=Devenir
    
    2009 2011
     observe.data.ps.observation.NonTargetCatch.table.speciesFate.tip=Devenir de la fauna
    
    2010
    -observe.data.ps.observation.NonTargetCatch.table.speciesFaune=Especie
    
    2011
    -observe.data.ps.observation.NonTargetCatch.table.speciesFaune.tip=Especie
    
    2012 2012
     observe.data.ps.observation.NonTargetCatch.table.totalCount=Número
    
    2013 2013
     observe.data.ps.observation.NonTargetCatch.table.totalCount.tip=Número estimado
    
    2014 2014
     observe.data.ps.observation.NonTargetCatch.table.well=Cuba
    
    ... ... @@ -2064,12 +2064,12 @@ observe.data.ps.observation.NonTargetLength.table.length=Talla
    2064 2064
     observe.data.ps.observation.NonTargetLength.table.length.tip=Talla
    
    2065 2065
     observe.data.ps.observation.NonTargetLength.table.meanWeight=Peso
    
    2066 2066
     observe.data.ps.observation.NonTargetLength.table.meanWeight.tip=Peso del individuo
    
    2067
    -observe.data.ps.observation.NonTargetLength.table.nonTargetSpecies=Especie
    
    2068
    -observe.data.ps.observation.NonTargetLength.table.nonTargetSpecies.tip=Especie
    
    2069 2067
     observe.data.ps.observation.NonTargetLength.table.picturesReferences=Ref. foto
    
    2070 2068
     observe.data.ps.observation.NonTargetLength.table.picturesReferences.tip=Referencia foto
    
    2071 2069
     observe.data.ps.observation.NonTargetLength.table.sizeMeasureType=Typo de medida
    
    2072 2070
     observe.data.ps.observation.NonTargetLength.table.sizeMeasureType.tip=Typo de medida
    
    2071
    +observe.data.ps.observation.NonTargetLength.table.species=Especie
    
    2072
    +observe.data.ps.observation.NonTargetLength.table.species.tip=Especie
    
    2073 2073
     observe.data.ps.observation.NonTargetLength.tagNumber=Numéro d'échantillon \#TODO
    
    2074 2074
     observe.data.ps.observation.NonTargetLength.title=Longitudes (cm inf.)
    
    2075 2075
     observe.data.ps.observation.NonTargetLength.type=Longitud (cm inf.)
    
    ... ... @@ -2092,8 +2092,8 @@ observe.data.ps.observation.ObjectObservedSpecies.species=Especie
    2092 2092
     observe.data.ps.observation.ObjectObservedSpecies.speciesStatus=Estado de especie
    
    2093 2093
     observe.data.ps.observation.ObjectObservedSpecies.table.count=Número
    
    2094 2094
     observe.data.ps.observation.ObjectObservedSpecies.table.count.tip=Número
    
    2095
    -observe.data.ps.observation.ObjectObservedSpecies.table.speciesFaune=Especie
    
    2096
    -observe.data.ps.observation.ObjectObservedSpecies.table.speciesFaune.tip=Especie
    
    2095
    +observe.data.ps.observation.ObjectObservedSpecies.table.species=Especie
    
    2096
    +observe.data.ps.observation.ObjectObservedSpecies.table.species.tip=Especie
    
    2097 2097
     observe.data.ps.observation.ObjectObservedSpecies.table.speciesStatus=Estado
    
    2098 2098
     observe.data.ps.observation.ObjectObservedSpecies.table.speciesStatus.tip=Estado
    
    2099 2099
     observe.data.ps.observation.ObjectObservedSpecies.title=Fauna observada
    
    ... ... @@ -2155,8 +2155,8 @@ observe.data.ps.observation.SchoolEstimate.meanWeight=Peso medio (en Kg)
    2155 2155
     observe.data.ps.observation.SchoolEstimate.species=Especie
    
    2156 2156
     observe.data.ps.observation.SchoolEstimate.table.meanWeight=Peso medio (en Kg)
    
    2157 2157
     observe.data.ps.observation.SchoolEstimate.table.meanWeight.tip=Peso medio (en Kg)
    
    2158
    -observe.data.ps.observation.SchoolEstimate.table.speciesThon=Especie
    
    2159
    -observe.data.ps.observation.SchoolEstimate.table.speciesThon.tip=Especie de atún (no se puede modificar una vez se haya creado la estimación)
    
    2158
    +observe.data.ps.observation.SchoolEstimate.table.species=Especie
    
    2159
    +observe.data.ps.observation.SchoolEstimate.table.species.tip=Especie de atún (no se puede modificar una vez se haya creado la estimación)
    
    2160 2160
     observe.data.ps.observation.SchoolEstimate.table.weight=Peso (en t)
    
    2161 2161
     observe.data.ps.observation.SchoolEstimate.table.weight.tip=Peso (en t)
    
    2162 2162
     observe.data.ps.observation.SchoolEstimate.title=Estimación del banco
    
    ... ... @@ -2213,8 +2213,8 @@ observe.data.ps.observation.TargetCatch.species=Especie
    2213 2213
     observe.data.ps.observation.TargetCatch.table.comment=Comentario
    
    2214 2214
     observe.data.ps.observation.TargetCatch.table.comment.tip=Comentario
    
    2215 2215
     observe.data.ps.observation.TargetCatch.table.deleteExtraMessage=\nLa eliminación de una captura de atún puede provocar la eliminación de muestreo(s) sobre la especie.
    
    2216
    -observe.data.ps.observation.TargetCatch.table.speciesThon=Atún puesto en tanque
    
    2217
    -observe.data.ps.observation.TargetCatch.table.speciesThon.tip=Atún puesto en tanque
    
    2216
    +observe.data.ps.observation.TargetCatch.table.species=Atún puesto en tanque
    
    2217
    +observe.data.ps.observation.TargetCatch.table.species.tip=Atún puesto en tanque
    
    2218 2218
     observe.data.ps.observation.TargetCatch.table.weight=Peso (en t)
    
    2219 2219
     observe.data.ps.observation.TargetCatch.table.weight.tip=Peso (en t)
    
    2220 2220
     observe.data.ps.observation.TargetCatch.table.weightCategory=Categoría de peso
    
    ... ... @@ -2237,8 +2237,8 @@ observe.data.ps.observation.TargetDiscard.table.comment.tip=Comentario
    2237 2237
     observe.data.ps.observation.TargetDiscard.table.deleteExtraMessage=\nLa eliminación de un rechazo de atún puede provocar la eliminación de muestreo(s) sobre la especie.
    
    2238 2238
     observe.data.ps.observation.TargetDiscard.table.reasonForDiscard=Razon de descarte
    
    2239 2239
     observe.data.ps.observation.TargetDiscard.table.reasonForDiscard.tip=Razon de descarte
    
    2240
    +observe.data.ps.observation.TargetDiscard.table.species=Especie de atún
    
    2240 2241
     observe.data.ps.observation.TargetDiscard.table.species.tip=Especie de atún
    
    2241
    -observe.data.ps.observation.TargetDiscard.table.speciesThon=Especie de atún
    
    2242 2242
     observe.data.ps.observation.TargetDiscard.table.weight=Peso
    
    2243 2243
     observe.data.ps.observation.TargetDiscard.table.weight.tip=Peso (en t)
    
    2244 2244
     observe.data.ps.observation.TargetDiscard.table.weightCategory=Categoría de peso
    
    ... ... @@ -2262,8 +2262,8 @@ observe.data.ps.observation.TargetLength.table.sex=Sexo
    2262 2262
     observe.data.ps.observation.TargetLength.table.sex.tip=Sexo
    
    2263 2263
     observe.data.ps.observation.TargetLength.table.sizeMeasureType=Tipo de medición
    
    2264 2264
     observe.data.ps.observation.TargetLength.table.sizeMeasureType.tip=El tipo de medición utilizado (LF ou LD1)
    
    2265
    -observe.data.ps.observation.TargetLength.table.speciesThon=Especie de atún
    
    2266
    -observe.data.ps.observation.TargetLength.table.speciesThon.tip=Especie de atún
    
    2265
    +observe.data.ps.observation.TargetLength.table.species=Especie de atún
    
    2266
    +observe.data.ps.observation.TargetLength.table.species.tip=Especie de atún
    
    2267 2267
     observe.data.ps.observation.TargetLength.table.totalWeight=Peso tot.
    
    2268 2268
     observe.data.ps.observation.TargetLength.table.totalWeight.tip=Peso total (en t)
    
    2269 2269
     observe.data.ps.observation.TargetLength.tagNumber=Numéro échantillon \#TODO
    

  • observe-i18n/src/main/i18n/translations/observe_fr_FR.properties
    ... ... @@ -2005,10 +2005,10 @@ observe.data.ps.observation.NonTargetCatch.table.meanWeight=Poids moy
    2005 2005
     observe.data.ps.observation.NonTargetCatch.table.meanWeight.tip=Poids moyen (en Kg)
    
    2006 2006
     observe.data.ps.observation.NonTargetCatch.table.reasonForDiscard=Raison rejet
    
    2007 2007
     observe.data.ps.observation.NonTargetCatch.table.reasonForDiscard.tip=Raison rejet
    
    2008
    +observe.data.ps.observation.NonTargetCatch.table.species=Espèce de faune
    
    2009
    +observe.data.ps.observation.NonTargetCatch.table.species.tip=Espèce de faune
    
    2008 2010
     observe.data.ps.observation.NonTargetCatch.table.speciesFate=Devenir
    
    2009 2011
     observe.data.ps.observation.NonTargetCatch.table.speciesFate.tip=Devenir faune
    
    2010
    -observe.data.ps.observation.NonTargetCatch.table.speciesFaune=Espèce de faune
    
    2011
    -observe.data.ps.observation.NonTargetCatch.table.speciesFaune.tip=Espèce de faune
    
    2012 2012
     observe.data.ps.observation.NonTargetCatch.table.totalCount=Nombre
    
    2013 2013
     observe.data.ps.observation.NonTargetCatch.table.totalCount.tip=Nombre estimé
    
    2014 2014
     observe.data.ps.observation.NonTargetCatch.table.well=Cuve
    
    ... ... @@ -2064,12 +2064,12 @@ observe.data.ps.observation.NonTargetLength.table.length=Longueur
    2064 2064
     observe.data.ps.observation.NonTargetLength.table.length.tip=Longueur
    
    2065 2065
     observe.data.ps.observation.NonTargetLength.table.meanWeight=Poids ind.
    
    2066 2066
     observe.data.ps.observation.NonTargetLength.table.meanWeight.tip=Poids individuel (en Kg)
    
    2067
    -observe.data.ps.observation.NonTargetLength.table.nonTargetSpecies=Espèce faune
    
    2068
    -observe.data.ps.observation.NonTargetLength.table.nonTargetSpecies.tip=Espèce faune
    
    2069 2067
     observe.data.ps.observation.NonTargetLength.table.picturesReferences=Ref photo
    
    2070 2068
     observe.data.ps.observation.NonTargetLength.table.picturesReferences.tip=référence photo
    
    2071 2069
     observe.data.ps.observation.NonTargetLength.table.sizeMeasureType=Type de mensuration
    
    2072 2070
     observe.data.ps.observation.NonTargetLength.table.sizeMeasureType.tip=Le type de mensuration utilisé (LF ou LD1)
    
    2071
    +observe.data.ps.observation.NonTargetLength.table.species=Espèce faune
    
    2072
    +observe.data.ps.observation.NonTargetLength.table.species.tip=Espèce faune
    
    2073 2073
     observe.data.ps.observation.NonTargetLength.tagNumber=Id marque
    
    2074 2074
     observe.data.ps.observation.NonTargetLength.title=Longueurs (cm inf.)
    
    2075 2075
     observe.data.ps.observation.NonTargetLength.type=Longueur (cm inf.)
    
    ... ... @@ -2092,8 +2092,8 @@ observe.data.ps.observation.ObjectObservedSpecies.species=Espèce
    2092 2092
     observe.data.ps.observation.ObjectObservedSpecies.speciesStatus=Statut faune observée
    
    2093 2093
     observe.data.ps.observation.ObjectObservedSpecies.table.count=Nombre
    
    2094 2094
     observe.data.ps.observation.ObjectObservedSpecies.table.count.tip=Nombre
    
    2095
    -observe.data.ps.observation.ObjectObservedSpecies.table.speciesFaune=Espèce de faune
    
    2096
    -observe.data.ps.observation.ObjectObservedSpecies.table.speciesFaune.tip=Espèce de faune
    
    2095
    +observe.data.ps.observation.ObjectObservedSpecies.table.species=Espèce de faune
    
    2096
    +observe.data.ps.observation.ObjectObservedSpecies.table.species.tip=Espèce de faune
    
    2097 2097
     observe.data.ps.observation.ObjectObservedSpecies.table.speciesStatus=Statut Espèce
    
    2098 2098
     observe.data.ps.observation.ObjectObservedSpecies.table.speciesStatus.tip=Statut Espèce
    
    2099 2099
     observe.data.ps.observation.ObjectObservedSpecies.title=Faune observée
    
    ... ... @@ -2155,8 +2155,8 @@ observe.data.ps.observation.SchoolEstimate.meanWeight=Poids moyen (en Kg)
    2155 2155
     observe.data.ps.observation.SchoolEstimate.species=Espèce
    
    2156 2156
     observe.data.ps.observation.SchoolEstimate.table.meanWeight=Poids moyen (en Kg)
    
    2157 2157
     observe.data.ps.observation.SchoolEstimate.table.meanWeight.tip=Poids moyen (en Kg)
    
    2158
    -observe.data.ps.observation.SchoolEstimate.table.speciesThon=Espèce de thon
    
    2159
    -observe.data.ps.observation.SchoolEstimate.table.speciesThon.tip=Espèce de thon (ne peut pas être modifié une fois l'estimation crée)
    
    2158
    +observe.data.ps.observation.SchoolEstimate.table.species=Espèce de thon
    
    2159
    +observe.data.ps.observation.SchoolEstimate.table.species.tip=Espèce de thon (ne peut pas être modifié une fois l'estimation crée)
    
    2160 2160
     observe.data.ps.observation.SchoolEstimate.table.weight=Poids (en t)
    
    2161 2161
     observe.data.ps.observation.SchoolEstimate.table.weight.tip=Poids (en t)
    
    2162 2162
     observe.data.ps.observation.SchoolEstimate.title=Estimation banc
    
    ... ... @@ -2213,8 +2213,8 @@ observe.data.ps.observation.TargetCatch.species=Espèce
    2213 2213
     observe.data.ps.observation.TargetCatch.table.comment=Com
    
    2214 2214
     observe.data.ps.observation.TargetCatch.table.comment.tip=Commentaire
    
    2215 2215
     observe.data.ps.observation.TargetCatch.table.deleteExtraMessage=\nLe fait de supprimer une capture thon peut entrainer la suppression d'échantillonnage(s) sur l'espèce.
    
    2216
    -observe.data.ps.observation.TargetCatch.table.speciesThon=Thon mis en cuve
    
    2217
    -observe.data.ps.observation.TargetCatch.table.speciesThon.tip=Thon mis en cuve
    
    2216
    +observe.data.ps.observation.TargetCatch.table.species=Thon mis en cuve
    
    2217
    +observe.data.ps.observation.TargetCatch.table.species.tip=Thon mis en cuve
    
    2218 2218
     observe.data.ps.observation.TargetCatch.table.weight=Poids (en t)
    
    2219 2219
     observe.data.ps.observation.TargetCatch.table.weight.tip=Poids (en t)
    
    2220 2220
     observe.data.ps.observation.TargetCatch.table.weightCategory=Catégorie de poids
    
    ... ... @@ -2237,8 +2237,8 @@ observe.data.ps.observation.TargetDiscard.table.comment.tip=Commentaire
    2237 2237
     observe.data.ps.observation.TargetDiscard.table.deleteExtraMessage=\nLe fait de supprimer un rejet de thon peut entrainer la suppression d'échantillonnage(s) sur l'espèce.
    
    2238 2238
     observe.data.ps.observation.TargetDiscard.table.reasonForDiscard=Raison rejet
    
    2239 2239
     observe.data.ps.observation.TargetDiscard.table.reasonForDiscard.tip=Raison rejet
    
    2240
    +observe.data.ps.observation.TargetDiscard.table.species=Espèce de thon
    
    2240 2241
     observe.data.ps.observation.TargetDiscard.table.species.tip=Espèce de thon
    
    2241
    -observe.data.ps.observation.TargetDiscard.table.speciesThon=Espèce de thon
    
    2242 2242
     observe.data.ps.observation.TargetDiscard.table.weight=Poids
    
    2243 2243
     observe.data.ps.observation.TargetDiscard.table.weight.tip=Poids (en t)
    
    2244 2244
     observe.data.ps.observation.TargetDiscard.table.weightCategory=Catégorie de poids
    
    ... ... @@ -2262,8 +2262,8 @@ observe.data.ps.observation.TargetLength.table.sex=Sexe
    2262 2262
     observe.data.ps.observation.TargetLength.table.sex.tip=Sexe
    
    2263 2263
     observe.data.ps.observation.TargetLength.table.sizeMeasureType=Type de mensuration
    
    2264 2264
     observe.data.ps.observation.TargetLength.table.sizeMeasureType.tip=Le type de mensuration utilisé (LF ou LD1)
    
    2265
    -observe.data.ps.observation.TargetLength.table.speciesThon=Espèce de thon
    
    2266
    -observe.data.ps.observation.TargetLength.table.speciesThon.tip=Espèce de thon
    
    2265
    +observe.data.ps.observation.TargetLength.table.species=Espèce de thon
    
    2266
    +observe.data.ps.observation.TargetLength.table.species.tip=Espèce de thon
    
    2267 2267
     observe.data.ps.observation.TargetLength.table.totalWeight=Poids tot.
    
    2268 2268
     observe.data.ps.observation.TargetLength.table.totalWeight.tip=Poids total (en t)
    
    2269 2269
     observe.data.ps.observation.TargetLength.tagNumber=Numéro échantillon
    

  • persistence/src/main/java/fr/ird/observe/entities/data/ps/observation/TargetCatchImpl.java
    ... ... @@ -21,6 +21,8 @@
    21 21
      */
    
    22 22
     package fr.ird.observe.entities.data.ps.observation;
    
    23 23
     
    
    24
    +import fr.ird.observe.dto.data.DataDto;
    
    25
    +import fr.ird.observe.dto.referential.ReferentialLocale;
    
    24 26
     import fr.ird.observe.entities.referential.common.Species;
    
    25 27
     import org.nuiton.util.NumberUtil;
    
    26 28
     
    
    ... ... @@ -51,4 +53,13 @@ public class TargetCatchImpl extends TargetCatchAbstract {
    51 53
             super.setCatchWeight(catchWeight);
    
    52 54
         }
    
    53 55
     
    
    56
    +    @Override
    
    57
    +    public <D extends DataDto> void toDto(ReferentialLocale referentialLocale, D dto) {
    
    58
    +        super.toDto(referentialLocale, dto);
    
    59
    +
    
    60
    +        if (dto instanceof fr.ird.observe.dto.data.ps.observation.TargetCatchDto) {
    
    61
    +            fr.ird.observe.dto.data.ps.observation.TargetCatchDto dto1 = (fr.ird.observe.dto.data.ps.observation.TargetCatchDto) dto;
    
    62
    +            dto1.setSpecies(java.util.Optional.ofNullable(getSpecies()).map(e-> e.toReference(referentialLocale)).orElse(null));
    
    63
    +        }
    
    64
    +    }
    
    54 65
     }

  • persistence/src/main/resources/db/migration/7.4/03_rename_referential-H2.sql
    ... ... @@ -43,5 +43,5 @@ CREATE INDEX idx_observe_longline_catch_stomachFullness ON observe_longline.catc
    43 43
     DROP TABLE observe_longline.Healthness;
    
    44 44
     DROP TABLE observe_longline.StomacFullness;
    
    45 45
     
    
    46
    -UPDATE observe_common.LASTUPDATEDATE SET TYPE = REPLACE(TYPE, 'referentiel.longline.Healthness', 'referential.longline.HealthStatus');
    
    47
    -UPDATE observe_common.LASTUPDATEDATE SET TYPE = REPLACE(TYPE, 'referentiel.longline.StomacFullness', 'referential.longline.StomachFullness');
    \ No newline at end of file
    46
    +UPDATE observe_common.LASTUPDATEDATE SET TYPE = REPLACE(TYPE, 'referentiel.longline.Healthness', 'referentiel.longline.HealthStatus');
    
    47
    +UPDATE observe_common.LASTUPDATEDATE SET TYPE = REPLACE(TYPE, 'referentiel.longline.StomacFullness', 'referentiel.longline.StomachFullness');
    \ No newline at end of file

  • persistence/src/main/resources/db/migration/7.4/03_rename_referential-PG.sql
    ... ... @@ -43,4 +43,4 @@ DROP TABLE observe_longline.Healthness CASCADE;
    43 43
     DROP TABLE observe_longline.StomacFullness CASCADE;
    
    44 44
     
    
    45 45
     UPDATE observe_common.LASTUPDATEDATE SET TYPE = REPLACE(TYPE, 'referentiel.longline.Healthness', 'referentiel.longline.HealthStatus');
    
    46
    -UPDATE observe_common.LASTUPDATEDATE SET TYPE = REPLACE(TYPE, 'referentiel.longline.StomachFullness', 'referentiel.longline.StomachFullness');
    \ No newline at end of file
    46
    +UPDATE observe_common.LASTUPDATEDATE SET TYPE = REPLACE(TYPE, 'referentiel.longline.StomacFullness', 'referentiel.longline.StomachFullness');
    \ No newline at end of file

  • services-local/src/main/java/fr/ird/observe/services/local/service/referential/ReferentialServiceLocal.java
    ... ... @@ -57,6 +57,7 @@ import fr.ird.observe.spi.map.ImmutableTypedMap;
    57 57
     import org.apache.logging.log4j.LogManager;
    
    58 58
     import org.apache.logging.log4j.Logger;
    
    59 59
     import org.nuiton.topia.persistence.TopiaDao;
    
    60
    +import org.nuiton.topia.persistence.TopiaException;
    
    60 61
     import org.nuiton.topia.persistence.metadata.TopiaMetadataEntity;
    
    61 62
     import org.nuiton.topia.persistence.metadata.TopiaMetadataModel;
    
    62 63
     import org.nuiton.topia.persistence.script.SqlScriptConsumer;
    
    ... ... @@ -314,8 +315,12 @@ public class ReferentialServiceLocal extends ObserveServiceLocal implements Refe
    314 315
             ReferentialDtoEntityContext<D, ?, E, ?> dtoEntityContext = DbModelHelper.fromReferentialDtoWeak(dtoType);
    
    315 316
             Class<E> entityType = dtoEntityContext.toEntityType();
    
    316 317
             ObserveTopiaPersistenceContext persistenceContext = serviceContext.getTopiaPersistenceContext();
    
    317
    -        Date lastUpdateDate = persistenceContext.getLastUpdateDate(entityType);
    
    318
    -        return Optional.ofNullable(lastUpdateDate);
    
    318
    +        try {
    
    319
    +            Date lastUpdateDate = persistenceContext.getLastUpdateDate(entityType);
    
    320
    +            return Optional.ofNullable(lastUpdateDate);
    
    321
    +        } catch (Exception e) {
    
    322
    +            throw new TopiaException(String.format("Can't find last update date for type: %s", entityType.getName()));
    
    323
    +        }
    
    319 324
         }
    
    320 325
     
    
    321 326
         private <D extends ReferentialDto, E extends ReferentialEntity<D, ?>> Form<D> referentialEntityToForm(ReferentialDtoEntityContext<D, ?, E, ?> spi, E entity) {
    

  • test/src/main/resources/db/8.0-RC-2/dataForTestLongline.sql.gz
    No preview for this file type
  • test/src/main/resources/db/8.0-RC-2/dataForTestSeine.sql.gz
    No preview for this file type
  • test/src/main/resources/db/8.0-RC-2/referentiel.sql.gz
    No preview for this file type
  • test/src/main/resources/fixtures/validate-service-seine-trips.properties
    ... ... @@ -28,5 +28,4 @@ NonTargetCatchDto=3
    28 28
     NonTargetLengthDto=3
    
    29 29
     TargetLengthDto=1
    
    30 30
     FloatingObjectDto=1
    
    31
    -FloatingObjectPartDto=1
    
    32
    -TargetCatchDto=1
    31
    +FloatingObjectPartDto=1
    \ No newline at end of file