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

Commits:

30 changed files:

Changes:

  • .mvn/gitlab-cache/milestones/532584-issues.json
    ... ... @@ -392,5 +392,54 @@
    392 392
         "state": "closed",
    
    393 393
         "updatedAt": "Sep 15, 2018 1:54:06 PM",
    
    394 394
         "createdAt": "Mar 27, 2018 1:11:48 PM"
    
    395
    +  },
    
    396
    +  {
    
    397
    +    "id": 9960494,
    
    398
    +    "iid": 902,
    
    399
    +    "projectId": 2722779,
    
    400
    +    "title": "Visualisation des données du livre de bord sur la carte",
    
    401
    +    "description": "En LL, La carte trace actuellement les coups de pêche de la marée d’observation. \n\nOn y ajoutera 2 cases à cocher permettant de choisir quelles données afficher :\n * Données d’observation\n * Données du logbook\n\nLa superposition des 2 traces sera donc possible.\n\nChaque case sera grisée si l’information n’est pas disponible.\n\nLa carte LL actuelle montre les aires de pêche, pas la trace du bateau.",
    
    402
    +    "labels": [
    
    403
    +      "Evolution",
    
    404
    +      "IRD-2018-01-V8"
    
    405
    +    ],
    
    406
    +    "milestone": {
    
    407
    +      "id": 532584,
    
    408
    +      "iid": 114,
    
    409
    +      "projectId": 2722779,
    
    410
    +      "groupId": 0,
    
    411
    +      "title": "8.0-alpha-3",
    
    412
    +      "description": "Première partie du troisième lot du contrat IRD-2018-01-V8.\r\ncontient les nouveaux écrans, mais aucune des fonctionnalités avancées.",
    
    413
    +      "dueDate": "Sep 15, 2018 2:00:00 AM",
    
    414
    +      "startDate": "May 24, 2018 2:00:00 AM",
    
    415
    +      "state": "closed"
    
    416
    +    },
    
    417
    +    "assignee": {
    
    418
    +      "_id": 166231,
    
    419
    +      "_username": "tchemit",
    
    420
    +      "_name": "Tony CHEMIT",
    
    421
    +      "_state": "active",
    
    422
    +      "_darkScheme": false,
    
    423
    +      "_isAdmin": false,
    
    424
    +      "_canCreateGroup": false,
    
    425
    +      "_canCreateProject": false,
    
    426
    +      "_canCreateTeam": false,
    
    427
    +      "_avatarUrl": "https://secure.gravatar.com/avatar/2a915aa9a1df35c8b609ff2f750d5dac?s\u003d80\u0026d\u003didenticon"
    
    428
    +    },
    
    429
    +    "author": {
    
    430
    +      "_id": 166231,
    
    431
    +      "_username": "tchemit",
    
    432
    +      "_name": "Tony CHEMIT",
    
    433
    +      "_state": "active",
    
    434
    +      "_darkScheme": false,
    
    435
    +      "_isAdmin": false,
    
    436
    +      "_canCreateGroup": false,
    
    437
    +      "_canCreateProject": false,
    
    438
    +      "_canCreateTeam": false,
    
    439
    +      "_avatarUrl": "https://secure.gravatar.com/avatar/2a915aa9a1df35c8b609ff2f750d5dac?s\u003d80\u0026d\u003didenticon"
    
    440
    +    },
    
    441
    +    "state": "opened",
    
    442
    +    "updatedAt": "Sep 16, 2018 10:19:42 PM",
    
    443
    +    "createdAt": "Mar 27, 2018 12:31:34 PM"
    
    395 444
       }
    
    396 445
     ]
    \ No newline at end of file

  • .mvn/gitlab-cache/milestones/644883-artifacts.json
    1
    +[
    
    2
    +  {
    
    3
    +    "name": "Application",
    
    4
    +    "filename": "observe-7.0-RC-19.zip",
    
    5
    +    "url": "https://ultreia.io/release/observe-7.0-RC-19.zip"
    
    6
    +  },
    
    7
    +  {
    
    8
    +    "name": "Serveur",
    
    9
    +    "filename": "observe-7.0-RC-19.war",
    
    10
    +    "url": "https://ultreia.io/release/observe-7.0-RC-19.war"
    
    11
    +  }
    
    12
    +]
    \ No newline at end of file

  • .mvn/gitlab-cache/milestones/644883-issues.json
    1
    -[]
    \ No newline at end of file
    1
    +[
    
    2
    +  {
    
    3
    +    "id": 13673624,
    
    4
    +    "iid": 1038,
    
    5
    +    "projectId": 2722779,
    
    6
    +    "title": "[PS] Ajout de racourcis clavier sur le formulaire des systèmes observés",
    
    7
    +    "description": "Idéalement, on nous demande des racourcis clavier supplémentaires sur les flêches \u003c- et -\u003e du formaulaire PS systèmes observés :\n\n![image](/uploads/236e6a93607d63560815a257519b7a32/image.png)\n\nEffectivement cela pourrait pas mal fluidifier l\u0027ajout d\u0027éléments.",
    
    8
    +    "labels": [
    
    9
    +      "Bas",
    
    10
    +      "Contrat Code Lutin-2016",
    
    11
    +      "Evolution"
    
    12
    +    ],
    
    13
    +    "milestone": {
    
    14
    +      "id": 644883,
    
    15
    +      "iid": 122,
    
    16
    +      "projectId": 2722779,
    
    17
    +      "groupId": 0,
    
    18
    +      "title": "7.0-RC-19",
    
    19
    +      "description": "",
    
    20
    +      "dueDate": "Sep 16, 2018 2:00:00 AM",
    
    21
    +      "startDate": "Sep 14, 2018 2:00:00 AM",
    
    22
    +      "state": "closed"
    
    23
    +    },
    
    24
    +    "assignee": {
    
    25
    +      "_id": 166231,
    
    26
    +      "_username": "tchemit",
    
    27
    +      "_name": "Tony CHEMIT",
    
    28
    +      "_state": "active",
    
    29
    +      "_darkScheme": false,
    
    30
    +      "_isAdmin": false,
    
    31
    +      "_canCreateGroup": false,
    
    32
    +      "_canCreateProject": false,
    
    33
    +      "_canCreateTeam": false,
    
    34
    +      "_avatarUrl": "https://secure.gravatar.com/avatar/2a915aa9a1df35c8b609ff2f750d5dac?s\u003d80\u0026d\u003didenticon"
    
    35
    +    },
    
    36
    +    "author": {
    
    37
    +      "_id": 1111318,
    
    38
    +      "_username": "pcauquil",
    
    39
    +      "_name": "Pascal Cauquil",
    
    40
    +      "_state": "active",
    
    41
    +      "_darkScheme": false,
    
    42
    +      "_isAdmin": false,
    
    43
    +      "_canCreateGroup": false,
    
    44
    +      "_canCreateProject": false,
    
    45
    +      "_canCreateTeam": false,
    
    46
    +      "_avatarUrl": "https://secure.gravatar.com/avatar/b4ae117bd93e10d96298fa4d885208ea?s\u003d80\u0026d\u003didenticon"
    
    47
    +    },
    
    48
    +    "state": "closed",
    
    49
    +    "updatedAt": "Sep 16, 2018 5:10:02 PM",
    
    50
    +    "createdAt": "Aug 24, 2018 12:25:25 PM"
    
    51
    +  }
    
    52
    +]
    \ No newline at end of file

  • .mvn/gitlab-cache/milestones/644883.json
    ... ... @@ -4,5 +4,8 @@
    4 4
       "projectId": 2722779,
    
    5 5
       "groupId": 0,
    
    6 6
       "title": "7.0-RC-19",
    
    7
    -  "state": "active"
    
    7
    +  "description": "",
    
    8
    +  "dueDate": "Sep 16, 2018 2:00:00 AM",
    
    9
    +  "startDate": "Sep 14, 2018 2:00:00 AM",
    
    10
    +  "state": "closed"
    
    8 11
     }
    \ No newline at end of file

  • .mvn/gitlab-cache/milestones/647608-issues.json
    1
    +[]
    \ No newline at end of file

  • .mvn/gitlab-cache/milestones/647608.json
    1
    +{
    
    2
    +  "id": 647608,
    
    3
    +  "iid": 123,
    
    4
    +  "projectId": 2722779,
    
    5
    +  "groupId": 0,
    
    6
    +  "title": "7.0-RC-20",
    
    7
    +  "state": "active"
    
    8
    +}
    \ No newline at end of file

  • CHANGELOG.md
    1 1
     # ObServe changelog
    
    2 2
     
    
    3 3
      * Author [Tony Chemit](mailto:dev@tchemit.fr)
    
    4
    - * Last generated at 2018-09-15 13:57.
    
    4
    + * Last generated at 2018-09-16 22:22.
    
    5 5
     
    
    6 6
     ## Version [8.0-alpha-3](https://gitlab.com/ultreiaio/ird-observe/milestones/114)
    
    7 7
     Première partie du troisième lot du contrat IRD-2018-01-V8.
contient les nouveaux écrans, mais aucune des fonctionnalités avancées.
    
    ... ... @@ -14,6 +14,7 @@ Première partie du troisième lot du contrat IRD-2018-01-V8.
contient
    14 14
     
    
    15 15
     ### Issues
    
    16 16
       * [[Evolution 578]](https://gitlab.com/ultreiaio/ird-observe/issues/578) **[LL] Implanter le formulaire logbook** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
    
    17
    +  * [[Evolution 902]](https://gitlab.com/ultreiaio/ird-observe/issues/902) **Visualisation des données du livre de bord sur la carte** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
    
    17 18
       * [[Evolution 905]](https://gitlab.com/ultreiaio/ird-observe/issues/905) **Adaptation de l'arbre de navigation** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
    
    18 19
       * [[Evolution 907]](https://gitlab.com/ultreiaio/ird-observe/issues/907) **Ajout de la donnée observe_longline.ActivityLogbook** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
    
    19 20
       * [[Evolution 909]](https://gitlab.com/ultreiaio/ird-observe/issues/909) **Ajout de la donnée observe_longline.SetLogbook** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
    
    ... ... @@ -67,6 +68,17 @@ Premier lot du contrat IRD-2018-01-V8
    67 68
       * [[Evolution 922]](https://gitlab.com/ultreiaio/ird-observe/issues/922) **Ajoute le référentiel observe_common.DataQuality sur les données existantes** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
    
    68 69
       * [[Evolution 950]](https://gitlab.com/ultreiaio/ird-observe/issues/950) **Renommage de la classe seine.WeightCategory en seine.WeightCategorySeine** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
    
    69 70
     
    
    71
    +## Version [7.0-RC-19](https://gitlab.com/ultreiaio/ird-observe/milestones/122)
    
    72
    +
    
    73
    +**Closed at 2018-09-16.**
    
    74
    +
    
    75
    +### Download
    
    76
    +* [Application (observe-7.0-RC-19.zip)](https://ultreia.io/release/observe-7.0-RC-19.zip)
    
    77
    +* [Serveur (observe-7.0-RC-19.war)](https://ultreia.io/release/observe-7.0-RC-19.war)
    
    78
    +
    
    79
    +### Issues
    
    80
    +  * [[Evolution 1038]](https://gitlab.com/ultreiaio/ird-observe/issues/1038) **[PS] Ajout de racourcis clavier sur le formulaire des systèmes observés** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
    
    81
    +
    
    70 82
     ## Version [7.0-RC-18](https://gitlab.com/ultreiaio/ird-observe/milestones/121)
    
    71 83
     
    
    72 84
     **Closed at 2018-09-12.**
    

  • client/src/main/java/fr/ird/observe/client/ui/ObserveKeyStrokes.java
    ... ... @@ -64,6 +64,8 @@ public abstract class ObserveKeyStrokes {
    64 64
         public static final KeyStroke KEY_STROKE_NAVIGATION_CONFIGURE = KeyStroke.getKeyStroke("ctrl pressed F1");
    
    65 65
         public static final KeyStroke KEY_STROKE_SHOW_SEINE = KeyStroke.getKeyStroke("ctrl pressed F2");
    
    66 66
         public static final KeyStroke KEY_STROKE_SHOW_LONGLINE = KeyStroke.getKeyStroke("ctrl pressed F3");
    
    67
    +    public static final KeyStroke KEY_STROKE_SHOW_LONGLINE_OBS = KeyStroke.getKeyStroke("ctrl pressed F2");
    
    68
    +    public static final KeyStroke KEY_STROKE_SHOW_LONGLINE_LOGBOOK = KeyStroke.getKeyStroke("ctrl pressed F3");
    
    67 69
         public static final KeyStroke KEY_STROKE_SHOW_REFERENTIAL = KeyStroke.getKeyStroke("ctrl pressed F4");
    
    68 70
         public static final KeyStroke KEY_STROKE_SHOW_EMPTY_PROGRAM = KeyStroke.getKeyStroke("ctrl pressed F5");
    
    69 71
         public static final KeyStroke KEY_STROKE_CONFIGURE_LOCAL_SOURCE = KeyStroke.getKeyStroke("ctrl pressed L");
    

  • client/src/main/java/fr/ird/observe/client/ui/content/data/longline/TripLonglineUIHandler.java
    ... ... @@ -119,7 +119,8 @@ class TripLonglineUIHandler extends ContentOpenableUIHandler<TripLonglineDto, Tr
    119 119
     
    
    120 120
             tripMap.getHandler().setConfig(config);
    
    121 121
             tripMap.getHandler().init(ui.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW));
    
    122
    -
    
    122
    +        tripMap.addPropertyChangeListener(TripMapUI.PROPERTY_SHOW_OBSERVATION, e -> updateMapModel());
    
    123
    +        tripMap.addPropertyChangeListener(TripMapUI.PROPERTY_SHOW_LOGBOOK, e -> updateMapModel());
    
    123 124
             getUi().getMainTabbedPane().addChangeListener(e -> {
    
    124 125
                 JTabbedPane tripLonglineTabPane = (JTabbedPane) e.getSource();
    
    125 126
                 TripLonglineUI ui1 = getUi();
    
    ... ... @@ -128,17 +129,7 @@ class TripLonglineUIHandler extends ContentOpenableUIHandler<TripLonglineDto, Tr
    128 129
                     ui1.getActions().setVisible(false);
    
    129 130
     
    
    130 131
                     if (buildTripMap) {
    
    131
    -                    SwingUtilities.invokeLater(() -> {
    
    132
    -                        ObserveSwingApplicationContext.get().getMainUI().getModel().setBusy(true);
    
    133
    -                        try {
    
    134
    -                            TripLonglineUI ui11 = getUi();
    
    135
    -                            TripMapUI tripMap11 = ui11.getTripMap();
    
    136
    -                            TripMapDto tripLonglineMap = getTripLonglineService().getTripLonglineMap(getSelectedId());
    
    137
    -                            tripMap11.getHandler().doOpenMap(tripLonglineMap);
    
    138
    -                        } finally {
    
    139
    -                            ObserveSwingApplicationContext.get().getMainUI().getModel().setBusy(false);
    
    140
    -                        }
    
    141
    -                    });
    
    132
    +                    buildTripMap();
    
    142 133
                         buildTripMap = false;
    
    143 134
                     }
    
    144 135
     
    
    ... ... @@ -156,6 +147,28 @@ class TripLonglineUIHandler extends ContentOpenableUIHandler<TripLonglineDto, Tr
    156 147
             ui.getErrorTableModel().addTableModelListener(computeTabValidStateListener);
    
    157 148
         }
    
    158 149
     
    
    150
    +    private void buildTripMap() {
    
    151
    +        SwingUtilities.invokeLater(() -> {
    
    152
    +            ObserveSwingApplicationContext.get().getMainUI().getModel().setBusy(true);
    
    153
    +            try {
    
    154
    +                TripLonglineUI ui11 = getUi();
    
    155
    +                TripMapUI tripMap11 = ui11.getTripMap();
    
    156
    +                Boolean showObservation = tripMap11.isShowObservation();
    
    157
    +                Boolean showLogbook = tripMap11.isShowLogbook();
    
    158
    +                log.info(String.format("Ask to build map: show observation? %s, show logbook? %s", showObservation, showLogbook));
    
    159
    +                TripMapDto tripLonglineMap = getTripLonglineService().getTripLonglineMap(getSelectedId(), showObservation, showLogbook);
    
    160
    +                tripMap11.getHandler().doOpenMap(tripLonglineMap);
    
    161
    +            } finally {
    
    162
    +                ObserveSwingApplicationContext.get().getMainUI().getModel().setBusy(false);
    
    163
    +            }
    
    164
    +        });
    
    165
    +    }
    
    166
    +
    
    167
    +    private void updateMapModel() {
    
    168
    +        ui.getTripMap().getHandler().doCloseMap();
    
    169
    +        buildTripMap();
    
    170
    +    }
    
    171
    +
    
    159 172
         @Override
    
    160 173
         public void openUI() {
    
    161 174
             super.openUI();
    
    ... ... @@ -260,7 +273,6 @@ class TripLonglineUIHandler extends ContentOpenableUIHandler<TripLonglineDto, Tr
    260 273
     
    
    261 274
         @Override
    
    262 275
         protected int getOpenablePosition(String parentId, TripLonglineDto bean) {
    
    263
    -
    
    264 276
             return getTripLonglineService().getTripLonglinePositionInProgram(parentId, bean.getId());
    
    265 277
         }
    
    266 278
     
    

  • client/src/main/java/fr/ird/observe/client/ui/content/data/seine/TripSeineUIHandler.java
    ... ... @@ -89,6 +89,8 @@ class TripSeineUIHandler extends ContentOpenableUIHandler<TripSeineDto, TripSein
    89 89
             super.afterInit(ui);
    
    90 90
     
    
    91 91
             TripMapUI tripMap = ui.getTripMap();
    
    92
    +        tripMap.getConfig().setVisible(false);
    
    93
    +        SwingUtilities.invokeLater(tripMap::validate);
    
    92 94
             ClientConfig config = ObserveSwingApplicationContext.get().getConfig();
    
    93 95
     
    
    94 96
             tripMap.getHandler().setConfig(config);
    

  • client/src/main/java/fr/ird/observe/client/ui/util/tripMap/TripMapContentBuilder.java
    ... ... @@ -10,12 +10,12 @@ package fr.ird.observe.client.ui.util.tripMap;
    10 10
      * it under the terms of the GNU General Public License as
    
    11 11
      * published by the Free Software Foundation, either version 3 of the
    
    12 12
      * License, or (at your option) any later version.
    
    13
    - * 
    
    13
    + *
    
    14 14
      * This program is distributed in the hope that it will be useful,
    
    15 15
      * but WITHOUT ANY WARRANTY; without even the implied warranty of
    
    16 16
      * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    
    17 17
      * GNU General Public License for more details.
    
    18
    - * 
    
    18
    + *
    
    19 19
      * You should have received a copy of the GNU General Public
    
    20 20
      * License along with this program.  If not, see
    
    21 21
      * <http://www.gnu.org/licenses/gpl-3.0.html>.
    
    ... ... @@ -77,10 +77,12 @@ import static org.nuiton.i18n.I18n.t;
    77 77
     public class TripMapContentBuilder {
    
    78 78
     
    
    79 79
         public static final String TRIP_LINES_LAYER_NAME = "Trip lines";
    
    80
    -    public static final String TRIP_LONGLINE_FISHING_ZONE_LAYER_NAME = "Trip longline zone";
    
    81
    -    public static final String TRIP_LONGLINE_LINE_LAYER_NAME = "Trip longline line";
    
    80
    +    public static final String TRIP_LONGLINE_OBS_FISHING_ZONE_LAYER_NAME = "Trip longline obs zone";
    
    81
    +    public static final String TRIP_LONGLINE_OBS_LINE_LAYER_NAME = "Trip longline obs line";
    
    82
    +    public static final String TRIP_LONGLINE_LOGBOOK_FISHING_ZONE_LAYER_NAME = "Trip longline logbook zone";
    
    83
    +    public static final String TRIP_LONGLINE_LOGBOOK_LINE_LAYER_NAME = "Trip longline logbook line";
    
    82 84
         public static final String TRIP_POINTS_LAYER_NAME = "Trip points";
    
    83
    -
    
    85
    +    public static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("dd/MM");
    
    84 86
         protected static final Set<TripMapPointType> TRIP_MAP_POINT_TYPES_IN_LEGEND = ImmutableSet.of(
    
    85 87
                 TripMapPointType.seineActivityInHarbour,
    
    86 88
                 TripMapPointType.seineActivityWithFreeSchoolType,
    
    ... ... @@ -91,13 +93,18 @@ public class TripMapContentBuilder {
    91 93
                 TripMapPointType.longlineActivityObsWithHaulingStart,
    
    92 94
                 TripMapPointType.longlineActivityObsWithHaulingEnd,
    
    93 95
                 TripMapPointType.longlineActivityObsWithStation,
    
    94
    -            TripMapPointType.longlineActivityObsWithInteraction);
    
    95
    -
    
    96
    -    public static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("dd/MM");
    
    97
    -
    
    98
    -    protected StyledLayerDescriptor styledLayerDescriptor;
    
    96
    +            TripMapPointType.longlineActivityObsWithInteraction,
    
    97
    +            TripMapPointType.longlineActivityLogbookInHarbour,
    
    98
    +            TripMapPointType.longlineActivityLogbookWithSettingStart,
    
    99
    +            TripMapPointType.longlineActivityLogbookWithSettingEnd,
    
    100
    +            TripMapPointType.longlineActivityLogbookWithHaulingStart,
    
    101
    +            TripMapPointType.longlineActivityLogbookWithHaulingEnd,
    
    102
    +            TripMapPointType.longlineActivityLogbookWithStation,
    
    103
    +            TripMapPointType.longlineActivityLogbookWithInteraction
    
    104
    +    );
    
    99 105
         protected final MapContent mapContent;
    
    100 106
         protected final List<ObserveMapPaneLegendItem> legendItems;
    
    107
    +    protected StyledLayerDescriptor styledLayerDescriptor;
    
    101 108
     
    
    102 109
         public TripMapContentBuilder() {
    
    103 110
             mapContent = new MapContent();
    
    ... ... @@ -224,7 +231,7 @@ public class TripMapContentBuilder {
    224 231
     
    
    225 232
         }
    
    226 233
     
    
    227
    -    public void addLonglineFishingZone(List<TripMapPoint> tripMapPoints) throws FactoryException {
    
    234
    +    public void addLonglineObsFishingZone(List<TripMapPoint> tripMapPoints) throws FactoryException {
    
    228 235
             GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();
    
    229 236
     
    
    230 237
             SimpleFeatureTypeBuilder polygonFeatureTypeBuilder = new SimpleFeatureTypeBuilder();
    
    ... ... @@ -266,13 +273,61 @@ public class TripMapContentBuilder {
    266 273
             }
    
    267 274
     
    
    268 275
             if (!polygonsFeatures.isEmpty()) {
    
    269
    -            Style styleLines = findStyle(styledLayerDescriptor, TRIP_LONGLINE_FISHING_ZONE_LAYER_NAME, null);
    
    270
    -            Layer layerLines = new FeatureLayer(polygonsFeatures, styleLines, TRIP_LONGLINE_FISHING_ZONE_LAYER_NAME);
    
    276
    +            Style styleLines = findStyle(styledLayerDescriptor, TRIP_LONGLINE_OBS_FISHING_ZONE_LAYER_NAME, null);
    
    277
    +            Layer layerLines = new FeatureLayer(polygonsFeatures, styleLines, TRIP_LONGLINE_OBS_FISHING_ZONE_LAYER_NAME);
    
    278
    +            mapContent.addLayer(layerLines);
    
    279
    +        }
    
    280
    +    }
    
    281
    +
    
    282
    +    public void addLonglineLogbookFishingZone(List<TripMapPoint> tripMapPoints) throws FactoryException {
    
    283
    +        GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();
    
    284
    +
    
    285
    +        SimpleFeatureTypeBuilder polygonFeatureTypeBuilder = new SimpleFeatureTypeBuilder();
    
    286
    +        polygonFeatureTypeBuilder.setName("longlineFishingZoneBuilder");
    
    287
    +        polygonFeatureTypeBuilder.setCRS(CRS.decode("EPSG:4326", true));
    
    288
    +        polygonFeatureTypeBuilder.add("zone", Polygon.class);
    
    289
    +        polygonFeatureTypeBuilder.add("label", String.class);
    
    290
    +        polygonFeatureTypeBuilder.add("type", String.class);
    
    291
    +
    
    292
    +        SimpleFeatureType polygonFeatureType = polygonFeatureTypeBuilder.buildFeatureType();
    
    293
    +        SimpleFeatureBuilder polygonBuilder = new SimpleFeatureBuilder(polygonFeatureType);
    
    294
    +
    
    295
    +        DefaultFeatureCollection polygonsFeatures = new DefaultFeatureCollection();
    
    296
    +
    
    297
    +        for (int indexPoint = 3; indexPoint < tripMapPoints.size(); indexPoint++) {
    
    298
    +            if (tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.longlineActivityLogbookWithHaulingEnd)
    
    299
    +                    && tripMapPoints.get(indexPoint - 1).getType().equals(TripMapPointType.longlineActivityLogbookWithHaulingStart)
    
    300
    +                    && tripMapPoints.get(indexPoint - 2).getType().equals(TripMapPointType.longlineActivityLogbookWithSettingEnd)
    
    301
    +                    && tripMapPoints.get(indexPoint - 3).getType().equals(TripMapPointType.longlineActivityLogbookWithSettingStart)) {
    
    302
    +
    
    303
    +                Coordinate[] coordinates = {
    
    304
    +                        new Coordinate(tripMapPoints.get(indexPoint - 3).getLongitude(), tripMapPoints.get(indexPoint - 3).getLatitude()),
    
    305
    +                        new Coordinate(tripMapPoints.get(indexPoint - 2).getLongitude(), tripMapPoints.get(indexPoint - 2).getLatitude()),
    
    306
    +                        new Coordinate(tripMapPoints.get(indexPoint - 1).getLongitude(), tripMapPoints.get(indexPoint - 1).getLatitude()),
    
    307
    +                        new Coordinate(tripMapPoints.get(indexPoint).getLongitude(), tripMapPoints.get(indexPoint).getLatitude()),
    
    308
    +                        new Coordinate(tripMapPoints.get(indexPoint - 3).getLongitude(), tripMapPoints.get(indexPoint - 3).getLatitude())
    
    309
    +                };
    
    310
    +
    
    311
    +
    
    312
    +                Polygon polygon = geometryFactory.createPolygon(coordinates);
    
    313
    +                //polygon = (Polygon) polygon.convexHull(); // permet de transformer un poliqgone croisé en polygon convex
    
    314
    +                polygonBuilder.add(polygon);
    
    315
    +                polygonBuilder.add(DATE_FORMAT.format(tripMapPoints.get(indexPoint - 3).getTime()));
    
    316
    +                polygonBuilder.add("longlineFishingZone");
    
    317
    +                SimpleFeature feature = polygonBuilder.buildFeature(null);
    
    318
    +                polygonsFeatures.add(feature);
    
    319
    +
    
    320
    +            }
    
    321
    +        }
    
    322
    +
    
    323
    +        if (!polygonsFeatures.isEmpty()) {
    
    324
    +            Style styleLines = findStyle(styledLayerDescriptor, TRIP_LONGLINE_LOGBOOK_FISHING_ZONE_LAYER_NAME, null);
    
    325
    +            Layer layerLines = new FeatureLayer(polygonsFeatures, styleLines, TRIP_LONGLINE_LOGBOOK_FISHING_ZONE_LAYER_NAME);
    
    271 326
                 mapContent.addLayer(layerLines);
    
    272 327
             }
    
    273 328
         }
    
    274 329
     
    
    275
    -    public void addLonglineLine(List<TripMapPoint> tripMapPoints) throws FactoryException {
    
    330
    +    public void addLonglineObsLine(List<TripMapPoint> tripMapPoints) throws FactoryException {
    
    276 331
             GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();
    
    277 332
     
    
    278 333
             SimpleFeatureTypeBuilder lineFeatureTypeBuilder = new SimpleFeatureTypeBuilder();
    
    ... ... @@ -287,13 +342,14 @@ public class TripMapContentBuilder {
    287 342
             DefaultFeatureCollection linesFeatures = new DefaultFeatureCollection();
    
    288 343
     
    
    289 344
             List<Coordinate> defaultLineCoordinates = Lists.newLinkedList();
    
    290
    -
    
    345
    +        boolean found = false;
    
    291 346
             for (int indexPoint = 0; indexPoint < tripMapPoints.size(); indexPoint++) {
    
    292 347
                 if (indexPoint > 1 && tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.longlineActivityObsWithSettingEnd)
    
    293 348
                         && tripMapPoints.get(indexPoint - 1).getType().equals(TripMapPointType.longlineActivityObsWithSettingStart)
    
    294 349
                         || tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.longlineActivityObsWithHaulingEnd)
    
    295 350
                         && tripMapPoints.get(indexPoint - 1).getType().equals(TripMapPointType.longlineActivityObsWithHaulingStart)) {
    
    296 351
     
    
    352
    +                found = true;
    
    297 353
                     Coordinate[] coordinates = {
    
    298 354
                             new Coordinate(tripMapPoints.get(indexPoint - 1).getLongitude(), tripMapPoints.get(indexPoint - 1).getLatitude()),
    
    299 355
                             new Coordinate(tripMapPoints.get(indexPoint).getLongitude(), tripMapPoints.get(indexPoint).getLatitude()),
    
    ... ... @@ -332,34 +388,124 @@ public class TripMapContentBuilder {
    332 388
     
    
    333 389
             }
    
    334 390
     
    
    335
    -        Style styleLines = findStyle(styledLayerDescriptor, TRIP_LONGLINE_LINE_LAYER_NAME, null);
    
    391
    +        Style styleLines = findStyle(styledLayerDescriptor, TRIP_LONGLINE_OBS_LINE_LAYER_NAME, null);
    
    336 392
             if (!linesFeatures.isEmpty()) {
    
    337
    -            Layer layerLines = new FeatureLayer(linesFeatures, styleLines, TRIP_LONGLINE_LINE_LAYER_NAME);
    
    393
    +            Layer layerLines = new FeatureLayer(linesFeatures, styleLines, TRIP_LONGLINE_OBS_LINE_LAYER_NAME);
    
    338 394
                 mapContent.addLayer(layerLines);
    
    339 395
             }
    
    340 396
     
    
    341
    -        // add line in legend
    
    342
    -        LineString line = geometryFactory.createLineString(ObserveMapPaneLegendItem.lineCoordinates());
    
    343
    -        lineBuilder.add(line);
    
    344
    -        lineBuilder.add("setting");
    
    397
    +        if (found) {
    
    398
    +            // add line in legend
    
    399
    +            LineString line = geometryFactory.createLineString(ObserveMapPaneLegendItem.lineCoordinates());
    
    400
    +            lineBuilder.add(line);
    
    401
    +            lineBuilder.add("setting");
    
    345 402
     
    
    346
    -        ObserveMapPaneLegendItem legendTripDay = new ObserveMapPaneLegendItem(
    
    347
    -                lineBuilder.buildFeature(null),
    
    348
    -                styleLines,
    
    349
    -                t("observe.content.map.legend.setting"));
    
    350
    -        legendItems.add(legendTripDay);
    
    403
    +            ObserveMapPaneLegendItem legendTripDay = new ObserveMapPaneLegendItem(
    
    404
    +                    lineBuilder.buildFeature(null),
    
    405
    +                    styleLines,
    
    406
    +                    t("observe.content.map.legend.obs.setting"));
    
    407
    +            legendItems.add(legendTripDay);
    
    351 408
     
    
    352
    -        line = geometryFactory.createLineString(ObserveMapPaneLegendItem.lineCoordinates());
    
    353
    -        lineBuilder.add(line);
    
    354
    -        lineBuilder.add("hauling");
    
    409
    +            line = geometryFactory.createLineString(ObserveMapPaneLegendItem.lineCoordinates());
    
    410
    +            lineBuilder.add(line);
    
    411
    +            lineBuilder.add("hauling");
    
    355 412
     
    
    356
    -        legendTripDay = new ObserveMapPaneLegendItem(
    
    357
    -                lineBuilder.buildFeature(null),
    
    358
    -                styleLines,
    
    359
    -                t("observe.content.map.legend.hauling"));
    
    360
    -        legendItems.add(legendTripDay);
    
    413
    +            legendTripDay = new ObserveMapPaneLegendItem(
    
    414
    +                    lineBuilder.buildFeature(null),
    
    415
    +                    styleLines,
    
    416
    +                    t("observe.content.map.legend.obs.hauling"));
    
    417
    +            legendItems.add(legendTripDay);
    
    418
    +        }
    
    419
    +
    
    420
    +    }
    
    421
    +
    
    422
    +    public void addLonglineLogbookLine(List<TripMapPoint> tripMapPoints) throws FactoryException {
    
    423
    +        GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();
    
    424
    +
    
    425
    +        SimpleFeatureTypeBuilder lineFeatureTypeBuilder = new SimpleFeatureTypeBuilder();
    
    426
    +        lineFeatureTypeBuilder.setName("longlineSettingBuilder");
    
    427
    +        lineFeatureTypeBuilder.setCRS(CRS.decode("EPSG:4326", true));
    
    428
    +        lineFeatureTypeBuilder.add("line", LineString.class);
    
    429
    +        lineFeatureTypeBuilder.add("type", String.class);
    
    430
    +
    
    431
    +        SimpleFeatureType lineFeatureType = lineFeatureTypeBuilder.buildFeatureType();
    
    432
    +        SimpleFeatureBuilder lineBuilder = new SimpleFeatureBuilder(lineFeatureType);
    
    433
    +
    
    434
    +        DefaultFeatureCollection linesFeatures = new DefaultFeatureCollection();
    
    435
    +
    
    436
    +        List<Coordinate> defaultLineCoordinates = Lists.newLinkedList();
    
    437
    +        boolean found = false;
    
    438
    +        for (int indexPoint = 0; indexPoint < tripMapPoints.size(); indexPoint++) {
    
    439
    +            if (indexPoint > 1 && tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.longlineActivityLogbookWithSettingEnd)
    
    440
    +                    && tripMapPoints.get(indexPoint - 1).getType().equals(TripMapPointType.longlineActivityLogbookWithSettingStart)
    
    441
    +                    || tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.longlineActivityLogbookWithHaulingEnd)
    
    442
    +                    && tripMapPoints.get(indexPoint - 1).getType().equals(TripMapPointType.longlineActivityLogbookWithHaulingStart)) {
    
    443
    +                found = true;
    
    444
    +                Coordinate[] coordinates = {
    
    445
    +                        new Coordinate(tripMapPoints.get(indexPoint - 1).getLongitude(), tripMapPoints.get(indexPoint - 1).getLatitude()),
    
    446
    +                        new Coordinate(tripMapPoints.get(indexPoint).getLongitude(), tripMapPoints.get(indexPoint).getLatitude()),
    
    447
    +                };
    
    448
    +
    
    449
    +                boolean setting = tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.longlineActivityLogbookWithSettingEnd);
    
    450
    +                LineString lineString = geometryFactory.createLineString(coordinates);
    
    451
    +                lineBuilder.add(lineString);
    
    452
    +                lineBuilder.add(setting ? "setting" : "hauling");
    
    453
    +                SimpleFeature feature = lineBuilder.buildFeature(null);
    
    454
    +                linesFeatures.add(feature);
    
    455
    +
    
    456
    +                defaultLineCoordinates.clear();
    
    457
    +            }
    
    458
    +
    
    459
    +            if (!(tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.longlineActivityLogbookWithSettingEnd)
    
    460
    +                    || tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.longlineActivityLogbookWithHaulingStart))) {
    
    461
    +
    
    462
    +                defaultLineCoordinates.add(new Coordinate(tripMapPoints.get(indexPoint).getLongitude(), tripMapPoints.get(indexPoint).getLatitude()));
    
    463
    +
    
    464
    +            }
    
    465
    +
    
    466
    +            if ((tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.longlineActivityLogbookWithSettingStart)
    
    467
    +                    || indexPoint == tripMapPoints.size() - 1) && defaultLineCoordinates.size() > 1) {
    
    468
    +
    
    469
    +                LineString lineString = geometryFactory.createLineString(defaultLineCoordinates.toArray(new Coordinate[0]));
    
    470
    +                lineBuilder.add(lineString);
    
    471
    +                lineBuilder.add("trip");
    
    472
    +                SimpleFeature feature = lineBuilder.buildFeature(null);
    
    473
    +                linesFeatures.add(feature);
    
    474
    +
    
    475
    +                defaultLineCoordinates.clear();
    
    476
    +
    
    477
    +            }
    
    361 478
     
    
    362 479
     
    
    480
    +        }
    
    481
    +        if (found) {
    
    482
    +            Style styleLines = findStyle(styledLayerDescriptor, TRIP_LONGLINE_LOGBOOK_LINE_LAYER_NAME, null);
    
    483
    +            if (!linesFeatures.isEmpty()) {
    
    484
    +                Layer layerLines = new FeatureLayer(linesFeatures, styleLines, TRIP_LONGLINE_LOGBOOK_LINE_LAYER_NAME);
    
    485
    +                mapContent.addLayer(layerLines);
    
    486
    +            }
    
    487
    +
    
    488
    +            // add line in legend
    
    489
    +            LineString line = geometryFactory.createLineString(ObserveMapPaneLegendItem.lineCoordinates());
    
    490
    +            lineBuilder.add(line);
    
    491
    +            lineBuilder.add("setting");
    
    492
    +
    
    493
    +            ObserveMapPaneLegendItem legendTripDay = new ObserveMapPaneLegendItem(
    
    494
    +                    lineBuilder.buildFeature(null),
    
    495
    +                    styleLines,
    
    496
    +                    t("observe.content.map.legend.logbook.setting"));
    
    497
    +            legendItems.add(legendTripDay);
    
    498
    +
    
    499
    +            line = geometryFactory.createLineString(ObserveMapPaneLegendItem.lineCoordinates());
    
    500
    +            lineBuilder.add(line);
    
    501
    +            lineBuilder.add("hauling");
    
    502
    +
    
    503
    +            legendTripDay = new ObserveMapPaneLegendItem(
    
    504
    +                    lineBuilder.buildFeature(null),
    
    505
    +                    styleLines,
    
    506
    +                    t("observe.content.map.legend.logbook.hauling"));
    
    507
    +            legendItems.add(legendTripDay);
    
    508
    +        }
    
    363 509
         }
    
    364 510
     
    
    365 511
     
    

  • client/src/main/java/fr/ird/observe/client/ui/util/tripMap/TripMapUI.jaxx
    ... ... @@ -30,12 +30,20 @@
    30 30
       </import>
    
    31 31
     
    
    32 32
       <CardLayout id="contentLayout"/>
    
    33
    -  <JToolBar constraints="BorderLayout.NORTH">
    
    34
    -    <JButton id='zoomIt'/>
    
    35
    -    <JButton id='zoomPlus'/>
    
    36
    -    <JButton id='zoomMoins'/>
    
    37
    -    <JButton id='exportPng'/>
    
    38
    -  </JToolBar>
    
    33
    +  <Boolean id="showObservation" javaBean="true"/>
    
    34
    +  <Boolean id="showLogbook" javaBean="true"/>
    
    35
    +  <JPanel constraints="BorderLayout.NORTH" layout="{new BorderLayout()}">
    
    36
    +    <JToolBar constraints="BorderLayout.CENTER">
    
    37
    +      <JButton id='zoomIt'/>
    
    38
    +      <JButton id='zoomPlus'/>
    
    39
    +      <JButton id='zoomMoins'/>
    
    40
    +      <JButton id='exportPng'/>
    
    41
    +    </JToolBar>
    
    42
    +    <JPanel id="config" constraints="BorderLayout.SOUTH" layout="{new GridLayout(1,0)}">
    
    43
    +      <JCheckBox id="showObservationEditor" onItemStateChanged='setShowObservation(showObservationEditor.isSelected())'/>
    
    44
    +      <JCheckBox id="showLogbookEditor" onItemStateChanged='setShowLogbook(showLogbookEditor.isSelected())'/>
    
    45
    +    </JPanel>
    
    46
    +  </JPanel>
    
    39 47
     
    
    40 48
       <JPanel id="content" layout="{contentLayout}" constraints="BorderLayout.CENTER">
    
    41 49
         <JLabel id="waitLoadingLabel"/>
    

  • client/src/main/java/fr/ird/observe/client/ui/util/tripMap/TripMapUI.jcss
    ... ... @@ -42,3 +42,13 @@
    42 42
     #exportPng {
    
    43 43
       _observeAction:{ExportPngUIAction.ACTION_NAME};
    
    44 44
     }
    
    45
    +
    
    46
    +#showObservationEditor {
    
    47
    +  text: "observe.content.map.showObservation";
    
    48
    +  selected:{isShowObservation()};
    
    49
    +}
    
    50
    +
    
    51
    +#showLogbookEditor {
    
    52
    +  text: "observe.content.map.showLogbook";
    
    53
    +  selected:{isShowLogbook()};
    
    54
    +}
    \ No newline at end of file

  • client/src/main/java/fr/ird/observe/client/ui/util/tripMap/TripMapUIHandler.java
    ... ... @@ -10,12 +10,12 @@ package fr.ird.observe.client.ui.util.tripMap;
    10 10
      * it under the terms of the GNU General Public License as
    
    11 11
      * published by the Free Software Foundation, either version 3 of the
    
    12 12
      * License, or (at your option) any later version.
    
    13
    - * 
    
    13
    + *
    
    14 14
      * This program is distributed in the hope that it will be useful,
    
    15 15
      * but WITHOUT ANY WARRANTY; without even the implied warranty of
    
    16 16
      * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    
    17 17
      * GNU General Public License for more details.
    
    18
    - * 
    
    18
    + *
    
    19 19
      * You should have received a copy of the GNU General Public
    
    20 20
      * License along with this program.  If not, see
    
    21 21
      * <http://www.gnu.org/licenses/gpl-3.0.html>.
    
    ... ... @@ -26,13 +26,14 @@ import com.google.common.collect.Lists;
    26 26
     import fr.ird.observe.client.ObserveSwingApplicationContext;
    
    27 27
     import fr.ird.observe.client.ObserveSwingTechnicalException;
    
    28 28
     import fr.ird.observe.client.configuration.ClientConfig;
    
    29
    +import fr.ird.observe.client.ui.ObserveKeyStrokes;
    
    29 30
     import fr.ird.observe.client.ui.actions.tripMap.TripMapActionSupport;
    
    30 31
     import fr.ird.observe.client.ui.content.ObserveActionMap;
    
    31 32
     import fr.ird.observe.dto.data.TripMapDto;
    
    32 33
     import fr.ird.observe.dto.data.TripMapPoint;
    
    33 34
     import fr.ird.observe.spi.DtoModelClasses;
    
    34
    -import org.apache.logging.log4j.Logger;
    
    35 35
     import org.apache.logging.log4j.LogManager;
    
    36
    +import org.apache.logging.log4j.Logger;
    
    36 37
     import org.geotools.geometry.DirectPosition2D;
    
    37 38
     import org.geotools.geometry.jts.ReferencedEnvelope;
    
    38 39
     import org.geotools.swing.JMapPane;
    
    ... ... @@ -40,9 +41,12 @@ import org.geotools.swing.event.MapPaneEvent;
    40 41
     import org.geotools.swing.event.MapPaneListener;
    
    41 42
     import org.nuiton.jaxx.runtime.spi.UIHandler;
    
    42 43
     
    
    44
    +import javax.swing.AbstractAction;
    
    43 45
     import javax.swing.AbstractButton;
    
    46
    +import javax.swing.Action;
    
    44 47
     import javax.swing.InputMap;
    
    45 48
     import java.awt.Point;
    
    49
    +import java.awt.event.ActionEvent;
    
    46 50
     import java.awt.event.MouseEvent;
    
    47 51
     import java.awt.event.MouseListener;
    
    48 52
     import java.awt.event.MouseMotionListener;
    
    ... ... @@ -112,8 +116,10 @@ public class TripMapUIHandler implements UIHandler<TripMapUI> {
    112 116
     
    
    113 117
                 } else if (DtoModelClasses.isLonglineId(tripMapDto.getId())) {
    
    114 118
     
    
    115
    -                mapContentBuilder.addLonglineFishingZone(tripMapPoints);
    
    116
    -                mapContentBuilder.addLonglineLine(tripMapPoints);
    
    119
    +                mapContentBuilder.addLonglineObsFishingZone(tripMapPoints);
    
    120
    +                mapContentBuilder.addLonglineObsLine(tripMapPoints);
    
    121
    +                mapContentBuilder.addLonglineLogbookFishingZone(tripMapPoints);
    
    122
    +                mapContentBuilder.addLonglineLogbookLine(tripMapPoints);
    
    117 123
     
    
    118 124
                 }
    
    119 125
     
    
    ... ... @@ -205,6 +211,12 @@ public class TripMapUIHandler implements UIHandler<TripMapUI> {
    205 211
             mapPane.addMouseListener(mouseMapListener);
    
    206 212
             mapPane.addMapPaneListener(new TripMapListener());
    
    207 213
     
    
    214
    +        ui.addPropertyChangeListener("showObservation", e -> {
    
    215
    +
    
    216
    +        });
    
    217
    +        ui.addPropertyChangeListener("showLogbook", e -> {
    
    218
    +
    
    219
    +        });
    
    208 220
             rendererRunning = false;
    
    209 221
     
    
    210 222
         }
    
    ... ... @@ -217,6 +229,27 @@ public class TripMapUIHandler implements UIHandler<TripMapUI> {
    217 229
             init(actionMap, inputMap, ui.zoomPlus);
    
    218 230
             init(actionMap, inputMap, ui.exportPng);
    
    219 231
     
    
    232
    +        ui.getShowLogbookEditor().setText(ObserveKeyStrokes.suffixTextWithKeyStroke(ui.getShowLogbookEditor().getText(), ObserveKeyStrokes.KEY_STROKE_SHOW_LONGLINE_LOGBOOK));
    
    233
    +        ui.getShowObservationEditor().setText(ObserveKeyStrokes.suffixTextWithKeyStroke(ui.getShowObservationEditor().getText(), ObserveKeyStrokes.KEY_STROKE_SHOW_LONGLINE_OBS));
    
    234
    +
    
    235
    +        AbstractAction observationAction = new AbstractAction() {
    
    236
    +
    
    237
    +            @Override
    
    238
    +            public void actionPerformed(ActionEvent e) {
    
    239
    +                ui.setShowObservation(!ui.isShowObservation());
    
    240
    +            }
    
    241
    +        };
    
    242
    +        Action logbookAction = new AbstractAction() {
    
    243
    +
    
    244
    +            @Override
    
    245
    +            public void actionPerformed(ActionEvent e) {
    
    246
    +                ui.setShowLogbook(!ui.isShowLogbook());
    
    247
    +            }
    
    248
    +        };
    
    249
    +        inputMap.put(ObserveKeyStrokes.KEY_STROKE_SHOW_LONGLINE_OBS, "toggleObservation");
    
    250
    +        actionMap.put("toggleObservation", observationAction);
    
    251
    +        inputMap.put(ObserveKeyStrokes.KEY_STROKE_SHOW_LONGLINE_LOGBOOK, "toggleLogbook");
    
    252
    +        actionMap.put("toggleLogbook", logbookAction);
    
    220 253
         }
    
    221 254
     
    
    222 255
         public ReferencedEnvelope getTripArea() {
    
    ... ... @@ -235,8 +268,28 @@ public class TripMapUIHandler implements UIHandler<TripMapUI> {
    235 268
             this.zoomCenter = zoomCenter;
    
    236 269
         }
    
    237 270
     
    
    271
    +    protected void init(ObserveActionMap actionMap, InputMap inputMap, AbstractButton editor) {
    
    272
    +        String actionId = (String) editor.getClientProperty(OBSERVE_ACTION);
    
    273
    +
    
    274
    +        // on a trouve une action commune
    
    275
    +        TripMapActionSupport action = (TripMapActionSupport) actionMap.get(actionId);
    
    276
    +        Objects.requireNonNull(action, "action [" + actionId + "] not found for ui " + ui.getClass().getName());
    
    277
    +
    
    278
    +        if (log.isDebugEnabled()) {
    
    279
    +            log.debug("init common action " + actionId);
    
    280
    +        }
    
    281
    +
    
    282
    +        action.setUi(ui);
    
    283
    +        action.initForMainUi(editor, inputMap, actionMap);
    
    284
    +
    
    285
    +    }
    
    286
    +
    
    238 287
         private class MouseMapListener implements MouseWheelListener, MouseListener, MouseMotionListener {
    
    239 288
     
    
    289
    +        Point2D startPointInWorld;
    
    290
    +        AffineTransform startScreenToWorldTransform;
    
    291
    +        ReferencedEnvelope startDisplayArea;
    
    292
    +
    
    240 293
             @Override
    
    241 294
             public void mouseWheelMoved(MouseWheelEvent e) {
    
    242 295
                 int notches = e.getWheelRotation();
    
    ... ... @@ -250,10 +303,6 @@ public class TripMapUIHandler implements UIHandler<TripMapUI> {
    250 303
     
    
    251 304
             }
    
    252 305
     
    
    253
    -        Point2D startPointInWorld;
    
    254
    -        AffineTransform startScreenToWorldTransform;
    
    255
    -        ReferencedEnvelope startDisplayArea;
    
    256
    -
    
    257 306
             @Override
    
    258 307
             public void mousePressed(MouseEvent e) {
    
    259 308
                 if (e.getButton() == MouseEvent.BUTTON1) {
    
    ... ... @@ -360,20 +409,4 @@ public class TripMapUIHandler implements UIHandler<TripMapUI> {
    360 409
             }
    
    361 410
         }
    
    362 411
     
    
    363
    -    protected void init(ObserveActionMap actionMap, InputMap inputMap, AbstractButton editor) {
    
    364
    -        String actionId = (String) editor.getClientProperty(OBSERVE_ACTION);
    
    365
    -
    
    366
    -        // on a trouve une action commune
    
    367
    -        TripMapActionSupport action = (TripMapActionSupport) actionMap.get(actionId);
    
    368
    -        Objects.requireNonNull(action, "action [" + actionId + "] not found for ui " + ui.getClass().getName());
    
    369
    -
    
    370
    -        if (log.isDebugEnabled()) {
    
    371
    -            log.debug("init common action " + actionId);
    
    372
    -        }
    
    373
    -
    
    374
    -        action.setUi(ui);
    
    375
    -        action.initForMainUi(editor, inputMap, actionMap);
    
    376
    -
    
    377
    -    }
    
    378
    -
    
    379 412
     }

  • client/src/main/map/style.xml
    ... ... @@ -88,7 +88,7 @@
    88 88
       </NamedLayer>
    
    89 89
     
    
    90 90
       <NamedLayer>
    
    91
    -    <Name>Trip longline zone</Name>
    
    91
    +    <Name>Trip longline obs zone</Name>
    
    92 92
         <UserStyle>
    
    93 93
           <IsDefault>true</IsDefault>
    
    94 94
           <Title>SLD Cook Book: Simple Line</Title>
    
    ... ... @@ -128,7 +128,47 @@
    128 128
       </NamedLayer>
    
    129 129
     
    
    130 130
       <NamedLayer>
    
    131
    -    <Name>Trip longline line</Name>
    
    131
    +    <Name>Trip longline logbook zone</Name>
    
    132
    +    <UserStyle>
    
    133
    +      <IsDefault>true</IsDefault>
    
    134
    +      <Title>SLD Cook Book: Simple Line</Title>
    
    135
    +      <FeatureTypeStyle>
    
    136
    +        <Rule>
    
    137
    +          <Name>Trip day</Name>
    
    138
    +          <PolygonSymbolizer>
    
    139
    +            <Fill>
    
    140
    +              <CssParameter name="fill">#220080</CssParameter>
    
    141
    +              <CssParameter name="fill-opacity">0.5</CssParameter>
    
    142
    +            </Fill>
    
    143
    +          </PolygonSymbolizer>
    
    144
    +          <TextSymbolizer>
    
    145
    +            <Label>
    
    146
    +              <ogc:PropertyName>label</ogc:PropertyName>
    
    147
    +            </Label>
    
    148
    +            <Font>
    
    149
    +              <CssParameter name="font-size">16</CssParameter>
    
    150
    +              <CssParameter name="font-style">normal</CssParameter>
    
    151
    +              <CssParameter name="font-weight">bold</CssParameter>
    
    152
    +            </Font>
    
    153
    +            <LabelPlacement>
    
    154
    +              <PointPlacement>
    
    155
    +                <AnchorPoint>
    
    156
    +                  <AnchorPointX>0.5</AnchorPointX>
    
    157
    +                  <AnchorPointY>0.5</AnchorPointY>
    
    158
    +                </AnchorPoint>
    
    159
    +              </PointPlacement>
    
    160
    +            </LabelPlacement>
    
    161
    +            <Fill>
    
    162
    +              <CssParameter name="fill">#220000</CssParameter>
    
    163
    +            </Fill>
    
    164
    +          </TextSymbolizer>
    
    165
    +        </Rule>
    
    166
    +      </FeatureTypeStyle>
    
    167
    +    </UserStyle>
    
    168
    +  </NamedLayer>
    
    169
    +
    
    170
    +  <NamedLayer>
    
    171
    +    <Name>Trip longline obs line</Name>
    
    132 172
         <UserStyle>
    
    133 173
           <IsDefault>true</IsDefault>
    
    134 174
           <Title>SLD Cook Book: Simple Line</Title>
    
    ... ... @@ -187,6 +227,66 @@
    187 227
         </UserStyle>
    
    188 228
       </NamedLayer>
    
    189 229
     
    
    230
    +  <NamedLayer>
    
    231
    +    <Name>Trip longline logbook line</Name>
    
    232
    +    <UserStyle>
    
    233
    +      <IsDefault>true</IsDefault>
    
    234
    +      <Title>SLD Cook Book: Simple Line</Title>
    
    235
    +      <FeatureTypeStyle>
    
    236
    +        <Rule>
    
    237
    +          <Name>Trip</Name>
    
    238
    +          <ogc:Filter>
    
    239
    +            <ogc:PropertyIsEqualTo>
    
    240
    +              <ogc:PropertyName>type</ogc:PropertyName>
    
    241
    +              <ogc:Literal>trip</ogc:Literal>
    
    242
    +            </ogc:PropertyIsEqualTo>
    
    243
    +          </ogc:Filter>
    
    244
    +          <LineSymbolizer>
    
    245
    +            <Stroke>
    
    246
    +              <CssParameter name="stroke">#222222</CssParameter>
    
    247
    +              <CssParameter name="stroke-width">3</CssParameter>
    
    248
    +              <CssParameter name="stroke-dasharray">5 7</CssParameter>
    
    249
    +            </Stroke>
    
    250
    +          </LineSymbolizer>
    
    251
    +        </Rule>
    
    252
    +      </FeatureTypeStyle>
    
    253
    +      <FeatureTypeStyle>
    
    254
    +        <Rule>
    
    255
    +          <Name>setting</Name>
    
    256
    +          <ogc:Filter>
    
    257
    +            <ogc:PropertyIsEqualTo>
    
    258
    +              <ogc:PropertyName>type</ogc:PropertyName>
    
    259
    +              <ogc:Literal>setting</ogc:Literal>
    
    260
    +            </ogc:PropertyIsEqualTo>
    
    261
    +          </ogc:Filter>
    
    262
    +          <LineSymbolizer>
    
    263
    +            <Stroke>
    
    264
    +              <CssParameter name="stroke">#00ff00</CssParameter>
    
    265
    +              <CssParameter name="stroke-width">4</CssParameter>
    
    266
    +            </Stroke>
    
    267
    +          </LineSymbolizer>
    
    268
    +        </Rule>
    
    269
    +      </FeatureTypeStyle>
    
    270
    +      <FeatureTypeStyle>
    
    271
    +        <Rule>
    
    272
    +          <Name>hauling</Name>
    
    273
    +          <ogc:Filter>
    
    274
    +            <ogc:PropertyIsEqualTo>
    
    275
    +              <ogc:PropertyName>type</ogc:PropertyName>
    
    276
    +              <ogc:Literal>hauling</ogc:Literal>
    
    277
    +            </ogc:PropertyIsEqualTo>
    
    278
    +          </ogc:Filter>
    
    279
    +          <LineSymbolizer>
    
    280
    +            <Stroke>
    
    281
    +              <CssParameter name="stroke">#ff0000</CssParameter>
    
    282
    +              <CssParameter name="stroke-width">4</CssParameter>
    
    283
    +            </Stroke>
    
    284
    +          </LineSymbolizer>
    
    285
    +        </Rule>
    
    286
    +      </FeatureTypeStyle>
    
    287
    +    </UserStyle>
    
    288
    +  </NamedLayer>
    
    289
    +
    
    190 290
     
    
    191 291
       <NamedLayer>
    
    192 292
         <Name>Trip points</Name>
    
    ... ... @@ -527,6 +627,259 @@
    527 627
               </TextSymbolizer>
    
    528 628
             </Rule>
    
    529 629
           </FeatureTypeStyle>
    
    630
    +      <FeatureTypeStyle>
    
    631
    +        <Rule>
    
    632
    +          <Name>Point longline activity Logbook with setting start</Name>
    
    633
    +          <ogc:Filter>
    
    634
    +            <ogc:PropertyIsEqualTo>
    
    635
    +              <ogc:PropertyName>pointType</ogc:PropertyName>
    
    636
    +              <ogc:Literal>longlineActivityLogbookWithSettingStart</ogc:Literal>
    
    637
    +            </ogc:PropertyIsEqualTo>
    
    638
    +          </ogc:Filter>
    
    639
    +          <PointSymbolizer>
    
    640
    +            <Graphic>
    
    641
    +              <Mark>
    
    642
    +                <WellKnownName>Triangle</WellKnownName>
    
    643
    +                <Fill>
    
    644
    +                  <CssParameter name="fill">#00FF00</CssParameter>
    
    645
    +                </Fill>
    
    646
    +                <Stroke>
    
    647
    +                  <CssParameter name="stroke">#000000</CssParameter>
    
    648
    +                  <CssParameter name="stroke-width">3</CssParameter>
    
    649
    +                </Stroke>
    
    650
    +              </Mark>
    
    651
    +              <Size>16</Size>
    
    652
    +            </Graphic>
    
    653
    +          </PointSymbolizer>
    
    654
    +        </Rule>
    
    655
    +      </FeatureTypeStyle>
    
    656
    +
    
    657
    +
    
    658
    +      <FeatureTypeStyle>
    
    659
    +        <Rule>
    
    660
    +          <Name>Point longline activity Logbook with setting end</Name>
    
    661
    +          <ogc:Filter>
    
    662
    +            <ogc:PropertyIsEqualTo>
    
    663
    +              <ogc:PropertyName>pointType</ogc:PropertyName>
    
    664
    +              <ogc:Literal>longlineActivityLogbookWithSettingEnd</ogc:Literal>
    
    665
    +            </ogc:PropertyIsEqualTo>
    
    666
    +          </ogc:Filter>
    
    667
    +          <PointSymbolizer>
    
    668
    +            <Graphic>
    
    669
    +              <Mark>
    
    670
    +                <WellKnownName>X</WellKnownName>
    
    671
    +                <Fill>
    
    672
    +                  <CssParameter name="fill">#00FF00</CssParameter>
    
    673
    +                </Fill>
    
    674
    +                <Stroke>
    
    675
    +                  <CssParameter name="stroke">#000000</CssParameter>
    
    676
    +                  <CssParameter name="stroke-width">3</CssParameter>
    
    677
    +                </Stroke>
    
    678
    +              </Mark>
    
    679
    +              <Size>14</Size>
    
    680
    +            </Graphic>
    
    681
    +          </PointSymbolizer>
    
    682
    +        </Rule>
    
    683
    +      </FeatureTypeStyle>
    
    684
    +
    
    685
    +
    
    686
    +      <FeatureTypeStyle>
    
    687
    +        <Rule>
    
    688
    +          <Name>Point longline activity Logbook with hauling start</Name>
    
    689
    +          <ogc:Filter>
    
    690
    +            <ogc:PropertyIsEqualTo>
    
    691
    +              <ogc:PropertyName>pointType</ogc:PropertyName>
    
    692
    +              <ogc:Literal>longlineActivityLogbookWithHaulingStart</ogc:Literal>
    
    693
    +            </ogc:PropertyIsEqualTo>
    
    694
    +          </ogc:Filter>
    
    695
    +          <PointSymbolizer>
    
    696
    +            <Graphic>
    
    697
    +              <Mark>
    
    698
    +                <WellKnownName>Triangle</WellKnownName>
    
    699
    +                <Fill>
    
    700
    +                  <CssParameter name="fill">#FF0000</CssParameter>
    
    701
    +                </Fill>
    
    702
    +                <Stroke>
    
    703
    +                  <CssParameter name="stroke">#000000</CssParameter>
    
    704
    +                  <CssParameter name="stroke-width">3</CssParameter>
    
    705
    +                </Stroke>
    
    706
    +              </Mark>
    
    707
    +              <Size>16</Size>
    
    708
    +            </Graphic>
    
    709
    +          </PointSymbolizer>
    
    710
    +        </Rule>
    
    711
    +      </FeatureTypeStyle>
    
    712
    +
    
    713
    +      <FeatureTypeStyle>
    
    714
    +        <Rule>
    
    715
    +          <Name>Point longline activity Logbook with hauling end</Name>
    
    716
    +          <ogc:Filter>
    
    717
    +            <ogc:PropertyIsEqualTo>
    
    718
    +              <ogc:PropertyName>pointType</ogc:PropertyName>
    
    719
    +              <ogc:Literal>longlineActivityLogbookWithHaulingEnd</ogc:Literal>
    
    720
    +            </ogc:PropertyIsEqualTo>
    
    721
    +          </ogc:Filter>
    
    722
    +          <PointSymbolizer>
    
    723
    +            <Graphic>
    
    724
    +              <Mark>
    
    725
    +                <WellKnownName>X</WellKnownName>
    
    726
    +                <Fill>
    
    727
    +                  <CssParameter name="fill">#FF0000</CssParameter>
    
    728
    +                </Fill>
    
    729
    +                <Stroke>
    
    730
    +                  <CssParameter name="stroke">#000000</CssParameter>
    
    731
    +                  <CssParameter name="stroke-width">3</CssParameter>
    
    732
    +                </Stroke>
    
    733
    +              </Mark>
    
    734
    +              <Size>14</Size>
    
    735
    +            </Graphic>
    
    736
    +          </PointSymbolizer>
    
    737
    +        </Rule>
    
    738
    +      </FeatureTypeStyle>
    
    739
    +
    
    740
    +      <FeatureTypeStyle>
    
    741
    +        <Rule>
    
    742
    +          <Name>Point longline activity Logbook in harbour</Name>
    
    743
    +          <ogc:Filter>
    
    744
    +            <ogc:PropertyIsEqualTo>
    
    745
    +              <ogc:PropertyName>pointType</ogc:PropertyName>
    
    746
    +              <ogc:Literal>longlineActivityLogbookInHarbour</ogc:Literal>
    
    747
    +            </ogc:PropertyIsEqualTo>
    
    748
    +          </ogc:Filter>
    
    749
    +          <PointSymbolizer>
    
    750
    +            <Graphic>
    
    751
    +              <Mark>
    
    752
    +                <WellKnownName>Circle</WellKnownName>
    
    753
    +                <Fill>
    
    754
    +                  <CssParameter name="fill">#7800f6</CssParameter>
    
    755
    +                </Fill>
    
    756
    +                <Stroke>
    
    757
    +                  <CssParameter name="stroke">#000000</CssParameter>
    
    758
    +                  <CssParameter name="stroke-width">3</CssParameter>
    
    759
    +                </Stroke>
    
    760
    +              </Mark>
    
    761
    +              <Size>12</Size>
    
    762
    +            </Graphic>
    
    763
    +          </PointSymbolizer>
    
    764
    +          <TextSymbolizer>
    
    765
    +            <Label>
    
    766
    +              <ogc:PropertyName>label</ogc:PropertyName>
    
    767
    +            </Label>
    
    768
    +            <Font>
    
    769
    +              <CssParameter name="font-size">14</CssParameter>
    
    770
    +              <CssParameter name="font-style">normal</CssParameter>
    
    771
    +              <CssParameter name="font-weight">bold</CssParameter>
    
    772
    +            </Font>
    
    773
    +            <LabelPlacement>
    
    774
    +              <PointPlacement>
    
    775
    +                <Displacement>
    
    776
    +                  <DisplacementX>5</DisplacementX>
    
    777
    +                  <DisplacementY>5</DisplacementY>
    
    778
    +                </Displacement>
    
    779
    +              </PointPlacement>
    
    780
    +            </LabelPlacement>
    
    781
    +            <Fill>
    
    782
    +              <CssParameter name="fill">#000000</CssParameter>
    
    783
    +            </Fill>
    
    784
    +          </TextSymbolizer>
    
    785
    +        </Rule>
    
    786
    +      </FeatureTypeStyle>
    
    787
    +
    
    788
    +      <FeatureTypeStyle>
    
    789
    +        <Rule>
    
    790
    +          <Name>Point longline activity Logbook with interaction</Name>
    
    791
    +          <ogc:Filter>
    
    792
    +            <ogc:PropertyIsEqualTo>
    
    793
    +              <ogc:PropertyName>pointType</ogc:PropertyName>
    
    794
    +              <ogc:Literal>longlineActivityLogbookWithInteraction</ogc:Literal>
    
    795
    +            </ogc:PropertyIsEqualTo>
    
    796
    +          </ogc:Filter>
    
    797
    +          <PointSymbolizer>
    
    798
    +            <Graphic>
    
    799
    +              <Mark>
    
    800
    +                <WellKnownName>Circle</WellKnownName>
    
    801
    +                <Fill>
    
    802
    +                  <CssParameter name="fill">#FFFF00</CssParameter>
    
    803
    +                </Fill>
    
    804
    +                <Stroke>
    
    805
    +                  <CssParameter name="stroke">#000000</CssParameter>
    
    806
    +                  <CssParameter name="stroke-width">3</CssParameter>
    
    807
    +                </Stroke>
    
    808
    +              </Mark>
    
    809
    +              <Size>12</Size>
    
    810
    +            </Graphic>
    
    811
    +          </PointSymbolizer>
    
    812
    +          <TextSymbolizer>
    
    813
    +            <Label>
    
    814
    +              <ogc:PropertyName>label</ogc:PropertyName>
    
    815
    +            </Label>
    
    816
    +            <Font>
    
    817
    +              <CssParameter name="font-size">14</CssParameter>
    
    818
    +              <CssParameter name="font-style">normal</CssParameter>
    
    819
    +              <CssParameter name="font-weight">bold</CssParameter>
    
    820
    +            </Font>
    
    821
    +            <LabelPlacement>
    
    822
    +              <PointPlacement>
    
    823
    +                <Displacement>
    
    824
    +                  <DisplacementX>5</DisplacementX>
    
    825
    +                  <DisplacementY>5</DisplacementY>
    
    826
    +                </Displacement>
    
    827
    +              </PointPlacement>
    
    828
    +            </LabelPlacement>
    
    829
    +            <Fill>
    
    830
    +              <CssParameter name="fill">#000000</CssParameter>
    
    831
    +            </Fill>
    
    832
    +          </TextSymbolizer>
    
    833
    +        </Rule>
    
    834
    +      </FeatureTypeStyle>
    
    835
    +
    
    836
    +      <FeatureTypeStyle>
    
    837
    +        <Rule>
    
    838
    +          <Name>Point longline activity Logbook with station</Name>
    
    839
    +          <ogc:Filter>
    
    840
    +            <ogc:PropertyIsEqualTo>
    
    841
    +              <ogc:PropertyName>pointType</ogc:PropertyName>
    
    842
    +              <ogc:Literal>longlineActivityLogbookWithStation</ogc:Literal>
    
    843
    +            </ogc:PropertyIsEqualTo>
    
    844
    +          </ogc:Filter>
    
    845
    +          <PointSymbolizer>
    
    846
    +            <Graphic>
    
    847
    +              <Mark>
    
    848
    +                <WellKnownName>star</WellKnownName>
    
    849
    +                <Fill>
    
    850
    +                  <CssParameter name="fill">#FFFF00</CssParameter>
    
    851
    +                </Fill>
    
    852
    +                <Stroke>
    
    853
    +                  <CssParameter name="stroke">#000000</CssParameter>
    
    854
    +                  <CssParameter name="stroke-width">3</CssParameter>
    
    855
    +                </Stroke>
    
    856
    +              </Mark>
    
    857
    +              <Size>16</Size>
    
    858
    +            </Graphic>
    
    859
    +          </PointSymbolizer>
    
    860
    +          <TextSymbolizer>
    
    861
    +            <Label>
    
    862
    +              <ogc:PropertyName>label</ogc:PropertyName>
    
    863
    +            </Label>
    
    864
    +            <Font>
    
    865
    +              <CssParameter name="font-size">14</CssParameter>
    
    866
    +              <CssParameter name="font-style">normal</CssParameter>
    
    867
    +              <CssParameter name="font-weight">bold</CssParameter>
    
    868
    +            </Font>
    
    869
    +            <LabelPlacement>
    
    870
    +              <PointPlacement>
    
    871
    +                <Displacement>
    
    872
    +                  <DisplacementX>5</DisplacementX>
    
    873
    +                  <DisplacementY>5</DisplacementY>
    
    874
    +                </Displacement>
    
    875
    +              </PointPlacement>
    
    876
    +            </LabelPlacement>
    
    877
    +            <Fill>
    
    878
    +              <CssParameter name="fill">#000000</CssParameter>
    
    879
    +            </Fill>
    
    880
    +          </TextSymbolizer>
    
    881
    +        </Rule>
    
    882
    +      </FeatureTypeStyle>
    
    530 883
     
    
    531 884
         </UserStyle>
    
    532 885
       </NamedLayer>
    

  • client/src/main/resources/i18n/client_en_GB.properties
    ... ... @@ -1497,7 +1497,7 @@ observe.constant.StorageStep.CONFIG_REFERENTIEL.description=Configurer referenti
    1497 1497
     observe.constant.StorageStep.CONFIRM=Summary
    
    1498 1498
     observe.constant.StorageStep.CONFIRM.description=Summary of operations to perform
    
    1499 1499
     observe.constant.StorageStep.ROLES=Security
    
    1500
    -observe.constant.StorageStep.ROLES.description=Applya security on database roles
    
    1500
    +observe.constant.StorageStep.ROLES.description=Apply security on database roles
    
    1501 1501
     observe.constant.StorageStep.SELECT_DATA=Data selection
    
    1502 1502
     observe.constant.StorageStep.SELECT_DATA.description=Select data to export in backup
    
    1503 1503
     observe.content.map.action.exportPng=Export
    
    ... ... @@ -1513,12 +1513,16 @@ observe.content.map.export.chooseFile.ok=Exporter
    1513 1513
     observe.content.map.export.chooseFile.png=PNG image
    
    1514 1514
     observe.content.map.export.chooseFile.title=Export map
    
    1515 1515
     observe.content.map.export.success=Map exported (%s)
    
    1516
    -observe.content.map.legend.hauling=Hauling
    
    1517
    -observe.content.map.legend.setting=setting
    
    1516
    +observe.content.map.legend.logbook.hauling=Logbook - Hauling
    
    1517
    +observe.content.map.legend.logbook.setting=Logbook - setting
    
    1518
    +observe.content.map.legend.obs.hauling=Observation - Hauling
    
    1519
    +observe.content.map.legend.obs.setting=Observation - setting
    
    1518 1520
     observe.content.map.legend.tripBetweenTwoDays=Trip between two days
    
    1519 1521
     observe.content.map.legend.tripDay=Day trip
    
    1520 1522
     observe.content.map.miles=miles
    
    1521 1523
     observe.content.map.north=North
    
    1524
    +observe.content.map.showLogbook=Show Logbook data
    
    1525
    +observe.content.map.showObservation=Show Observation data
    
    1522 1526
     observe.content.map.south=South
    
    1523 1527
     observe.content.map.waitLoading=< Please wait while loading the map >
    
    1524 1528
     observe.content.map.west=West
    

  • client/src/main/resources/i18n/client_es_ES.properties
    ... ... @@ -1513,12 +1513,16 @@ observe.content.map.export.chooseFile.ok=Exportar
    1513 1513
     observe.content.map.export.chooseFile.png=imagen PNG
    
    1514 1514
     observe.content.map.export.chooseFile.title=Exportar el mapa
    
    1515 1515
     observe.content.map.export.success=Mapa exportada (%s)
    
    1516
    -observe.content.map.legend.hauling=Arrastre
    
    1517
    -observe.content.map.legend.setting=Calada
    
    1516
    +observe.content.map.legend.logbook.hauling=Logbook - Arrastre
    
    1517
    +observe.content.map.legend.logbook.setting=Logbook - Calada
    
    1518
    +observe.content.map.legend.obs.hauling=Observation - Arrastre
    
    1519
    +observe.content.map.legend.obs.setting=Observation - Calada
    
    1518 1520
     observe.content.map.legend.tripBetweenTwoDays=Trayecto entre dos días
    
    1519 1521
     observe.content.map.legend.tripDay=Trayecto del día
    
    1520 1522
     observe.content.map.miles=milles
    
    1521 1523
     observe.content.map.north=Norte
    
    1524
    +observe.content.map.showLogbook=Show Logbook data \#TODO
    
    1525
    +observe.content.map.showObservation=Show Observation data \#TODO
    
    1522 1526
     observe.content.map.south=Sur
    
    1523 1527
     observe.content.map.waitLoading=< Espere mientras que el mapa se está cargando >
    
    1524 1528
     observe.content.map.west=Oeste
    

  • client/src/main/resources/i18n/client_fr_FR.properties
    ... ... @@ -1513,12 +1513,16 @@ observe.content.map.export.chooseFile.ok=Exporter
    1513 1513
     observe.content.map.export.chooseFile.png=image PNG
    
    1514 1514
     observe.content.map.export.chooseFile.title=Exporter la carte
    
    1515 1515
     observe.content.map.export.success=Carte exportée (%s)
    
    1516
    -observe.content.map.legend.hauling=Virage
    
    1517
    -observe.content.map.legend.setting=Filage
    
    1516
    +observe.content.map.legend.logbook.hauling=Livre de bord - Virage
    
    1517
    +observe.content.map.legend.logbook.setting=Livre de bord - Filage
    
    1518
    +observe.content.map.legend.obs.hauling=Observation - Virage
    
    1519
    +observe.content.map.legend.obs.setting=Observation - Filage
    
    1518 1520
     observe.content.map.legend.tripBetweenTwoDays=Trajet entre deux jours
    
    1519 1521
     observe.content.map.legend.tripDay=Trajet d'une journée
    
    1520 1522
     observe.content.map.miles=milles
    
    1521 1523
     observe.content.map.north=Nord
    
    1524
    +observe.content.map.showLogbook=Voir les données Livre de bord
    
    1525
    +observe.content.map.showObservation=Voir les données Observation
    
    1522 1526
     observe.content.map.south=Sud
    
    1523 1527
     observe.content.map.waitLoading=< Veuillez patienter pendant le chargement de la carte >
    
    1524 1528
     observe.content.map.west=Ouest
    

  • dto/pom.xml
    ... ... @@ -188,6 +188,7 @@
    188 188
                         <pattern>observe.constant.@CLASS_SIMPLE_NAME@.@NAME@</pattern>
    
    189 189
                         <enums>
    
    190 190
                           <enum>fr.ird.observe.dto.referential.GearType</enum>
    
    191
    +                      <enum>fr.ird.observe.dto.data.TripMapPointType</enum>
    
    191 192
                           <enum>fr.ird.observe.dto.data.seine.DcpComputedValue</enum>
    
    192 193
                           <enum>fr.ird.observe.dto.data.seine.Ownership</enum>
    
    193 194
                           <enum>fr.ird.observe.dto.data.seine.NonTargetCatchComputedValueSource</enum>
    

  • dto/src/main/java/fr/ird/observe/dto/data/TripMapPoint.java
    1
    +package fr.ird.observe.dto.data;
    
    2
    +
    
    3
    +/*-
    
    4
    + * #%L
    
    5
    + * ObServe :: Dto
    
    6
    + * %%
    
    7
    + * Copyright (C) 2008 - 2018 IRD, Code Lutin, Ultreia.io
    
    8
    + * %%
    
    9
    + * This program is free software: you can redistribute it and/or modify
    
    10
    + * it under the terms of the GNU General Public License as
    
    11
    + * published by the Free Software Foundation, either version 3 of the
    
    12
    + * License, or (at your option) any later version.
    
    13
    + * 
    
    14
    + * This program is distributed in the hope that it will be useful,
    
    15
    + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    
    16
    + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    
    17
    + * GNU General Public License for more details.
    
    18
    + * 
    
    19
    + * You should have received a copy of the GNU General Public
    
    20
    + * License along with this program.  If not, see
    
    21
    + * <http://www.gnu.org/licenses/gpl-3.0.html>.
    
    22
    + * #L%
    
    23
    + */
    
    24
    +
    
    25
    +import java.io.Serializable;
    
    26
    +import java.util.Date;
    
    27
    +
    
    28
    +public class TripMapPoint implements Serializable {
    
    29
    +
    
    30
    +    public static final String PROPERTY_TIME = "time";
    
    31
    +
    
    32
    +    public static final String PROPERTY_LATITUDE = "latitude";
    
    33
    +
    
    34
    +    public static final String PROPERTY_LONGITUDE = "longitude";
    
    35
    +
    
    36
    +    public static final String PROPERTY_TYPE = "type";
    
    37
    +
    
    38
    +    private static final long serialVersionUID = 1L;
    
    39
    +
    
    40
    +    protected Date time;
    
    41
    +
    
    42
    +    protected float latitude;
    
    43
    +
    
    44
    +    protected float longitude;
    
    45
    +
    
    46
    +    protected TripMapPointType type;
    
    47
    +
    
    48
    +    public Date getTime() {
    
    49
    +        return time;
    
    50
    +    }
    
    51
    +
    
    52
    +    public void setTime(Date time) {
    
    53
    +        this.time = time;
    
    54
    +    }
    
    55
    +
    
    56
    +    public float getLatitude() {
    
    57
    +        return latitude;
    
    58
    +    }
    
    59
    +
    
    60
    +    public void setLatitude(float latitude) {
    
    61
    +        this.latitude = latitude;
    
    62
    +    }
    
    63
    +
    
    64
    +    public float getLongitude() {
    
    65
    +        return longitude;
    
    66
    +    }
    
    67
    +
    
    68
    +    public void setLongitude(float longitude) {
    
    69
    +        this.longitude = longitude;
    
    70
    +    }
    
    71
    +
    
    72
    +    public TripMapPointType getType() {
    
    73
    +        return type;
    
    74
    +    }
    
    75
    +
    
    76
    +    public void setType(TripMapPointType type) {
    
    77
    +        this.type = type;
    
    78
    +    }
    
    79
    +}

  • dto/src/main/java/fr/ird/observe/dto/data/TripMapPointType.java
    1
    +package fr.ird.observe.dto.data;
    
    2
    +
    
    3
    +/*-
    
    4
    + * #%L
    
    5
    + * ObServe :: Dto
    
    6
    + * %%
    
    7
    + * Copyright (C) 2008 - 2018 IRD, Code Lutin, Ultreia.io
    
    8
    + * %%
    
    9
    + * This program is free software: you can redistribute it and/or modify
    
    10
    + * it under the terms of the GNU General Public License as
    
    11
    + * published by the Free Software Foundation, either version 3 of the
    
    12
    + * License, or (at your option) any later version.
    
    13
    + * 
    
    14
    + * This program is distributed in the hope that it will be useful,
    
    15
    + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    
    16
    + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    
    17
    + * GNU General Public License for more details.
    
    18
    + * 
    
    19
    + * You should have received a copy of the GNU General Public
    
    20
    + * License along with this program.  If not, see
    
    21
    + * <http://www.gnu.org/licenses/gpl-3.0.html>.
    
    22
    + * #L%
    
    23
    + */
    
    24
    +
    
    25
    +/**
    
    26
    + * <b>Attention : les noms des constantes sont utilisées dans la feuille de style de rendu. Si on change les noms ici,
    
    27
    + * il faut réimpacter dans le fichier style.xml</b>
    
    28
    + *
    
    29
    + * @author Tony Chemit - dev@tchemit.fr
    
    30
    + */
    
    31
    +public enum TripMapPointType {
    
    32
    +
    
    33
    +    seineDepartureHarbour,
    
    34
    +    seineLandingHarbour,
    
    35
    +    seineActivity,
    
    36
    +    seineActivityInHarbour,
    
    37
    +    seineActivityWithFreeSchoolType,
    
    38
    +    seineActivityWithObjectSchoolType,
    
    39
    +
    
    40
    +    longlineDepartureHarbour,
    
    41
    +    longlineLandingHarbour,
    
    42
    +
    
    43
    +    longlineActivityObs,
    
    44
    +    longlineActivityObsInHarbour,
    
    45
    +    longlineActivityObsWithSettingStart,
    
    46
    +    longlineActivityObsWithSettingEnd,
    
    47
    +    longlineActivityObsWithHaulingStart,
    
    48
    +    longlineActivityObsWithHaulingEnd,
    
    49
    +    longlineActivityObsWithInteraction,
    
    50
    +    longlineActivityObsWithStation,
    
    51
    +
    
    52
    +    longlineActivityLogbook,
    
    53
    +    longlineActivityLogbookInHarbour,
    
    54
    +    longlineActivityLogbookWithSettingStart,
    
    55
    +    longlineActivityLogbookWithSettingEnd,
    
    56
    +    longlineActivityLogbookWithHaulingStart,
    
    57
    +    longlineActivityLogbookWithHaulingEnd,
    
    58
    +    longlineActivityLogbookWithInteraction,
    
    59
    +    longlineActivityLogbookWithStation
    
    60
    +
    
    61
    +}

  • dto/src/main/resources/i18n/dto_en_GB.properties
    ... ... @@ -323,6 +323,30 @@ observe.constant.Ownership.unknown=Unknown
    323 323
     observe.constant.SchoolType.libre=Free school type
    
    324 324
     observe.constant.SchoolType.objet=Object school type
    
    325 325
     observe.constant.SchoolType.undefined=Undefined school type
    
    326
    +observe.constant.TripMapPointType.longlineActivityLogbook=Logbook - Activity
    
    327
    +observe.constant.TripMapPointType.longlineActivityLogbookInHarbour=Logbook - At Harbour
    
    328
    +observe.constant.TripMapPointType.longlineActivityLogbookWithHaulingEnd=Logbook - Hauling end
    
    329
    +observe.constant.TripMapPointType.longlineActivityLogbookWithHaulingStart=Logbook - Hauling start
    
    330
    +observe.constant.TripMapPointType.longlineActivityLogbookWithInteraction=Logbook - Encounter
    
    331
    +observe.constant.TripMapPointType.longlineActivityLogbookWithSettingEnd=Logbook - Setting end
    
    332
    +observe.constant.TripMapPointType.longlineActivityLogbookWithSettingStart=Logbook - Setting start
    
    333
    +observe.constant.TripMapPointType.longlineActivityLogbookWithStation=Logbook - Station
    
    334
    +observe.constant.TripMapPointType.longlineActivityObs=Observation - Activity
    
    335
    +observe.constant.TripMapPointType.longlineActivityObsInHarbour=Observation - At Harbour
    
    336
    +observe.constant.TripMapPointType.longlineActivityObsWithHaulingEnd=Observation - Hauling end
    
    337
    +observe.constant.TripMapPointType.longlineActivityObsWithHaulingStart=Observation - Hauling start
    
    338
    +observe.constant.TripMapPointType.longlineActivityObsWithInteraction=Observation - Encounter
    
    339
    +observe.constant.TripMapPointType.longlineActivityObsWithSettingEnd=Observation - Setting end
    
    340
    +observe.constant.TripMapPointType.longlineActivityObsWithSettingStart=Observation - Setting start
    
    341
    +observe.constant.TripMapPointType.longlineActivityObsWithStation=Observation - Station
    
    342
    +observe.constant.TripMapPointType.longlineDepartureHarbour=Harbour departure
    
    343
    +observe.constant.TripMapPointType.longlineLandingHarbour=Harbour landing
    
    344
    +observe.constant.TripMapPointType.seineActivity=Activity
    
    345
    +observe.constant.TripMapPointType.seineActivityInHarbour=In harbour
    
    346
    +observe.constant.TripMapPointType.seineActivityWithFreeSchoolType=Free School type
    
    347
    +observe.constant.TripMapPointType.seineActivityWithObjectSchoolType=Object School type
    
    348
    +observe.constant.TripMapPointType.seineDepartureHarbour=Harbour departure
    
    349
    +observe.constant.TripMapPointType.seineLandingHarbour=Harbour landing
    
    326 350
     observe.constant.TypeTransmittingBuoyOperation.pasDeBalise=No Beacon
    
    327 351
     observe.constant.TypeTransmittingBuoyOperation.pose=Posing
    
    328 352
     observe.constant.TypeTransmittingBuoyOperation.recuperation=Grab
    

  • dto/src/main/resources/i18n/dto_es_ES.properties
    ... ... @@ -321,6 +321,30 @@ observe.constant.Ownership.unknown=Desconocido
    321 321
     observe.constant.SchoolType.libre=Banco libre
    
    322 322
     observe.constant.SchoolType.objet=Banco a objeto
    
    323 323
     observe.constant.SchoolType.undefined=Banco indeterminado
    
    324
    +observe.constant.TripMapPointType.longlineActivityLogbook=Logbook - Actividad
    
    325
    +observe.constant.TripMapPointType.longlineActivityLogbookInHarbour=Logbook - En el puerto
    
    326
    +observe.constant.TripMapPointType.longlineActivityLogbookWithHaulingEnd=Logbook - Fin de arrastre
    
    327
    +observe.constant.TripMapPointType.longlineActivityLogbookWithHaulingStart=Logbook - Inicio de arrastre
    
    328
    +observe.constant.TripMapPointType.longlineActivityLogbookWithInteraction=Logbook - Encuentro
    
    329
    +observe.constant.TripMapPointType.longlineActivityLogbookWithSettingEnd=Logbook - Fin de calada
    
    330
    +observe.constant.TripMapPointType.longlineActivityLogbookWithSettingStart=Logbook - Inicio de calada
    
    331
    +observe.constant.TripMapPointType.longlineActivityLogbookWithStation=Logbook - Station
    
    332
    +observe.constant.TripMapPointType.longlineActivityObs=Observation - Actividad
    
    333
    +observe.constant.TripMapPointType.longlineActivityObsInHarbour=Observation - En el puerto
    
    334
    +observe.constant.TripMapPointType.longlineActivityObsWithHaulingEnd=Observation - Fin de arrastre
    
    335
    +observe.constant.TripMapPointType.longlineActivityObsWithHaulingStart=Observation - Inicio de arrastre
    
    336
    +observe.constant.TripMapPointType.longlineActivityObsWithInteraction=Observation - Encuentro
    
    337
    +observe.constant.TripMapPointType.longlineActivityObsWithSettingEnd=Observation - Fin de calada
    
    338
    +observe.constant.TripMapPointType.longlineActivityObsWithSettingStart=Observation - Inicio de calada
    
    339
    +observe.constant.TripMapPointType.longlineActivityObsWithStation=Observation - Station
    
    340
    +observe.constant.TripMapPointType.longlineDepartureHarbour=Puerto de salida
    
    341
    +observe.constant.TripMapPointType.longlineLandingHarbour=Puerto de llegada
    
    342
    +observe.constant.TripMapPointType.seineActivity=Actividad
    
    343
    +observe.constant.TripMapPointType.seineActivityInHarbour=En el puerto
    
    344
    +observe.constant.TripMapPointType.seineActivityWithFreeSchoolType=Banco libre
    
    345
    +observe.constant.TripMapPointType.seineActivityWithObjectSchoolType=Banco a objeto
    
    346
    +observe.constant.TripMapPointType.seineDepartureHarbour=Puerto de salida
    
    347
    +observe.constant.TripMapPointType.seineLandingHarbour=Puerto de llegada
    
    324 348
     observe.constant.TypeTransmittingBuoyOperation.pasDeBalise=DCP sin baliza
    
    325 349
     observe.constant.TypeTransmittingBuoyOperation.pose=Colocación de nueva baliza
    
    326 350
     observe.constant.TypeTransmittingBuoyOperation.recuperation=Recogida de baliza sin regreso al agua
    

  • dto/src/main/resources/i18n/dto_fr_FR.properties
    ... ... @@ -323,6 +323,30 @@ observe.constant.Ownership.unknown=Inconnue
    323 323
     observe.constant.SchoolType.libre=Banc libre
    
    324 324
     observe.constant.SchoolType.objet=Banc objet
    
    325 325
     observe.constant.SchoolType.undefined=Banc indéterminé
    
    326
    +observe.constant.TripMapPointType.longlineActivityLogbook=Livre de bord - point d'activité
    
    327
    +observe.constant.TripMapPointType.longlineActivityLogbookInHarbour=Livre de bord - Au port
    
    328
    +observe.constant.TripMapPointType.longlineActivityLogbookWithHaulingEnd=Livre de bord - Fin de virage
    
    329
    +observe.constant.TripMapPointType.longlineActivityLogbookWithHaulingStart=Livre de bord - Début de virage
    
    330
    +observe.constant.TripMapPointType.longlineActivityLogbookWithInteraction=Livre de bord - Rencontre
    
    331
    +observe.constant.TripMapPointType.longlineActivityLogbookWithSettingEnd=Livre de bord - Fin de filage
    
    332
    +observe.constant.TripMapPointType.longlineActivityLogbookWithSettingStart=Livre de bord - Début de filage
    
    333
    +observe.constant.TripMapPointType.longlineActivityLogbookWithStation=Livre de bord - Station océanographique
    
    334
    +observe.constant.TripMapPointType.longlineActivityObs=Observation - point d'activité
    
    335
    +observe.constant.TripMapPointType.longlineActivityObsInHarbour=Observation - Au port
    
    336
    +observe.constant.TripMapPointType.longlineActivityObsWithHaulingEnd=Observation - Fin de virage
    
    337
    +observe.constant.TripMapPointType.longlineActivityObsWithHaulingStart=Observation - Début de virage
    
    338
    +observe.constant.TripMapPointType.longlineActivityObsWithInteraction=Observation - Rencontre
    
    339
    +observe.constant.TripMapPointType.longlineActivityObsWithSettingEnd=Observation - Fin de filage
    
    340
    +observe.constant.TripMapPointType.longlineActivityObsWithSettingStart=Observation - Début de filage
    
    341
    +observe.constant.TripMapPointType.longlineActivityObsWithStation=Observation - Station océanographique
    
    342
    +observe.constant.TripMapPointType.longlineDepartureHarbour=Port de départ
    
    343
    +observe.constant.TripMapPointType.longlineLandingHarbour=Port d'arrivée
    
    344
    +observe.constant.TripMapPointType.seineActivity=point d'activité
    
    345
    +observe.constant.TripMapPointType.seineActivityInHarbour=Au port
    
    346
    +observe.constant.TripMapPointType.seineActivityWithFreeSchoolType=Banc libre
    
    347
    +observe.constant.TripMapPointType.seineActivityWithObjectSchoolType=Banc objet
    
    348
    +observe.constant.TripMapPointType.seineDepartureHarbour=Port de départ
    
    349
    +observe.constant.TripMapPointType.seineLandingHarbour=Port d'arrivée
    
    326 350
     observe.constant.TypeTransmittingBuoyOperation.pasDeBalise=Pas de balise liée au DCP
    
    327 351
     observe.constant.TypeTransmittingBuoyOperation.pose=Pose d'une nouvelle balise
    
    328 352
     observe.constant.TypeTransmittingBuoyOperation.recuperation=Récupération d'une balise sans remise à l'eau
    

  • persistence/src/main/java/fr/ird/observe/entities/longline/SampleLogbooks.java
    1 1
     package fr.ird.observe.entities.longline;
    
    2 2
     
    
    3
    +/*-
    
    4
    + * #%L
    
    5
    + * ObServe :: Persistence
    
    6
    + * %%
    
    7
    + * Copyright (C) 2008 - 2018 IRD, Code Lutin, Ultreia.io
    
    8
    + * %%
    
    9
    + * This program is free software: you can redistribute it and/or modify
    
    10
    + * it under the terms of the GNU General Public License as
    
    11
    + * published by the Free Software Foundation, either version 3 of the
    
    12
    + * License, or (at your option) any later version.
    
    13
    + *
    
    14
    + * This program is distributed in the hope that it will be useful,
    
    15
    + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    
    16
    + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    
    17
    + * GNU General Public License for more details.
    
    18
    + *
    
    19
    + * You should have received a copy of the GNU General Public
    
    20
    + * License along with this program.  If not, see
    
    21
    + * <http://www.gnu.org/licenses/gpl-3.0.html>.
    
    22
    + * #L%
    
    23
    + */
    
    24
    +
    
    3 25
     import java.util.Comparator;
    
    4 26
     import java.util.Date;
    
    5 27
     import java.util.List;
    

  • persistence/src/main/java/fr/ird/observe/entities/longline/TripLonglineTopiaDao.java
    ... ... @@ -10,12 +10,12 @@ package fr.ird.observe.entities.longline;
    10 10
      * it under the terms of the GNU General Public License as
    
    11 11
      * published by the Free Software Foundation, either version 3 of the
    
    12 12
      * License, or (at your option) any later version.
    
    13
    - * 
    
    13
    + *
    
    14 14
      * This program is distributed in the hope that it will be useful,
    
    15 15
      * but WITHOUT ANY WARRANTY; without even the implied warranty of
    
    16 16
      * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    
    17 17
      * GNU General Public License for more details.
    
    18
    - * 
    
    18
    + *
    
    19 19
      * You should have received a copy of the GNU General Public
    
    20 20
      * License along with this program.  If not, see
    
    21 21
      * <http://www.gnu.org/licenses/gpl-3.0.html>.
    
    ... ... @@ -42,9 +42,11 @@ import java.util.List;
    42 42
     
    
    43 43
     public class TripLonglineTopiaDao extends AbstractTripLonglineTopiaDao<TripLongline> {
    
    44 44
     
    
    45
    -    public static final String ACTIVITY_INTERACTION_ID = "fr.ird.observe.entities.referentiel.longline.VesselActivityLongline#1239832686138#0.4";
    
    45
    +    public static final String ACTIVITY_OBS_INTERACTION_ID = "fr.ird.observe.entities.referentiel.longline.VesselActivityLongline#1239832686138#0.4";
    
    46
    +    public static final String ACTIVITY_LOGBOOK_INTERACTION_ID = "fr.ird.observe.entities.referentiel.longline.VesselActivityLongline#1239832686138#0.4";
    
    46 47
     
    
    47
    -    public static final String ACTIVITY_STATION_ID = "fr.ird.observe.entities.referentiel.longline.VesselActivityLongline#1239832686138#0.3";
    
    48
    +    public static final String ACTIVITY_OBS_STATION_ID = "fr.ird.observe.entities.referentiel.longline.VesselActivityLongline#1239832686138#0.3";
    
    49
    +    public static final String ACTIVITY_LOGBOOK_STATION_ID = "fr.ird.observe.entities.referentiel.longline.VesselActivityLongline#1239832686138#0.3";
    
    48 50
     
    
    49 51
         public int findPositionByProgramId(String programId, String tripId) {
    
    50 52
             int result = 0;
    
    ... ... @@ -61,7 +63,7 @@ public class TripLonglineTopiaDao extends AbstractTripLonglineTopiaDao<TripLongl
    61 63
             return -1;
    
    62 64
         }
    
    63 65
     
    
    64
    -    public LinkedHashSet<TripMapPoint> extractTripMapActivityPoints(String tripId) {
    
    66
    +    public LinkedHashSet<TripMapPoint> extractTripMapActivityPoints(String tripId, boolean addObservation, boolean addLogbook) {
    
    65 67
     
    
    66 68
             TripLongline tripLongline = forTopiaIdEquals(tripId).findUnique();
    
    67 69
     
    
    ... ... @@ -80,11 +82,17 @@ public class TripLonglineTopiaDao extends AbstractTripLonglineTopiaDao<TripLongl
    80 82
                 tripMapPoints.add(departurePoint);
    
    81 83
             }
    
    82 84
     
    
    83
    -        // Add Activities
    
    84
    -        TripMapActivityPointQuery tripMapActivityPointQuery = new TripMapActivityPointQuery(tripId);
    
    85
    -        List<List<TripMapPoint>> results = topiaSqlSupport.findMultipleResult(tripMapActivityPointQuery);
    
    86
    -        for (List<TripMapPoint> result : results) {
    
    87
    -            tripMapPoints.addAll(result);
    
    85
    +        if (addObservation) {
    
    86
    +            // Add Activities Observation
    
    87
    +            TripMapActivityObsPointQuery tripMapActivityObsPointQuery = new TripMapActivityObsPointQuery(tripId);
    
    88
    +            List<List<TripMapPoint>> results = topiaSqlSupport.findMultipleResult(tripMapActivityObsPointQuery);
    
    89
    +            results.forEach(tripMapPoints::addAll);
    
    90
    +        }
    
    91
    +        if (addLogbook) {
    
    92
    +            // Add Activities Logbook
    
    93
    +            TripMapActivityLogbookPointQuery tripMapActivityLogbookPointQuery = new TripMapActivityLogbookPointQuery(tripId);
    
    94
    +            List<List<TripMapPoint>> results = topiaSqlSupport.findMultipleResult(tripMapActivityLogbookPointQuery);
    
    95
    +            results.forEach(tripMapPoints::addAll);
    
    88 96
             }
    
    89 97
     
    
    90 98
             // add landing harbours
    
    ... ... @@ -103,7 +111,53 @@ public class TripLonglineTopiaDao extends AbstractTripLonglineTopiaDao<TripLongl
    103 111
             return tripMapPoints;
    
    104 112
         }
    
    105 113
     
    
    106
    -    private static class TripMapActivityPointQuery extends TopiaSqlQuery<List<TripMapPoint>> {
    
    114
    +    public boolean updateEndDate(TripLongline trip) {
    
    115
    +
    
    116
    +        boolean wasUpdated = false;
    
    117
    +
    
    118
    +        // la date de fin theorique (date de la dernière activité de la marée)
    
    119
    +        Date theoricalEndDate = getTheoricalEndDate(trip);
    
    120
    +
    
    121
    +        // la date de fin actuelle
    
    122
    +        Date realEndDate = trip.getEndDate();
    
    123
    +
    
    124
    +        if (realEndDate == null || theoricalEndDate.after(realEndDate)) {
    
    125
    +
    
    126
    +            // on utilise la nouvelle date theorique car l'ancienne n'existe pas
    
    127
    +            // ou est antérieure à la date de fin théoriquue
    
    128
    +            trip.setEndDate(theoricalEndDate);
    
    129
    +            wasUpdated = true;
    
    130
    +        }
    
    131
    +
    
    132
    +        return wasUpdated;
    
    133
    +
    
    134
    +    }
    
    135
    +
    
    136
    +    public Date getTheoricalEndDate(TripLongline trip) {
    
    137
    +
    
    138
    +        Date d;
    
    139
    +
    
    140
    +        Timestamp lastActivityDate = TheoricalEndOfDateSqlQuery.find(topiaSqlSupport, trip.getTopiaId());
    
    141
    +
    
    142
    +        if (lastActivityDate == null) {
    
    143
    +
    
    144
    +            // pas d'activité, donc la date de fin est la date de debut
    
    145
    +            d = trip.getStartDate();
    
    146
    +
    
    147
    +        } else {
    
    148
    +
    
    149
    +            // date de la dernière activité de la marée
    
    150
    +            d = lastActivityDate;
    
    151
    +
    
    152
    +        }
    
    153
    +
    
    154
    +        // on conserve la date epuree (pas de notion de temps dans la date)
    
    155
    +        d = DateUtil.getEndOfDay(d);
    
    156
    +        return d;
    
    157
    +
    
    158
    +    }
    
    159
    +
    
    160
    +    private static class TripMapActivityObsPointQuery extends TopiaSqlQuery<List<TripMapPoint>> {
    
    107 161
     
    
    108 162
             private static final String SQL = "SELECT" +
    
    109 163
                     " a.timestamp, " +
    
    ... ... @@ -130,7 +184,7 @@ public class TripLonglineTopiaDao extends AbstractTripLonglineTopiaDao<TripLongl
    130 184
     
    
    131 185
             protected final String tripId;
    
    132 186
     
    
    133
    -        public TripMapActivityPointQuery(String tripId) {
    
    187
    +        public TripMapActivityObsPointQuery(String tripId) {
    
    134 188
                 this.tripId = tripId;
    
    135 189
             }
    
    136 190
     
    
    ... ... @@ -157,9 +211,9 @@ public class TripLonglineTopiaDao extends AbstractTripLonglineTopiaDao<TripLongl
    157 211
                     String vesselActivityId = resultSet.getString(4);
    
    158 212
                     if (vesselActivityId == null) {
    
    159 213
                         activity.setType(TripMapPointType.longlineActivityObs);
    
    160
    -                } else if (ACTIVITY_INTERACTION_ID.equals(vesselActivityId)) {
    
    214
    +                } else if (ACTIVITY_OBS_INTERACTION_ID.equals(vesselActivityId)) {
    
    161 215
                         activity.setType(TripMapPointType.longlineActivityObsWithInteraction);
    
    162
    -                } else if (ACTIVITY_STATION_ID.equals(vesselActivityId)) {
    
    216
    +                } else if (ACTIVITY_OBS_STATION_ID.equals(vesselActivityId)) {
    
    163 217
                         activity.setType(TripMapPointType.longlineActivityObsWithStation);
    
    164 218
                     } else {
    
    165 219
                         activity.setType(TripMapPointType.longlineActivityObs);
    
    ... ... @@ -212,50 +266,113 @@ public class TripLonglineTopiaDao extends AbstractTripLonglineTopiaDao<TripLongl
    212 266
             }
    
    213 267
         }
    
    214 268
     
    
    215
    -    public boolean updateEndDate(TripLongline trip) {
    
    269
    +    private static class TripMapActivityLogbookPointQuery extends TopiaSqlQuery<List<TripMapPoint>> {
    
    216 270
     
    
    217
    -        boolean wasUpdated = false;
    
    218
    -
    
    219
    -        // la date de fin theorique (date de la dernière activité de la marée)
    
    220
    -        Date theoricalEndDate = getTheoricalEndDate(trip);
    
    221
    -
    
    222
    -        // la date de fin actuelle
    
    223
    -        Date realEndDate = trip.getEndDate();
    
    271
    +        private static final String SQL = "SELECT" +
    
    272
    +                " a.timestamp, " +
    
    273
    +                " a.latitude," +
    
    274
    +                " a.longitude," +
    
    275
    +                " a.vesselActivity," +
    
    276
    +                " s.settingStartTimestamp," +
    
    277
    +                " s.settingStartLatitude," +
    
    278
    +                " s.settingStartLongitude," +
    
    279
    +                " s.settingEndTimestamp," +
    
    280
    +                " s.settingEndLatitude," +
    
    281
    +                " s.settingEndLongitude," +
    
    282
    +                " s.haulingStartTimestamp," +
    
    283
    +                " s.haulingStartLatitude," +
    
    284
    +                " s.haulingStartLongitude," +
    
    285
    +                " s.haulingEndTimestamp," +
    
    286
    +                " s.haulingEndLatitude," +
    
    287
    +                " s.haulingEndLongitude" +
    
    288
    +                " FROM observe_longLine.activityLogbook a" +
    
    289
    +                " LEFT OUTER JOIN observe_longLine.setLogbook s" +
    
    290
    +                " ON s.topiaId = a.set" +
    
    291
    +                " WHERE a.trip = ?" +
    
    292
    +                " ORDER BY a.timestamp";
    
    224 293
     
    
    225
    -        if (realEndDate == null || theoricalEndDate.after(realEndDate)) {
    
    294
    +        protected final String tripId;
    
    226 295
     
    
    227
    -            // on utilise la nouvelle date theorique car l'ancienne n'existe pas
    
    228
    -            // ou est antérieure à la date de fin théoriquue
    
    229
    -            trip.setEndDate(theoricalEndDate);
    
    230
    -            wasUpdated = true;
    
    296
    +        public TripMapActivityLogbookPointQuery(String tripId) {
    
    297
    +            this.tripId = tripId;
    
    231 298
             }
    
    232 299
     
    
    233
    -        return wasUpdated;
    
    300
    +        @Override
    
    301
    +        public PreparedStatement prepareQuery(Connection connection) throws SQLException {
    
    302
    +            PreparedStatement preparedStatement = connection.prepareStatement(SQL);
    
    303
    +            preparedStatement.setString(1, tripId);
    
    304
    +            return preparedStatement;
    
    305
    +        }
    
    234 306
     
    
    235
    -    }
    
    307
    +        @Override
    
    308
    +        public List<TripMapPoint> prepareResult(ResultSet resultSet) throws SQLException {
    
    236 309
     
    
    237
    -    public Date getTheoricalEndDate(TripLongline trip) {
    
    310
    +            List<TripMapPoint> result = Lists.newLinkedList();
    
    238 311
     
    
    239
    -        Date d;
    
    312
    +            if (resultSet.getString(5) == null) {
    
    240 313
     
    
    241
    -        Timestamp lastActivityDate = TheoricalEndOfDateSqlQuery.find(topiaSqlSupport, trip.getTopiaId());
    
    314
    +                // activity
    
    315
    +                TripMapPoint activity = new TripMapPoint();
    
    316
    +                activity.setTime(resultSet.getDate(1));
    
    317
    +                activity.setLatitude(resultSet.getFloat(2));
    
    318
    +                activity.setLongitude(resultSet.getFloat(3));
    
    242 319
     
    
    243
    -        if (lastActivityDate == null) {
    
    320
    +                String vesselActivityId = resultSet.getString(4);
    
    321
    +                if (vesselActivityId == null) {
    
    322
    +                    activity.setType(TripMapPointType.longlineActivityLogbook);
    
    323
    +                } else if (ACTIVITY_LOGBOOK_INTERACTION_ID.equals(vesselActivityId)) {
    
    324
    +                    activity.setType(TripMapPointType.longlineActivityLogbookWithInteraction);
    
    325
    +                } else if (ACTIVITY_LOGBOOK_STATION_ID.equals(vesselActivityId)) {
    
    326
    +                    activity.setType(TripMapPointType.longlineActivityLogbookWithStation);
    
    327
    +                } else {
    
    328
    +                    activity.setType(TripMapPointType.longlineActivityLogbook);
    
    329
    +                }
    
    244 330
     
    
    245
    -            // pas d'activité, donc la date de fin est la date de debut
    
    246
    -            d = trip.getStartDate();
    
    331
    +                result.add(activity);
    
    332
    +            }
    
    247 333
     
    
    248
    -        } else {
    
    334
    +            // settingStart
    
    335
    +            if (resultSet.getString(5) != null) {
    
    336
    +                TripMapPoint settingStart = new TripMapPoint();
    
    337
    +                settingStart.setTime(resultSet.getDate(5));
    
    338
    +                settingStart.setLatitude(resultSet.getFloat(6));
    
    339
    +                settingStart.setLongitude(resultSet.getFloat(7));
    
    340
    +                settingStart.setType(TripMapPointType.longlineActivityLogbookWithSettingStart);
    
    341
    +                result.add(settingStart);
    
    342
    +            }
    
    249 343
     
    
    250
    -            // date de la dernière activité de la marée
    
    251
    -            d = lastActivityDate;
    
    344
    +            // settingEnd
    
    345
    +            if (resultSet.getString(8) != null) {
    
    346
    +                TripMapPoint settingEnd = new TripMapPoint();
    
    347
    +                settingEnd.setTime(resultSet.getDate(8));
    
    348
    +                settingEnd.setLatitude(resultSet.getFloat(9));
    
    349
    +                settingEnd.setLongitude(resultSet.getFloat(10));
    
    350
    +                settingEnd.setType(TripMapPointType.longlineActivityLogbookWithSettingEnd);
    
    351
    +                result.add(settingEnd);
    
    352
    +            }
    
    252 353
     
    
    253
    -        }
    
    354
    +            // haulingStart
    
    355
    +            if (resultSet.getString(11) != null) {
    
    356
    +                TripMapPoint haulingStart = new TripMapPoint();
    
    357
    +                haulingStart.setTime(resultSet.getDate(11));
    
    358
    +                haulingStart.setLatitude(resultSet.getFloat(12));
    
    359
    +                haulingStart.setLongitude(resultSet.getFloat(13));
    
    360
    +                haulingStart.setType(TripMapPointType.longlineActivityLogbookWithHaulingStart);
    
    361
    +                result.add(haulingStart);
    
    362
    +            }
    
    254 363
     
    
    255
    -        // on conserve la date epuree (pas de notion de temps dans la date)
    
    256
    -        d = DateUtil.getEndOfDay(d);
    
    257
    -        return d;
    
    364
    +            // haulingEnd
    
    365
    +            if (resultSet.getString(14) != null) {
    
    366
    +                TripMapPoint haulingEnd = new TripMapPoint();
    
    367
    +                haulingEnd.setTime(resultSet.getDate(14));
    
    368
    +                haulingEnd.setLatitude(resultSet.getFloat(15));
    
    369
    +                haulingEnd.setLongitude(resultSet.getFloat(16));
    
    370
    +                haulingEnd.setType(TripMapPointType.longlineActivityLogbookWithHaulingEnd);
    
    371
    +                result.add(haulingEnd);
    
    372
    +            }
    
    258 373
     
    
    374
    +            return result;
    
    375
    +        }
    
    259 376
         }
    
    260 377
     
    
    261 378
         private static class TheoricalEndOfDateSqlQuery extends TopiaSqlQuery<Timestamp> {
    

  • pom.xml
    ... ... @@ -26,7 +26,7 @@
    26 26
       <parent>
    
    27 27
         <groupId>io.ultreia.maven</groupId>
    
    28 28
         <artifactId>pom</artifactId>
    
    29
    -    <version>2018.51</version>
    
    29
    +    <version>2018.52</version>
    
    30 30
       </parent>
    
    31 31
     
    
    32 32
       <groupId>fr.ird.observe</groupId>
    
    ... ... @@ -152,10 +152,10 @@
    152 152
         <maven.build.timestamp.format>dd/MM/yyyy HH:mm z</maven.build.timestamp.format>
    
    153 153
         <buildDate>${maven.build.timestamp}</buildDate>
    
    154 154
     
    
    155
    -    <observeToolkitVersion>4.2</observeToolkitVersion>
    
    155
    +    <observeToolkitVersion>4.3</observeToolkitVersion>
    
    156 156
         <!--<lib.version.java4all.topia>1.1.1</lib.version.java4all.topia>-->
    
    157 157
         <!--<lib.version.java4all.eugene>3.0-alpha-22</lib.version.java4all.eugene>-->
    
    158
    -    <lib.version.java4all.jaxx>3.0-alpha-35</lib.version.java4all.jaxx>
    
    158
    +    <!--<lib.version.java4all.jaxx>3.0-alpha-35</lib.version.java4all.jaxx>-->
    
    159 159
         <!--<lib.version.nuiton.topia>3.4.2-SNAPSHOT</lib.version.nuiton.topia>-->
    
    160 160
         <lib.version.nuiton.validation>3.1</lib.version.nuiton.validation>
    
    161 161
         <lib.version.java4all.topia>1.1.3</lib.version.java4all.topia>
    

  • services-local/src/main/java/fr/ird/observe/services/local/service/data/longline/TripLonglineServiceLocal.java
    ... ... @@ -92,8 +92,8 @@ public class TripLonglineServiceLocal extends ObserveServiceLocal implements Tri
    92 92
         }
    
    93 93
     
    
    94 94
         @Override
    
    95
    -    public TripMapDto getTripLonglineMap(String tripLonglineId) {
    
    96
    -        LinkedHashSet<TripMapPoint> points = TRIP_LONGLINE_SPI.getDao(getTopiaPersistenceContext()).extractTripMapActivityPoints(tripLonglineId);
    
    95
    +    public TripMapDto getTripLonglineMap(String tripLonglineId, boolean addObservation, boolean addLogbook) {
    
    96
    +        LinkedHashSet<TripMapPoint> points = TRIP_LONGLINE_SPI.getDao(getTopiaPersistenceContext()).extractTripMapActivityPoints(tripLonglineId, addObservation, addLogbook);
    
    97 97
             return TripMapDtoFactory.of(tripLonglineId, points);
    
    98 98
         }
    
    99 99
     
    

  • services/src/main/java/fr/ird/observe/services/service/data/longline/TripLonglineService.java
    ... ... @@ -55,7 +55,7 @@ public interface TripLonglineService extends ObserveService {
    55 55
     
    
    56 56
         @Get
    
    57 57
         @ReadDataPermission
    
    58
    -    TripMapDto getTripLonglineMap(String tripLonglineId);
    
    58
    +    TripMapDto getTripLonglineMap(String tripLonglineId, boolean addObservation, boolean addLogbook);
    
    59 59
     
    
    60 60
         @Get
    
    61 61
         @ReadDataPermission
    

  • src/site/markdown/administration-web.md.vm
    ... ... @@ -135,3 +135,13 @@ Vous pouvez supprimer toutes les sessions utilisateurs via l'adresse suivante :
    135 135
     ```
    
    136 136
       http://localhost:8080/observeweb/admin/resetAuthenticationTokens?adminApiKey=changeme (ou la clef que vous avez configuré)
    
    137 137
     ```
    
    138
    +
    
    139
    +## Configuration Apache
    
    140
    +
    
    141
    +Par défaut le proxy_ajp a un timeout de 5 minutes, il faut augmenter cette valeur sinon les appels dépassant ce temps
    
    142
    +seront rejettés.
    
    143
    +
    
    144
    +Dans le fichier de configuration ``httpd.conf`` ajouter la ligne : (timeout de 1200 secondes = 20 minutes)
    
    145
    +```
    
    146
    +ProxyTimeout 1200
    
    147
    +```
    \ No newline at end of file