Observe-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- 7199 discussions
Tony CHEMIT deleted branch release/7.0.8 at ultreiaio / ird-observe
--
You're receiving this email because of your account on gitlab.com.
1
0
Tony CHEMIT pushed new tag v7.0.8 at ultreiaio / ird-observe
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/tree/v7.0.8
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][release/7.0.8] [jgitflow-maven-plugin]updating poms for branch'release/7.0.8' with non-snapshot versions[skip ci]
by Tony CHEMIT 06 Jul '19
by Tony CHEMIT 06 Jul '19
06 Jul '19
Tony CHEMIT pushed to branch release/7.0.8 at ultreiaio / ird-observe
Commits:
47dc8e0a by tchemit at 2019-07-06T13:59:42Z
[jgitflow-maven-plugin]updating poms for branch'release/7.0.8' with non-snapshot versions[skip ci]
- - - - -
16 changed files:
- client-configuration/pom.xml
- client-core/pom.xml
- client-runner/pom.xml
- dto/pom.xml
- observe-i18n/pom.xml
- observe/pom.xml
- persistence/pom.xml
- pom.xml
- server-configuration/pom.xml
- server-core/pom.xml
- server-runner/pom.xml
- services-client/pom.xml
- services-local/pom.xml
- services/pom.xml
- test/pom.xml
- validation/pom.xml
Changes:
=====================================
client-configuration/pom.xml
=====================================
@@ -26,7 +26,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.8-SNAPSHOT</version>
+ <version>7.0.8</version>
</parent>
<artifactId>client-configuration</artifactId>
=====================================
client-core/pom.xml
=====================================
@@ -26,7 +26,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.8-SNAPSHOT</version>
+ <version>7.0.8</version>
</parent>
<artifactId>client-core</artifactId>
=====================================
client-runner/pom.xml
=====================================
@@ -26,7 +26,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.8-SNAPSHOT</version>
+ <version>7.0.8</version>
</parent>
<artifactId>client-runner</artifactId>
=====================================
dto/pom.xml
=====================================
@@ -27,7 +27,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.8-SNAPSHOT</version>
+ <version>7.0.8</version>
</parent>
<artifactId>dto</artifactId>
=====================================
observe-i18n/pom.xml
=====================================
@@ -26,7 +26,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.8-SNAPSHOT</version>
+ <version>7.0.8</version>
</parent>
<artifactId>observe-i18n</artifactId>
=====================================
observe/pom.xml
=====================================
@@ -26,7 +26,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.8-SNAPSHOT</version>
+ <version>7.0.8</version>
</parent>
<artifactId>observe</artifactId>
=====================================
persistence/pom.xml
=====================================
@@ -26,7 +26,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.8-SNAPSHOT</version>
+ <version>7.0.8</version>
</parent>
<artifactId>persistence</artifactId>
=====================================
pom.xml
=====================================
@@ -31,7 +31,7 @@
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.8-SNAPSHOT</version>
+ <version>7.0.8</version>
<packaging>pom</packaging>
<name>ObServe :: Pom</name>
=====================================
server-configuration/pom.xml
=====================================
@@ -26,7 +26,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.8-SNAPSHOT</version>
+ <version>7.0.8</version>
</parent>
<artifactId>server-configuration</artifactId>
=====================================
server-core/pom.xml
=====================================
@@ -27,7 +27,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.8-SNAPSHOT</version>
+ <version>7.0.8</version>
</parent>
<artifactId>server-core</artifactId>
=====================================
server-runner/pom.xml
=====================================
@@ -27,7 +27,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.8-SNAPSHOT</version>
+ <version>7.0.8</version>
</parent>
<artifactId>server-runner</artifactId>
=====================================
services-client/pom.xml
=====================================
@@ -27,7 +27,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.8-SNAPSHOT</version>
+ <version>7.0.8</version>
</parent>
<artifactId>services-client</artifactId>
=====================================
services-local/pom.xml
=====================================
@@ -27,7 +27,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.8-SNAPSHOT</version>
+ <version>7.0.8</version>
</parent>
<artifactId>services-local</artifactId>
=====================================
services/pom.xml
=====================================
@@ -27,7 +27,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.8-SNAPSHOT</version>
+ <version>7.0.8</version>
</parent>
<artifactId>services</artifactId>
=====================================
test/pom.xml
=====================================
@@ -26,7 +26,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.8-SNAPSHOT</version>
+ <version>7.0.8</version>
</parent>
<artifactId>test</artifactId>
=====================================
validation/pom.xml
=====================================
@@ -26,7 +26,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.8-SNAPSHOT</version>
+ <version>7.0.8</version>
</parent>
<artifactId>validation</artifactId>
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/47dc8e0a598cf0f2b48b6d6f27f…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/47dc8e0a598cf0f2b48b6d6f27f…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][master-7.x] 20 commits: [jgitflow-maven-plugin]updating poms for 7.0.8-SNAPSHOT development[skip ci]
by Tony CHEMIT 06 Jul '19
by Tony CHEMIT 06 Jul '19
06 Jul '19
Tony CHEMIT pushed to branch master-7.x at ultreiaio / ird-observe
Commits:
658a8731 by tchemit at 2019-05-13T18:10:43Z
[jgitflow-maven-plugin]updating poms for 7.0.8-SNAPSHOT development[skip ci]
- - - - -
ff29c80c by tchemit at 2019-05-13T18:33:27Z
[jgitflow-maven-plugin]updating develop poms to master versions to avoid merge conflicts[skip ci]
- - - - -
e77faede by tchemit at 2019-05-13T18:33:28Z
[jgitflow-maven-plugin]merging 'master-7.x' into 'develop-7.x'
- - - - -
a54578a4 by tchemit at 2019-05-13T18:33:28Z
[jgitflow-maven-plugin]Updating develop poms back to pre merge state[skip ci]
- - - - -
059e3372 by tchemit at 2019-06-05T02:23:31Z
On ne peut pas supprimer certains référentiels - Closes #1310
- - - - -
952d393e by tchemit at 2019-06-27T04:18:50Z
update pom
- - - - -
3cf7c59b by tchemit at 2019-06-27T04:18:55Z
[UI REFERENTIEL] Liste des relations taille-poids et taille-taille - Closes #1335 (report V7) + Clés de référentiel non traduite ou nom des clés invalide - See #1336
- - - - -
e02c7f10 by tchemit at 2019-06-27T04:37:30Z
[REFERENTIEL] Impossible de modifier le parent d'un matériau - Closes #1338
- - - - -
1c58659b by tchemit at 2019-06-27T04:43:40Z
[REFERENTIEL] La validation sur les Objets flottant matériaux ne fonctionnent plus :( - Closes #1339
- - - - -
509b0f1c by tchemit at 2019-06-27T04:55:37Z
Une modification sur le référentiel n'active pas le bouton 'Enregistrer' - Closes #1325
- - - - -
a037ee9d by tchemit at 2019-06-27T05:06:00Z
[PS][FAD] Comportement des entrées 'FAD' et 'LOG' - Closes #1324
- - - - -
e7cdd45e by tchemit at 2019-06-27T05:08:28Z
[TREE] Parfois un affichage tronqué sans raison - Closes #1269
- - - - -
603c4e88 by tchemit at 2019-07-03T12:56:02Z
update pom
- - - - -
4d449fa3 by tchemit at 2019-07-03T13:26:13Z
On ne peut pas sauvegarder une configuration d'un serveur distant en mode admin - Closes #1340
- - - - -
5f9d6431 by tchemit at 2019-07-03T14:02:14Z
L'assistant migration via serveur pourrait refuser de continuer si l'utilisateur n'est pas assez acrédité - Closes #1145
Assistant création de base PG échoue - Closes #1331
- - - - -
04fde970 by tchemit at 2019-07-03T15:14:29Z
[FOB] Découpler la gestion de la hiérarchie FOB des codes métier - Closes #1342
- - - - -
9f2ad3db by tchemit at 2019-07-03T15:50:34Z
[REFERENTIEL] La validation sur les Objets flottant matériaux ne fonctionnent plus :( - Closes #1339
- - - - -
18b5e375 by tchemit at 2019-07-04T11:08:01Z
[PS][FAD] Gestion visuelle de la hiérarchie des matériaux sélectionnée - Closes #1323
- - - - -
47dc8e0a by tchemit at 2019-07-06T13:59:42Z
[jgitflow-maven-plugin]updating poms for branch'release/7.0.8' with non-snapshot versions[skip ci]
- - - - -
e219b6f1 by tchemit at 2019-07-06T14:05:38Z
[jgitflow-maven-plugin]merging 'release/7.0.8' into 'master-7.x'
- - - - -
30 changed files:
- client-configuration/pom.xml
- client-configuration/src/main/config/Client.ini
- client-configuration/src/main/i18n/getters/config.getter
- client-core/pom.xml
- client-core/src/main/i18n/getters/java.getter
- client-core/src/main/java/fr/ird/observe/client/db/ObserveDataSourcesManager.java
- client-core/src/main/java/fr/ird/observe/client/db/ObserveSwingDataSource.java
- client-core/src/main/java/fr/ird/observe/client/ui/actions/storage/SaveCurrentServerConfigurationUIAction.java
- client-core/src/main/java/fr/ird/observe/client/ui/actions/storage/presets/TestRemoteUIAction.java
- client-core/src/main/java/fr/ird/observe/client/ui/actions/storage/presets/TestServerUIAction.java
- client-core/src/main/java/fr/ird/observe/client/ui/admin/config/ConfigModel.java
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/seine/FloatingObjectUIHandler.java
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/seine/dcp/FloatingObjectPartsTableCellRenderer.java
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/seine/dcp/FloatingObjectPartsTreeNode.java
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/seine/dcp/FloatingObjectPartsTreeTable.java
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/seine/dcp/FloatingObjectPartsTreeTableModel.java
- client-core/src/main/java/fr/ird/observe/client/ui/content/ref/seine/ObjectMaterialUI.jcss
- client-core/src/main/java/fr/ird/observe/client/ui/content/ref/seine/ObjectMaterialUIHandler.java
- client-core/src/main/java/fr/ird/observe/client/ui/storage/StorageUIHandler.java
- client-core/src/main/java/fr/ird/observe/client/ui/storage/StorageUIModel.java
- client-core/src/main/java/fr/ird/observe/client/ui/tree/navigation/NavigationTreeCellRenderer.java
- client-runner/pom.xml
- dto/pom.xml
- dto/src/main/i18n/getters/java.getter
- dto/src/main/java/fr/ird/observe/binder/referential/common/LengthLengthParameterDtoReferenceBinder.java
- dto/src/main/java/fr/ird/observe/binder/referential/common/LengthWeightParameterDtoReferenceBinder.java
- dto/src/main/java/fr/ird/observe/dto/decoration/DecoratorService.java
- dto/src/main/java/fr/ird/observe/dto/decoration/ObserveI18nLabelsBuilder.java
- dto/src/main/java/fr/ird/observe/dto/referential/LengthLengthParameterReference.java
- dto/src/main/java/fr/ird/observe/dto/referential/LengthWeightParameterReference.java
The diff was not included because it is too large.
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/83b59311f95e46e87b816989ea…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/83b59311f95e46e87b816989ea…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop-7.x] 5 commits: [jgitflow-maven-plugin]updating poms for branch'release/7.0.8' with non-snapshot versions[skip ci]
by Tony CHEMIT 06 Jul '19
by Tony CHEMIT 06 Jul '19
06 Jul '19
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe
Commits:
47dc8e0a by tchemit at 2019-07-06T13:59:42Z
[jgitflow-maven-plugin]updating poms for branch'release/7.0.8' with non-snapshot versions[skip ci]
- - - - -
e219b6f1 by tchemit at 2019-07-06T14:05:38Z
[jgitflow-maven-plugin]merging 'release/7.0.8' into 'master-7.x'
- - - - -
326802cd by tchemit at 2019-07-06T14:05:41Z
[jgitflow-maven-plugin]updating develop poms to master versions to avoid merge conflicts[skip ci]
- - - - -
e3ee2d26 by tchemit at 2019-07-06T14:05:41Z
[jgitflow-maven-plugin]merging 'master-7.x' into 'develop-7.x'
- - - - -
ae2bfff9 by tchemit at 2019-07-06T14:05:42Z
[jgitflow-maven-plugin]Updating develop poms back to pre merge state[skip ci]
- - - - -
0 changed files:
Changes:
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/2c5894262ec5788d121f17ba4c…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/2c5894262ec5788d121f17ba4c…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop-7.x] [jgitflow-maven-plugin]updating poms for 7.0.9-SNAPSHOT development[skip ci]
by Tony CHEMIT 06 Jul '19
by Tony CHEMIT 06 Jul '19
06 Jul '19
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe
Commits:
2c589426 by tchemit at 2019-07-06T13:59:08Z
[jgitflow-maven-plugin]updating poms for 7.0.9-SNAPSHOT development[skip ci]
- - - - -
16 changed files:
- client-configuration/pom.xml
- client-core/pom.xml
- client-runner/pom.xml
- dto/pom.xml
- observe-i18n/pom.xml
- observe/pom.xml
- persistence/pom.xml
- pom.xml
- server-configuration/pom.xml
- server-core/pom.xml
- server-runner/pom.xml
- services-client/pom.xml
- services-local/pom.xml
- services/pom.xml
- test/pom.xml
- validation/pom.xml
Changes:
=====================================
client-configuration/pom.xml
=====================================
@@ -26,7 +26,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.8-SNAPSHOT</version>
+ <version>7.0.9-SNAPSHOT</version>
</parent>
<artifactId>client-configuration</artifactId>
=====================================
client-core/pom.xml
=====================================
@@ -26,7 +26,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.8-SNAPSHOT</version>
+ <version>7.0.9-SNAPSHOT</version>
</parent>
<artifactId>client-core</artifactId>
=====================================
client-runner/pom.xml
=====================================
@@ -26,7 +26,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.8-SNAPSHOT</version>
+ <version>7.0.9-SNAPSHOT</version>
</parent>
<artifactId>client-runner</artifactId>
=====================================
dto/pom.xml
=====================================
@@ -27,7 +27,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.8-SNAPSHOT</version>
+ <version>7.0.9-SNAPSHOT</version>
</parent>
<artifactId>dto</artifactId>
=====================================
observe-i18n/pom.xml
=====================================
@@ -26,7 +26,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.8-SNAPSHOT</version>
+ <version>7.0.9-SNAPSHOT</version>
</parent>
<artifactId>observe-i18n</artifactId>
=====================================
observe/pom.xml
=====================================
@@ -26,7 +26,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.8-SNAPSHOT</version>
+ <version>7.0.9-SNAPSHOT</version>
</parent>
<artifactId>observe</artifactId>
=====================================
persistence/pom.xml
=====================================
@@ -26,7 +26,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.8-SNAPSHOT</version>
+ <version>7.0.9-SNAPSHOT</version>
</parent>
<artifactId>persistence</artifactId>
=====================================
pom.xml
=====================================
@@ -31,7 +31,7 @@
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.8-SNAPSHOT</version>
+ <version>7.0.9-SNAPSHOT</version>
<packaging>pom</packaging>
<name>ObServe :: Pom</name>
=====================================
server-configuration/pom.xml
=====================================
@@ -26,7 +26,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.8-SNAPSHOT</version>
+ <version>7.0.9-SNAPSHOT</version>
</parent>
<artifactId>server-configuration</artifactId>
=====================================
server-core/pom.xml
=====================================
@@ -27,7 +27,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.8-SNAPSHOT</version>
+ <version>7.0.9-SNAPSHOT</version>
</parent>
<artifactId>server-core</artifactId>
=====================================
server-runner/pom.xml
=====================================
@@ -27,7 +27,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.8-SNAPSHOT</version>
+ <version>7.0.9-SNAPSHOT</version>
</parent>
<artifactId>server-runner</artifactId>
=====================================
services-client/pom.xml
=====================================
@@ -27,7 +27,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.8-SNAPSHOT</version>
+ <version>7.0.9-SNAPSHOT</version>
</parent>
<artifactId>services-client</artifactId>
=====================================
services-local/pom.xml
=====================================
@@ -27,7 +27,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.8-SNAPSHOT</version>
+ <version>7.0.9-SNAPSHOT</version>
</parent>
<artifactId>services-local</artifactId>
=====================================
services/pom.xml
=====================================
@@ -27,7 +27,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.8-SNAPSHOT</version>
+ <version>7.0.9-SNAPSHOT</version>
</parent>
<artifactId>services</artifactId>
=====================================
test/pom.xml
=====================================
@@ -26,7 +26,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.8-SNAPSHOT</version>
+ <version>7.0.9-SNAPSHOT</version>
</parent>
<artifactId>test</artifactId>
=====================================
validation/pom.xml
=====================================
@@ -26,7 +26,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.8-SNAPSHOT</version>
+ <version>7.0.9-SNAPSHOT</version>
</parent>
<artifactId>validation</artifactId>
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/2c5894262ec5788d121f17ba4c0…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/2c5894262ec5788d121f17ba4c0…
You're receiving this email because of your account on gitlab.com.
1
0
Tony CHEMIT pushed new branch release/7.0.8 at ultreiaio / ird-observe
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/tree/release/7.0.8
You're receiving this email because of your account on gitlab.com.
1
0
06 Jul '19
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
f23166ca by tchemit at 2019-07-06T13:57:54Z
update changelog [skip ci]
- - - - -
3 changed files:
- .mvn/gitlab-cache/milestones/898778-issues.json
- .mvn/gitlab-cache/milestones/898778.json
- CHANGELOG.md
Changes:
=====================================
.mvn/gitlab-cache/milestones/898778-issues.json
=====================================
@@ -18,7 +18,7 @@
"title": "8.0-RC-3",
"description": "",
"dueDate": "Jul 2, 2019 2:00:00 AM",
- "state": "closed"
+ "state": "active"
},
"assignees": [
{
@@ -54,12 +54,73 @@
"timeEstimate": 0,
"totalTimeSpent": 0
},
- "state": "closed",
- "updatedAt": "Jul 4, 2019 1:42:41 PM",
+ "state": "opened",
+ "updatedAt": "Jul 5, 2019 5:48:25 PM",
"createdAt": "May 22, 2019 11:52:43 AM",
- "closedAt": "Jun 29, 2019 9:14:19 PM",
"webUrl": "https://gitlab.com/ultreiaio/ird-observe/issues/1293"
},
+ {
+ "id": 22488916,
+ "iid": 1343,
+ "projectId": 2722779,
+ "title": "[CARTE] Symboles de cartes pour V8 et V9",
+ "description": "Idées directrices :\n* Les positions d\u0027observations en vert\n* Les positions logbooks en rouge\n* Les positions corrigées en orange (concerne seulement la PS)\n* Des icônes communes PS et LL pour les activités à faible différenciation PS/LL (au port, et activités autres que pêche)\n* Les 4 formes de la manette playstation pour les 4 sous-activités d\u0027une pêche LL\n* 2 autres formes autres que celles utilisées en LL pour les calées PS free et object school\n\nV8 :\n* Point seine activity Obs in harbour **Etoile verte**\n* Point seine activity Obs with free school type **losange vert**\n* Point seine activity Obs with object school type **pentaèdre vert**\n* [NOUVEAU] Point seine Obs tout autre type d\u0027activité **Point vert (petit diamètre)**\n* Point longline activity Obs with setting start **triangle vert**\n* Point longline activity Obs with setting end **carré vert**\n* Point longline activity Obs with hauling start **cercle vert**\n* Point longline activity Obs with hauling end **croix verte**\n* Point longline activity Obs in harbour **Etoile verte, identique seine**\n* [DEPRECIE] Point longline activity Obs with interaction\n* [DEPRECIE] Point longline activity Obs with station\n* [NOUVEAU] Point longline Obs toute autre type d\u0027activité **Point vert (petit diamètre)**, identique seine\n* Point longline activity Logbook with setting start **triangle rouge**\n* Point longline activity Logbook with setting end **carré rouge**\n* Point longline activity Logbook with hauling start **cercle rouge**\n* Point longline activity Logbook with hauling end **croix rouge**\n* Point longline activity Logbook in harbour **Etoile rouge, identique seine**\n* [DEPRECIE] Point longline activity Logbook with interaction\n* [DEPRECIE] Point longline activity Logbook with station\n* [NOUVEAU] Point longline Logbook tout autre type d\u0027activité **Point vert (petit diamètre)**, identique seine\n\nV9 :\n* Point seine activity Logbook in harbour **Etoile rouge**\n* Point seine activity Logbook with free school type **losange rouge**\n* Point seine activity Logbook with object school type **pentaèdre rouge**\n* [NOUVEAU] Point seine Logbook tout autre type d\u0027activité **Point rouge (petit diamètre)**\n* La position corrigée (nouveau champ distinct, optionnel) d\u0027une activité :\n * [NOUVEAU] Point seine activity Logbook in harbour corrigé **Point violet (petit diamètre)**\n * [NOUVEAU] Point seine activity Logbook with free school type corrigé **losange orange**\n * [NOUVEAU] Point seine activity Logbook with object school type corrigé **pentaèdre orange**\n * [NOUVEAU] Point seine Logbook tout autre type d\u0027activité corrigée **Point orange (petit diamètre)**\n* La position d\u0027un FOB/FAD (nouveau champ distinct, optionnel) : **icône Wifi rouge, pour symboliser la transmission à distance**\n\n\n\nCela je ne sais pas si on en a besoin ? \u003d\u003d\u003e Non, une calée seine est considérée ponctuelle, une seule position\n* Point seine activity Logbook with setting start\n* Point seine activity Logbook with setting end\n* Point seine activity Logbook with hauling start\n* Point seine activity Logbook with hauling end",
+ "labels": [
+ "IRD-2018-01-V8",
+ "IRD-2018-02-V9",
+ "Normal",
+ "Palangre",
+ "Senne"
+ ],
+ "milestone": {
+ "id": 898778,
+ "iid": 143,
+ "projectId": 2722779,
+ "groupId": 0,
+ "title": "8.0-RC-3",
+ "description": "",
+ "dueDate": "Jul 2, 2019 2:00:00 AM",
+ "state": "active"
+ },
+ "assignees": [
+ {
+ "_id": 166231,
+ "_username": "tchemit",
+ "_name": "Tony CHEMIT",
+ "_state": "active",
+ "_external": false,
+ "_avatarUrl": "https://secure.gravatar.com/avatar/2a915aa9a1df35c8b609ff2f750d5dac?s\u003d…"
+ }
+ ],
+ "assignee": {
+ "_id": 166231,
+ "_username": "tchemit",
+ "_name": "Tony CHEMIT",
+ "_state": "active",
+ "_external": false,
+ "_avatarUrl": "https://secure.gravatar.com/avatar/2a915aa9a1df35c8b609ff2f750d5dac?s\u003d…"
+ },
+ "author": {
+ "_id": 1111318,
+ "_username": "pcauquil",
+ "_name": "Pascal Cauquil",
+ "_state": "active",
+ "_external": false,
+ "_avatarUrl": "https://secure.gravatar.com/avatar/b4ae117bd93e10d96298fa4d885208ea?s\u003d…"
+ },
+ "userNotesCount": 0,
+ "upVotes": 0,
+ "downVotes": 0,
+ "confidential": false,
+ "timeStats": {
+ "timeEstimate": 0,
+ "totalTimeSpent": 0
+ },
+ "state": "opened",
+ "updatedAt": "Jul 5, 2019 5:48:25 PM",
+ "createdAt": "Jul 3, 2019 5:59:48 PM",
+ "webUrl": "https://gitlab.com/ultreiaio/ird-observe/issues/1343"
+ },
{
"id": 22239676,
"iid": 1337,
@@ -81,7 +142,7 @@
"title": "8.0-RC-3",
"description": "",
"dueDate": "Jul 2, 2019 2:00:00 AM",
- "state": "closed"
+ "state": "active"
},
"assignees": [
{
@@ -142,7 +203,7 @@
"title": "8.0-RC-3",
"description": "",
"dueDate": "Jul 2, 2019 2:00:00 AM",
- "state": "closed"
+ "state": "active"
},
"assignees": [
{
@@ -202,7 +263,7 @@
"title": "8.0-RC-3",
"description": "",
"dueDate": "Jul 2, 2019 2:00:00 AM",
- "state": "closed"
+ "state": "active"
},
"assignees": [
{
@@ -262,7 +323,7 @@
"title": "8.0-RC-3",
"description": "",
"dueDate": "Jul 2, 2019 2:00:00 AM",
- "state": "closed"
+ "state": "active"
},
"assignees": [
{
@@ -323,7 +384,7 @@
"title": "8.0-RC-3",
"description": "",
"dueDate": "Jul 2, 2019 2:00:00 AM",
- "state": "closed"
+ "state": "active"
},
"assignees": [
{
@@ -384,7 +445,7 @@
"title": "8.0-RC-3",
"description": "",
"dueDate": "Jul 2, 2019 2:00:00 AM",
- "state": "closed"
+ "state": "active"
},
"assignees": [
{
=====================================
.mvn/gitlab-cache/milestones/898778.json
=====================================
@@ -6,5 +6,5 @@
"title": "8.0-RC-3",
"description": "",
"dueDate": "Jul 2, 2019 2:00:00 AM",
- "state": "closed"
+ "state": "active"
}
\ No newline at end of file
=====================================
CHANGELOG.md
=====================================
@@ -1,25 +1,7 @@
# ObServe changelog
* Author [Tony Chemit](mailto:dev@tchemit.fr)
- * Last generated at 2019-07-04 13:45.
-
-## Version [8.0-RC-3](https://gitlab.com/ultreiaio/ird-observe/milestones/143)
-
-**Closed at 2019-07-02.**
-
-### Download
-* [Application (observe-8.0-RC-3.zip)](http://repo1.maven.org/maven2/fr/ird/observe/observe…)
-* [Serveur (observe-8.0-RC-3.war)](http://repo1.maven.org/maven2/fr/ird/observe/observe…)
-
-### Issues
- * [[Anomalie 1326]](https://gitlab.com/ultreiaio/ird-observe/issues/1326) **[PS FOB Buoys] Revoir cet écran** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
- * [[Anomalie 1330]](https://gitlab.com/ultreiaio/ird-observe/issues/1330) **N° de versions mentionnés par l'assistant migration** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
- * [[Evolution 1293]](https://gitlab.com/ultreiaio/ird-observe/issues/1293) **Choix de nouvelles couleurs pour les symboles de la carte LL** (Thanks to Pascal Cauquil) (Reported by Pascal Cauquil)
- * [[Evolution 1321]](https://gitlab.com/ultreiaio/ird-observe/issues/1321) **[PS FOB] Mise en place des nouvelles templates de FOB** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
- * [[Evolution 1322]](https://gitlab.com/ultreiaio/ird-observe/issues/1322) **[PS] Transformation de deux énumérations en référentiels** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
- * [[Evolution 1333]](https://gitlab.com/ultreiaio/ird-observe/issues/1333) **[PS FOB] Intégration du nœud Balise en tant qu'onglet du formulaire FOB** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
- * [[Evolution 1337]](https://gitlab.com/ultreiaio/ird-observe/issues/1337) **[PS] Suppression de 2 champs** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
- * [[Tâche 1330]](https://gitlab.com/ultreiaio/ird-observe/issues/1330) **N° de versions mentionnés par l'assistant migration** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
+ * Last generated at 2019-07-06 15:57.
## Version [8.0-RC-2](https://gitlab.com/ultreiaio/ird-observe/milestones/142)
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/f23166caee6fd098bfe8f5d0c41…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/f23166caee6fd098bfe8f5d0c41…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop-9] 4 commits: Module 2 - second flush
by Tony CHEMIT 05 Jul '19
by Tony CHEMIT 05 Jul '19
05 Jul '19
Tony CHEMIT pushed to branch develop-9 at ultreiaio / ird-observe
Commits:
2b110cf1 by tchemit at 2019-07-05T15:48:11Z
Module 2 - second flush
- - - - -
eaaf59fb by tchemit at 2019-07-05T15:48:13Z
Report from v8 for ps logbook model
- - - - -
0fb931d2 by tchemit at 2019-07-05T15:48:13Z
Choix de nouvelles couleurs pour les symboles de la carte LL - Closes #1293
- - - - -
58fc561f by tchemit at 2019-07-05T15:48:13Z
[CARTE] Symboles de cartes pour V8 et V9 - Realign for Ps model - See #1343
- - - - -
30 changed files:
- client-core/pom.xml
- client-core/src/license/THIRD-PARTY.properties
- client-core/src/main/i18n/getters/java.getter
- client-core/src/main/i18n/getters/jaxx.getter
- client-core/src/main/java/fr/ird/observe/client/ui/ObserveMainUI.jaxx
- client-core/src/main/java/fr/ird/observe/client/ui/ObserveMainUI.jcss
- + client-core/src/main/java/fr/ird/observe/client/ui/actions/content/data/ps/ChooseRelatedObservedActivityUIAction.java
- client-core/src/main/java/fr/ird/observe/client/ui/actions/content/data/ps/logbook/add/AddActivitySeineFloatingObjectUIAction.java
- client-core/src/main/java/fr/ird/observe/client/ui/actions/main/menu/navigation/SelectSeineLogbookActivityAction.java
- client-core/src/main/java/fr/ird/observe/client/ui/actions/main/menu/navigation/SelectSeineLogbookReferentialAction.java
- client-core/src/main/java/fr/ird/observe/client/ui/actions/main/menu/navigation/SelectSeineLogbookRouteAction.java
- client-core/src/main/java/fr/ird/observe/client/ui/actions/main/menu/navigation/SelectSeineActivityAction.java → client-core/src/main/java/fr/ird/observe/client/ui/actions/main/menu/navigation/SelectSeineObsActivityAction.java
- client-core/src/main/java/fr/ird/observe/client/ui/actions/main/menu/navigation/SelectSeineRouteAction.java → client-core/src/main/java/fr/ird/observe/client/ui/actions/main/menu/navigation/SelectSeineObsRouteAction.java
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/ll/common/TripMapContentBuilder.java
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/ps/common/TripMapContentBuilder.java
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/ps/common/TripSeineUIHandler.java
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/ps/logbook/ActivitySeineListUI.jaxx
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/ps/logbook/ActivitySeineUI.jaxx
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/ps/logbook/ActivitySeineUI.jcss
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/ps/logbook/ActivitySeineUIHandler.java
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/ps/logbook/ActivitySeineUIModel.java
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/ps/logbook/CatchUI.jaxx
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/ps/logbook/CatchUI.jcss
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/ps/logbook/CatchUIHandler.java
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/ps/logbook/FloatingObjectUI.jaxx
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/ps/logbook/FloatingObjectUI.jcss
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/ps/logbook/FloatingObjectUIHandler.java
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/ps/logbook/RouteListUI.jaxx
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/ps/logbook/RouteUI.jaxx
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/ps/logbook/RouteUI.jcss
The diff was not included because it is too large.
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/a8be7fa445da44c15fac88197e…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/a8be7fa445da44c15fac88197e…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop] 2 commits: [CARTE] Symboles de cartes pour V8 et V9 - Refactor code - See #1343
by Tony CHEMIT 05 Jul '19
by Tony CHEMIT 05 Jul '19
05 Jul '19
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
87e581b5 by tchemit at 2019-07-05T13:29:57Z
[CARTE] Symboles de cartes pour V8 et V9 - Refactor code - See #1343
- - - - -
1613a685 by tchemit at 2019-07-05T13:29:58Z
Revert "Impossible de remplir le champ espèces - Closes #1273"
This reverts commit d1f46eec
- - - - -
22 changed files:
- client-configuration/src/main/config/Client.ini
- client-configuration/src/main/i18n/getters/config.getter
- client-core/src/main/java/fr/ird/observe/client/ui/actions/main/menu/config/ShowConfigAction.java
- client-core/src/main/java/fr/ird/observe/client/ui/content/Common.jcss
- client-core/src/main/java/fr/ird/observe/client/ui/content/api/ContentUI.jaxx
- client-core/src/main/java/fr/ird/observe/client/ui/content/api/ContentUI.jcss
- client-core/src/main/java/fr/ird/observe/client/ui/content/api/data/table/ContentTableUI.jcss
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/ll/common/TripLonglineUI.jaxx
- + client-core/src/main/java/fr/ird/observe/client/ui/content/data/ll/common/TripMapContentBuilder.java
- + client-core/src/main/java/fr/ird/observe/client/ui/content/data/ps/common/TripMapContentBuilder.java
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/ps/common/TripSeineUI.jaxx
- client-core/src/main/java/fr/ird/observe/client/ui/util/tripMap/TripMapContentBuilder.java
- client-core/src/main/java/fr/ird/observe/client/ui/util/tripMap/TripMapUIHandler.java
- client-core/src/main/map/style.xml → client-core/src/main/map/ll-style.xml
- + client-core/src/main/map/ps-style.xml
- dto/src/main/i18n/getters/java-enumeration.getter
- dto/src/main/java/fr/ird/observe/dto/data/TripMapPointType.java
- observe-i18n/src/main/i18n/translations/observe_en_GB.properties
- observe-i18n/src/main/i18n/translations/observe_es_ES.properties
- observe-i18n/src/main/i18n/translations/observe_fr_FR.properties
- persistence/src/main/java/fr/ird/observe/entities/data/ll/common/TripLonglineTopiaDao.java
- persistence/src/main/java/fr/ird/observe/entities/data/ps/common/TripSeineTopiaDao.java
Changes:
=====================================
client-configuration/src/main/config/Client.ini
=====================================
@@ -510,11 +510,17 @@ description = observe.config.map.layer10.description
key = map.layer10.path
type = file
-[option mapStyleFile]
-description = observe.config.map.style.description
-key = map.style.path
+[option mapPsStyleFile]
+description = observe.config.map.ps.style.description
+key = map.ps.style.path
type = file
-defaultValue = ${resources.directory}/map/style.xml
+defaultValue = ${resources.directory}/map/ps-style.xml
+
+[option mapLlStyleFile]
+description = observe.config.map.ll.style.description
+key = map.ll.style.path
+type = file
+defaultValue = ${resources.directory}/map/ll-style.xml
[option navigationEditModel]
description = observe.config.ui.treeOpenNodes
=====================================
client-configuration/src/main/i18n/getters/config.getter
=====================================
@@ -59,7 +59,8 @@ observe.config.map.layer6.description
observe.config.map.layer7.description
observe.config.map.layer8.description
observe.config.map.layer9.description
-observe.config.map.style.description
+observe.config.map.ll.style.description
+observe.config.map.ps.style.description
observe.config.observation.activitysDetaillees
observe.config.observation.fauneAssociee
observe.config.observation.floatingObject
=====================================
client-core/src/main/java/fr/ird/observe/client/ui/actions/main/menu/config/ShowConfigAction.java
=====================================
@@ -215,7 +215,8 @@ public class ShowConfigAction extends MenuActionSupport {
helper.addOption(ClientConfigOption.MAP_BACKGROUND_COLOR);
ClientConfig.MAP_LAYERS.forEach(helper::addOption);
- helper.addOption(ClientConfigOption.MAP_STYLE_FILE);
+ helper.addOption(ClientConfigOption.MAP_PS_STYLE_FILE);
+ helper.addOption(ClientConfigOption.MAP_LL_STYLE_FILE);
}
=====================================
client-core/src/main/java/fr/ird/observe/client/ui/content/Common.jcss
=====================================
@@ -43,9 +43,4 @@ BigTextEditor {
BeanCheckBox {
i18nProperty:"";
horizontalTextPosition:{BeanCheckBox.LEFT};
-}
-
-#bodyScrollPane {
- verticalScrollBarPolicy:{JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED};
- horizontalScrollBarPolicy:{JScrollPane.HORIZONTAL_SCROLLBAR_NEVER};
}
\ No newline at end of file
=====================================
client-core/src/main/java/fr/ird/observe/client/ui/content/api/ContentUI.jaxx
=====================================
@@ -125,7 +125,9 @@ public void resetEdit() {
<JPanel id='contentContainer'>
<JXLayer UI='{blockLayerUI}' constraints='BorderLayout.CENTER'>
+
<JPanel id='body'/>
+
</JXLayer>
<Table id='actions' constraints='BorderLayout.SOUTH'/>
=====================================
client-core/src/main/java/fr/ird/observe/client/ui/content/api/ContentUI.jcss
=====================================
@@ -67,7 +67,3 @@
borderPainted:false;
}
-#bodyScrollPane {
- verticalScrollBarPolicy:{JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED};
- horizontalScrollBarPolicy:{JScrollPane.HORIZONTAL_SCROLLBAR_NEVER};
-}
=====================================
client-core/src/main/java/fr/ird/observe/client/ui/content/api/data/table/ContentTableUI.jcss
=====================================
@@ -132,4 +132,3 @@
verticalAlignment:"center";
horizontalAlignment:"center";
}
-
=====================================
client-core/src/main/java/fr/ird/observe/client/ui/content/data/ll/common/TripLonglineUI.jaxx
=====================================
@@ -72,8 +72,7 @@
</BeanValidator>
<JPanel id="body" layout='{new BorderLayout()}'>
- <JScrollPane id='bodyScrollPane' constraints='BorderLayout.CENTER'>
- <JTabbedPane id='mainTabbedPane'>
+ <JTabbedPane id='mainTabbedPane' constraints='BorderLayout.CENTER'>
<tab id='generalTab' i18nProperty="">
<Table fill="both">
@@ -328,7 +327,6 @@
<TripMapUI id="tripMap"/>
</tab>
</JTabbedPane>
- </JScrollPane>
</JPanel>
<!-- surcharge des actions (pour appliquer la css specifique) -->
=====================================
client-core/src/main/java/fr/ird/observe/client/ui/content/data/ll/common/TripMapContentBuilder.java
=====================================
@@ -0,0 +1,391 @@
+package fr.ird.observe.client.ui.content.data.ll.common;
+
+/*-
+ * #%L
+ * ObServe :: Client core
+ * %%
+ * Copyright (C) 2008 - 2019 IRD, Code Lutin, Ultreia.io
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
+import com.google.auto.service.AutoService;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Lists;
+import fr.ird.observe.client.configuration.ClientConfig;
+import fr.ird.observe.client.ui.util.tripMap.ObserveMapPaneLegendItem;
+import fr.ird.observe.dto.data.TripMapDto;
+import fr.ird.observe.dto.data.TripMapPoint;
+import fr.ird.observe.dto.data.TripMapPointType;
+import fr.ird.observe.spi.DtoModelClasses;
+import org.geotools.feature.DefaultFeatureCollection;
+import org.geotools.feature.simple.SimpleFeatureBuilder;
+import org.geotools.feature.simple.SimpleFeatureTypeBuilder;
+import org.geotools.geometry.jts.JTSFactoryFinder;
+import org.geotools.map.FeatureLayer;
+import org.geotools.map.Layer;
+import org.geotools.referencing.CRS;
+import org.geotools.styling.Style;
+import org.locationtech.jts.geom.Coordinate;
+import org.locationtech.jts.geom.GeometryFactory;
+import org.locationtech.jts.geom.LineString;
+import org.locationtech.jts.geom.Polygon;
+import org.opengis.feature.simple.SimpleFeature;
+import org.opengis.feature.simple.SimpleFeatureType;
+import org.opengis.referencing.FactoryException;
+
+import java.io.File;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static io.ultreia.java4all.i18n.I18n.t;
+
+/**
+ * Created on 04/07/19.
+ *
+ * @author Tony Chemit - dev(a)tchemit.fr
+ * @since ?
+ */
+@AutoService(fr.ird.observe.client.ui.util.tripMap.TripMapContentBuilder.class)
+public class TripMapContentBuilder extends fr.ird.observe.client.ui.util.tripMap.TripMapContentBuilder {
+
+ private static final String TRIP_LONGLINE_OBS_FISHING_ZONE_LAYER_NAME = "Trip longline observation zone";
+ private static final String TRIP_LONGLINE_OBS_LINE_LAYER_NAME = "Trip longline observation line";
+ private static final String TRIP_LONGLINE_LOGBOOK_FISHING_ZONE_LAYER_NAME = "Trip longline logbook zone";
+ private static final String TRIP_LONGLINE_LOGBOOK_LINE_LAYER_NAME = "Trip longline logbook line";
+
+ public TripMapContentBuilder() {
+ super(ImmutableSet.of(
+ TripMapPointType.llActivityObs,
+ TripMapPointType.llActivityObsInHarbour,
+ TripMapPointType.llActivityObsWithSettingStart,
+ TripMapPointType.llActivityObsWithSettingEnd,
+ TripMapPointType.llActivityObsWithHaulingStart,
+ TripMapPointType.llActivityObsWithHaulingEnd,
+ TripMapPointType.llActivityLogbook,
+ TripMapPointType.llActivityLogbookInHarbour,
+ TripMapPointType.llActivityLogbookWithSettingStart,
+ TripMapPointType.llActivityLogbookWithSettingEnd,
+ TripMapPointType.llActivityLogbookWithHaulingStart,
+ TripMapPointType.llActivityLogbookWithHaulingEnd
+ ));
+ }
+
+ @Override
+ public boolean accept(TripMapDto tripMapDto) {
+ return DtoModelClasses.isLonglineId(tripMapDto.getTripId());
+ }
+
+ @Override
+ protected File getStyleFile(ClientConfig config) {
+ return config.getMapLlStyleFile();
+ }
+
+ @Override
+ protected void addLines(List<TripMapPoint> tripMapPoints) throws FactoryException {
+
+ addLonglineObsFishingZone(tripMapPoints);
+ addLonglineObsLine(tripMapPoints);
+ addLonglineLogbookFishingZone(tripMapPoints);
+ addLonglineLogbookLine(tripMapPoints);
+
+ }
+
+ @Override
+ protected void addPoints(List<TripMapPoint> tripMapPoints) throws FactoryException {
+ addPoints(tripMapPoints.stream().filter(f->f.getType().isTrip() || f.getType().isObs()).collect(Collectors.toList()), TRIP_OBS_POINTS_LAYER_NAME);
+ addPoints(tripMapPoints.stream().filter(f->f.getType().isTrip() || f.getType().isLogbook()).collect(Collectors.toList()), TRIP_LOGBOOK_POINTS_LAYER_NAME);
+ }
+
+ private void addLonglineObsFishingZone(List<TripMapPoint> tripMapPoints) throws FactoryException {
+ GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();
+
+ SimpleFeatureTypeBuilder polygonFeatureTypeBuilder = new SimpleFeatureTypeBuilder();
+ polygonFeatureTypeBuilder.setName("longlineFishingZoneBuilder");
+ polygonFeatureTypeBuilder.setCRS(CRS.decode("EPSG:4326", true));
+ polygonFeatureTypeBuilder.add("zone", Polygon.class);
+ polygonFeatureTypeBuilder.add("label", String.class);
+ polygonFeatureTypeBuilder.add("type", String.class);
+
+ SimpleFeatureType polygonFeatureType = polygonFeatureTypeBuilder.buildFeatureType();
+ SimpleFeatureBuilder polygonBuilder = new SimpleFeatureBuilder(polygonFeatureType);
+
+ DefaultFeatureCollection polygonsFeatures = new DefaultFeatureCollection();
+
+ for (int indexPoint = 3; indexPoint < tripMapPoints.size(); indexPoint++) {
+ if (tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.llActivityObsWithHaulingEnd)
+ && tripMapPoints.get(indexPoint - 1).getType().equals(TripMapPointType.llActivityObsWithHaulingStart)
+ && tripMapPoints.get(indexPoint - 2).getType().equals(TripMapPointType.llActivityObsWithSettingEnd)
+ && tripMapPoints.get(indexPoint - 3).getType().equals(TripMapPointType.llActivityObsWithSettingStart)) {
+
+ Coordinate[] coordinates = {
+ new Coordinate(tripMapPoints.get(indexPoint - 3).getLongitude(), tripMapPoints.get(indexPoint - 3).getLatitude()),
+ new Coordinate(tripMapPoints.get(indexPoint - 2).getLongitude(), tripMapPoints.get(indexPoint - 2).getLatitude()),
+ new Coordinate(tripMapPoints.get(indexPoint - 1).getLongitude(), tripMapPoints.get(indexPoint - 1).getLatitude()),
+ new Coordinate(tripMapPoints.get(indexPoint).getLongitude(), tripMapPoints.get(indexPoint).getLatitude()),
+ new Coordinate(tripMapPoints.get(indexPoint - 3).getLongitude(), tripMapPoints.get(indexPoint - 3).getLatitude())
+ };
+
+
+ Polygon polygon = geometryFactory.createPolygon(coordinates);
+ //polygon = (Polygon) polygon.convexHull(); // permet de transformer un poliqgone croisé en polygon convex
+ polygonBuilder.add(polygon);
+ polygonBuilder.add(DATE_FORMAT.format(tripMapPoints.get(indexPoint - 3).getTime()));
+ polygonBuilder.add("longlineFishingZone");
+ SimpleFeature feature = polygonBuilder.buildFeature(null);
+ polygonsFeatures.add(feature);
+
+ }
+ }
+
+ if (!polygonsFeatures.isEmpty()) {
+ Style styleLines = findStyle(styledLayerDescriptor, TRIP_LONGLINE_OBS_FISHING_ZONE_LAYER_NAME, null);
+ Layer layerLines = new FeatureLayer(polygonsFeatures, styleLines, TRIP_LONGLINE_OBS_FISHING_ZONE_LAYER_NAME);
+ mapContent.addLayer(layerLines);
+ }
+ }
+
+ private void addLonglineLogbookFishingZone(List<TripMapPoint> tripMapPoints) throws FactoryException {
+ GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();
+
+ SimpleFeatureTypeBuilder polygonFeatureTypeBuilder = new SimpleFeatureTypeBuilder();
+ polygonFeatureTypeBuilder.setName("longlineFishingZoneBuilder");
+ polygonFeatureTypeBuilder.setCRS(CRS.decode("EPSG:4326", true));
+ polygonFeatureTypeBuilder.add("zone", Polygon.class);
+ polygonFeatureTypeBuilder.add("label", String.class);
+ polygonFeatureTypeBuilder.add("type", String.class);
+
+ SimpleFeatureType polygonFeatureType = polygonFeatureTypeBuilder.buildFeatureType();
+ SimpleFeatureBuilder polygonBuilder = new SimpleFeatureBuilder(polygonFeatureType);
+
+ DefaultFeatureCollection polygonsFeatures = new DefaultFeatureCollection();
+
+ for (int indexPoint = 3; indexPoint < tripMapPoints.size(); indexPoint++) {
+ if (tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.llActivityLogbookWithHaulingEnd)
+ && tripMapPoints.get(indexPoint - 1).getType().equals(TripMapPointType.llActivityLogbookWithHaulingStart)
+ && tripMapPoints.get(indexPoint - 2).getType().equals(TripMapPointType.llActivityLogbookWithSettingEnd)
+ && tripMapPoints.get(indexPoint - 3).getType().equals(TripMapPointType.llActivityLogbookWithSettingStart)) {
+
+ Coordinate[] coordinates = {
+ new Coordinate(tripMapPoints.get(indexPoint - 3).getLongitude(), tripMapPoints.get(indexPoint - 3).getLatitude()),
+ new Coordinate(tripMapPoints.get(indexPoint - 2).getLongitude(), tripMapPoints.get(indexPoint - 2).getLatitude()),
+ new Coordinate(tripMapPoints.get(indexPoint - 1).getLongitude(), tripMapPoints.get(indexPoint - 1).getLatitude()),
+ new Coordinate(tripMapPoints.get(indexPoint).getLongitude(), tripMapPoints.get(indexPoint).getLatitude()),
+ new Coordinate(tripMapPoints.get(indexPoint - 3).getLongitude(), tripMapPoints.get(indexPoint - 3).getLatitude())
+ };
+
+
+ Polygon polygon = geometryFactory.createPolygon(coordinates);
+ //polygon = (Polygon) polygon.convexHull(); // permet de transformer un poliqgone croisé en polygon convex
+ polygonBuilder.add(polygon);
+ polygonBuilder.add(DATE_FORMAT.format(tripMapPoints.get(indexPoint - 3).getTime()));
+ polygonBuilder.add("longlineFishingZone");
+ SimpleFeature feature = polygonBuilder.buildFeature(null);
+ polygonsFeatures.add(feature);
+
+ }
+ }
+
+ if (!polygonsFeatures.isEmpty()) {
+ Style styleLines = findStyle(styledLayerDescriptor, TRIP_LONGLINE_LOGBOOK_FISHING_ZONE_LAYER_NAME, null);
+ Layer layerLines = new FeatureLayer(polygonsFeatures, styleLines, TRIP_LONGLINE_LOGBOOK_FISHING_ZONE_LAYER_NAME);
+ mapContent.addLayer(layerLines);
+ }
+ }
+
+ private void addLonglineObsLine(List<TripMapPoint> tripMapPoints) throws FactoryException {
+ GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();
+
+ SimpleFeatureTypeBuilder lineFeatureTypeBuilder = new SimpleFeatureTypeBuilder();
+ lineFeatureTypeBuilder.setName("longlineSettingBuilder");
+ lineFeatureTypeBuilder.setCRS(CRS.decode("EPSG:4326", true));
+ lineFeatureTypeBuilder.add("line", LineString.class);
+ lineFeatureTypeBuilder.add("type", String.class);
+
+ SimpleFeatureType lineFeatureType = lineFeatureTypeBuilder.buildFeatureType();
+ SimpleFeatureBuilder lineBuilder = new SimpleFeatureBuilder(lineFeatureType);
+
+ DefaultFeatureCollection linesFeatures = new DefaultFeatureCollection();
+
+ List<Coordinate> defaultLineCoordinates = Lists.newLinkedList();
+ boolean found = false;
+ for (int indexPoint = 0; indexPoint < tripMapPoints.size(); indexPoint++) {
+ if (indexPoint > 1 && tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.llActivityObsWithSettingEnd)
+ && tripMapPoints.get(indexPoint - 1).getType().equals(TripMapPointType.llActivityObsWithSettingStart)
+ || tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.llActivityObsWithHaulingEnd)
+ && tripMapPoints.get(indexPoint - 1).getType().equals(TripMapPointType.llActivityObsWithHaulingStart)) {
+
+ found = true;
+ Coordinate[] coordinates = {
+ new Coordinate(tripMapPoints.get(indexPoint - 1).getLongitude(), tripMapPoints.get(indexPoint - 1).getLatitude()),
+ new Coordinate(tripMapPoints.get(indexPoint).getLongitude(), tripMapPoints.get(indexPoint).getLatitude()),
+ };
+
+ boolean setting = tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.llActivityObsWithSettingEnd);
+ LineString lineString = geometryFactory.createLineString(coordinates);
+ lineBuilder.add(lineString);
+ lineBuilder.add(setting ? "setting" : "hauling");
+ SimpleFeature feature = lineBuilder.buildFeature(null);
+ linesFeatures.add(feature);
+
+ defaultLineCoordinates.clear();
+ }
+
+ if (!(tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.llActivityObsWithSettingEnd)
+ || tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.llActivityObsWithHaulingStart))) {
+
+ defaultLineCoordinates.add(new Coordinate(tripMapPoints.get(indexPoint).getLongitude(), tripMapPoints.get(indexPoint).getLatitude()));
+
+ }
+
+ if ((tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.llActivityObsWithSettingStart)
+ || indexPoint == tripMapPoints.size() - 1) && defaultLineCoordinates.size() > 1) {
+
+ LineString lineString = geometryFactory.createLineString(defaultLineCoordinates.toArray(new Coordinate[0]));
+ lineBuilder.add(lineString);
+ lineBuilder.add("trip");
+ SimpleFeature feature = lineBuilder.buildFeature(null);
+ linesFeatures.add(feature);
+
+ defaultLineCoordinates.clear();
+
+ }
+
+
+ }
+
+ Style styleLines = findStyle(styledLayerDescriptor, TRIP_LONGLINE_OBS_LINE_LAYER_NAME, null);
+ if (!linesFeatures.isEmpty()) {
+ Layer layerLines = new FeatureLayer(linesFeatures, styleLines, TRIP_LONGLINE_OBS_LINE_LAYER_NAME);
+ mapContent.addLayer(layerLines);
+ }
+
+ if (found) {
+ // add line in legend
+ LineString line = geometryFactory.createLineString(ObserveMapPaneLegendItem.lineCoordinates());
+ lineBuilder.add(line);
+ lineBuilder.add("setting");
+
+ ObserveMapPaneLegendItem legendTripDay = new ObserveMapPaneLegendItem(
+ lineBuilder.buildFeature(null),
+ styleLines,
+ t("observe.content.map.legend.obs.setting"));
+ legendItems.add(legendTripDay);
+
+ line = geometryFactory.createLineString(ObserveMapPaneLegendItem.lineCoordinates());
+ lineBuilder.add(line);
+ lineBuilder.add("hauling");
+
+ legendTripDay = new ObserveMapPaneLegendItem(
+ lineBuilder.buildFeature(null),
+ styleLines,
+ t("observe.content.map.legend.obs.hauling"));
+ legendItems.add(legendTripDay);
+ }
+
+ }
+
+ private void addLonglineLogbookLine(List<TripMapPoint> tripMapPoints) throws FactoryException {
+ GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();
+
+ SimpleFeatureTypeBuilder lineFeatureTypeBuilder = new SimpleFeatureTypeBuilder();
+ lineFeatureTypeBuilder.setName("longlineSettingBuilder");
+ lineFeatureTypeBuilder.setCRS(CRS.decode("EPSG:4326", true));
+ lineFeatureTypeBuilder.add("line", LineString.class);
+ lineFeatureTypeBuilder.add("type", String.class);
+
+ SimpleFeatureType lineFeatureType = lineFeatureTypeBuilder.buildFeatureType();
+ SimpleFeatureBuilder lineBuilder = new SimpleFeatureBuilder(lineFeatureType);
+
+ DefaultFeatureCollection linesFeatures = new DefaultFeatureCollection();
+
+ List<Coordinate> defaultLineCoordinates = Lists.newLinkedList();
+ boolean found = false;
+ for (int indexPoint = 0; indexPoint < tripMapPoints.size(); indexPoint++) {
+ if (indexPoint > 1 && tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.llActivityLogbookWithSettingEnd)
+ && tripMapPoints.get(indexPoint - 1).getType().equals(TripMapPointType.llActivityLogbookWithSettingStart)
+ || tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.llActivityLogbookWithHaulingEnd)
+ && tripMapPoints.get(indexPoint - 1).getType().equals(TripMapPointType.llActivityLogbookWithHaulingStart)) {
+ found = true;
+ Coordinate[] coordinates = {
+ new Coordinate(tripMapPoints.get(indexPoint - 1).getLongitude(), tripMapPoints.get(indexPoint - 1).getLatitude()),
+ new Coordinate(tripMapPoints.get(indexPoint).getLongitude(), tripMapPoints.get(indexPoint).getLatitude()),
+ };
+
+ boolean setting = tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.llActivityLogbookWithSettingEnd);
+ LineString lineString = geometryFactory.createLineString(coordinates);
+ lineBuilder.add(lineString);
+ lineBuilder.add(setting ? "setting" : "hauling");
+ SimpleFeature feature = lineBuilder.buildFeature(null);
+ linesFeatures.add(feature);
+
+ defaultLineCoordinates.clear();
+ }
+
+ if (!(tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.llActivityLogbookWithSettingEnd)
+ || tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.llActivityLogbookWithHaulingStart))) {
+
+ defaultLineCoordinates.add(new Coordinate(tripMapPoints.get(indexPoint).getLongitude(), tripMapPoints.get(indexPoint).getLatitude()));
+
+ }
+
+ if ((tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.llActivityLogbookWithSettingStart)
+ || indexPoint == tripMapPoints.size() - 1) && defaultLineCoordinates.size() > 1) {
+
+ LineString lineString = geometryFactory.createLineString(defaultLineCoordinates.toArray(new Coordinate[0]));
+ lineBuilder.add(lineString);
+ lineBuilder.add("trip");
+ SimpleFeature feature = lineBuilder.buildFeature(null);
+ linesFeatures.add(feature);
+
+ defaultLineCoordinates.clear();
+
+ }
+
+
+ }
+ if (found) {
+ Style styleLines = findStyle(styledLayerDescriptor, TRIP_LONGLINE_LOGBOOK_LINE_LAYER_NAME, null);
+ if (!linesFeatures.isEmpty()) {
+ Layer layerLines = new FeatureLayer(linesFeatures, styleLines, TRIP_LONGLINE_LOGBOOK_LINE_LAYER_NAME);
+ mapContent.addLayer(layerLines);
+ }
+
+ // add line in legend
+ LineString line = geometryFactory.createLineString(ObserveMapPaneLegendItem.lineCoordinates());
+ lineBuilder.add(line);
+ lineBuilder.add("setting");
+
+ ObserveMapPaneLegendItem legendTripDay = new ObserveMapPaneLegendItem(
+ lineBuilder.buildFeature(null),
+ styleLines,
+ t("observe.content.map.legend.logbook.setting"));
+ legendItems.add(legendTripDay);
+
+ line = geometryFactory.createLineString(ObserveMapPaneLegendItem.lineCoordinates());
+ lineBuilder.add(line);
+ lineBuilder.add("hauling");
+
+ legendTripDay = new ObserveMapPaneLegendItem(
+ lineBuilder.buildFeature(null),
+ styleLines,
+ t("observe.content.map.legend.logbook.hauling"));
+ legendItems.add(legendTripDay);
+ }
+ }
+
+
+}
=====================================
client-core/src/main/java/fr/ird/observe/client/ui/content/data/ps/common/TripMapContentBuilder.java
=====================================
@@ -0,0 +1,186 @@
+package fr.ird.observe.client.ui.content.data.ps.common;
+
+/*-
+ * #%L
+ * ObServe :: Client core
+ * %%
+ * Copyright (C) 2008 - 2019 IRD, Code Lutin, Ultreia.io
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
+import com.google.auto.service.AutoService;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Lists;
+import fr.ird.observe.client.configuration.ClientConfig;
+import fr.ird.observe.client.ui.util.tripMap.ObserveMapPaneLegendItem;
+import fr.ird.observe.dto.data.TripMapDto;
+import fr.ird.observe.dto.data.TripMapPoint;
+import fr.ird.observe.dto.data.TripMapPointType;
+import fr.ird.observe.spi.DtoModelClasses;
+import org.apache.commons.lang3.time.DateUtils;
+import org.geotools.feature.DefaultFeatureCollection;
+import org.geotools.feature.simple.SimpleFeatureBuilder;
+import org.geotools.feature.simple.SimpleFeatureTypeBuilder;
+import org.geotools.geometry.jts.JTSFactoryFinder;
+import org.geotools.map.FeatureLayer;
+import org.geotools.map.Layer;
+import org.geotools.referencing.CRS;
+import org.geotools.styling.Style;
+import org.locationtech.jts.geom.Coordinate;
+import org.locationtech.jts.geom.GeometryFactory;
+import org.locationtech.jts.geom.LineString;
+import org.opengis.feature.simple.SimpleFeature;
+import org.opengis.feature.simple.SimpleFeatureType;
+import org.opengis.referencing.FactoryException;
+
+import java.io.File;
+import java.text.DateFormat;
+import java.util.List;
+
+import static io.ultreia.java4all.i18n.I18n.t;
+
+/**
+ * Created on 04/07/19.
+ *
+ * @author Tony Chemit - dev(a)tchemit.fr
+ * @since ?
+ */
+@AutoService(fr.ird.observe.client.ui.util.tripMap.TripMapContentBuilder.class)
+public class TripMapContentBuilder extends fr.ird.observe.client.ui.util.tripMap.TripMapContentBuilder {
+
+ private static final String TRIP_LINES_LAYER_NAME = "Trip seine lines";
+
+ public TripMapContentBuilder() {
+ super(ImmutableSet.of(
+ TripMapPointType.psActivityObs,
+ TripMapPointType.psActivityObsInHarbour,
+ TripMapPointType.psActivityObsWithFreeSchoolType,
+ TripMapPointType.psActivityObsWithObjectSchoolType
+ ));
+ }
+
+ @Override
+ public boolean accept(TripMapDto tripMapDto) {
+ return DtoModelClasses.isSeineId(tripMapDto.getTripId());
+ }
+
+ @Override
+ protected File getStyleFile(ClientConfig config) {
+ return config.getMapPsStyleFile();
+ }
+
+ @Override
+ protected void addPoints(List<TripMapPoint> tripMapPoints) throws FactoryException {
+ addPoints(tripMapPoints, TRIP_OBS_POINTS_LAYER_NAME);
+// addPoints(tripMapPoints, TRIP_LOGBOOK_POINTS_LAYER_NAME);
+ }
+
+ @Override
+ protected void addLines(List<TripMapPoint> tripMapPoints) throws FactoryException {
+
+ GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();
+
+ SimpleFeatureTypeBuilder lineFeatureTypeBuilder = new SimpleFeatureTypeBuilder();
+ lineFeatureTypeBuilder.setName("lineBuilder");
+ lineFeatureTypeBuilder.setCRS(CRS.decode("EPSG:4326", true));
+ lineFeatureTypeBuilder.add("line", LineString.class);
+ lineFeatureTypeBuilder.add("label", String.class);
+ lineFeatureTypeBuilder.add("type", String.class);
+
+ SimpleFeatureType lineFeatureType = lineFeatureTypeBuilder.buildFeatureType();
+ SimpleFeatureBuilder lineBuilder = new SimpleFeatureBuilder(lineFeatureType);
+
+ DefaultFeatureCollection linesFeatures = new DefaultFeatureCollection();
+
+ List<Coordinate> coordinatesByDay = null;
+
+ TripMapPoint previousPoint = null;
+
+ for (TripMapPoint point : tripMapPoints) {
+ if (previousPoint == null) {
+ coordinatesByDay = Lists.newLinkedList();
+ } else if (!DateUtils.isSameDay(previousPoint.getTime(), point.getTime())) {
+
+ if (coordinatesByDay.size() > 1) {
+ LineString line = geometryFactory.createLineString(coordinatesByDay.toArray(new Coordinate[0]));
+ lineBuilder.add(line);
+ lineBuilder.add(DATE_FORMAT.format(previousPoint.getTime()));
+ lineBuilder.add("tripDay");
+ SimpleFeature feature = lineBuilder.buildFeature(null);
+
+ linesFeatures.add(feature);
+ }
+
+ Coordinate[] coordinates = {
+ new Coordinate(previousPoint.getLongitude(), previousPoint.getLatitude()),
+ new Coordinate(point.getLongitude(), point.getLatitude()),
+ };
+ LineString lineBetweenTwoDays = geometryFactory.createLineString(coordinates);
+ lineBuilder.add(lineBetweenTwoDays);
+ lineBuilder.add(DateFormat.getDateInstance().format(previousPoint.getTime()));
+ lineBuilder.add("tripBetweenTwoDays");
+ linesFeatures.add(lineBuilder.buildFeature(null));
+
+ coordinatesByDay = Lists.newLinkedList();
+ }
+
+ Coordinate coordinate = new Coordinate(point.getLongitude(), point.getLatitude());
+ coordinatesByDay.add(coordinate);
+
+ previousPoint = point;
+ }
+
+ if (coordinatesByDay != null && coordinatesByDay.size() > 1) {
+ LineString line = geometryFactory.createLineString(coordinatesByDay.toArray(new Coordinate[0]));
+ lineBuilder.add(line);
+ lineBuilder.add(DATE_FORMAT.format(previousPoint.getTime()));
+ lineBuilder.add("tripDay");
+ linesFeatures.add(lineBuilder.buildFeature(null));
+ }
+
+ Style styleLines = findStyle(styledLayerDescriptor, TRIP_LINES_LAYER_NAME, null);
+
+ if (!linesFeatures.isEmpty()) {
+ Layer layerLines = new FeatureLayer(linesFeatures, styleLines, TRIP_LINES_LAYER_NAME);
+ mapContent.addLayer(layerLines);
+ }
+
+
+ // add line in legend
+ LineString line = geometryFactory.createLineString(ObserveMapPaneLegendItem.lineCoordinates());
+ lineBuilder.add(line);
+ lineBuilder.add("");
+ lineBuilder.add("tripDay");
+
+ ObserveMapPaneLegendItem legendTripDay = new ObserveMapPaneLegendItem(
+ lineBuilder.buildFeature(null),
+ styleLines,
+ t("observe.content.map.legend.tripDay"));
+ legendItems.add(legendTripDay);
+
+ lineBuilder.add(line);
+ lineBuilder.add("");
+ lineBuilder.add("tripBetweenTwoDays");
+ ObserveMapPaneLegendItem legendTripBetweenTwoDays = new ObserveMapPaneLegendItem(
+ lineBuilder.buildFeature(null),
+ styleLines,
+ t("observe.content.map.legend.tripBetweenTwoDays"));
+ legendItems.add(legendTripBetweenTwoDays);
+
+ }
+
+}
=====================================
client-core/src/main/java/fr/ird/observe/client/ui/content/data/ps/common/TripSeineUI.jaxx
=====================================
@@ -79,8 +79,7 @@
<!-- formulaire -->
<JPanel id="body" layout='{new BorderLayout()}'>
- <JScrollPane id='bodyScrollPane' constraints='BorderLayout.CENTER'>
- <JTabbedPane id='mainTabbedPane'>
+ <JTabbedPane id='mainTabbedPane' constraints='BorderLayout.CENTER'>
<tab id='generalTab' i18nProperty="">
<Table insets="0" fill="both" id="formGeneral">
@@ -227,7 +226,6 @@
<TripMapUI id="tripMap"/>
</tab>
</JTabbedPane>
- </JScrollPane>
</JPanel>
<!-- surcharge des actions (pour appliquer la css specifique) -->
=====================================
client-core/src/main/java/fr/ird/observe/client/ui/util/tripMap/TripMapContentBuilder.java
=====================================
@@ -10,12 +10,12 @@ package fr.ird.observe.client.ui.util.tripMap;
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/gpl-3.0.html>.
@@ -23,14 +23,14 @@ package fr.ird.observe.client.ui.util.tripMap;
*/
import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import fr.ird.observe.client.ObserveSwingTechnicalException;
+import fr.ird.observe.client.configuration.ClientConfig;
import fr.ird.observe.dto.I18nEnumHelper;
+import fr.ird.observe.dto.data.TripMapDto;
import fr.ird.observe.dto.data.TripMapPoint;
import fr.ird.observe.dto.data.TripMapPointType;
import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.lang3.time.DateUtils;
import org.geotools.data.FileDataStore;
import org.geotools.data.FileDataStoreFinder;
import org.geotools.data.simple.SimpleFeatureSource;
@@ -53,463 +53,106 @@ import org.geotools.styling.StyledLayerDescriptor;
import org.geotools.styling.UserLayer;
import org.locationtech.jts.geom.Coordinate;
import org.locationtech.jts.geom.GeometryFactory;
-import org.locationtech.jts.geom.LineString;
import org.locationtech.jts.geom.Point;
-import org.locationtech.jts.geom.Polygon;
-import org.opengis.feature.simple.SimpleFeature;
import org.opengis.feature.simple.SimpleFeatureType;
import org.opengis.referencing.FactoryException;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
-import java.text.DateFormat;
import java.text.SimpleDateFormat;
+import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
+import java.util.ServiceLoader;
import java.util.Set;
-import static io.ultreia.java4all.i18n.I18n.t;
-
/**
* @author Tony Chemit - dev(a)tchemit.fr
*/
-public class TripMapContentBuilder {
-
- public static final String TRIP_LINES_LAYER_NAME = "Trip lines";
- public static final String TRIP_LONGLINE_OBS_FISHING_ZONE_LAYER_NAME = "Trip longline observation zone";
- public static final String TRIP_LONGLINE_OBS_LINE_LAYER_NAME = "Trip longline observation line";
- public static final String TRIP_LONGLINE_LOGBOOK_FISHING_ZONE_LAYER_NAME = "Trip longline logbook zone";
- public static final String TRIP_LONGLINE_LOGBOOK_LINE_LAYER_NAME = "Trip longline logbook line";
- public static final String TRIP_POINTS_LAYER_NAME = "Trip points";
- public static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("dd/MM");
- protected static final Set<TripMapPointType> TRIP_MAP_POINT_TYPES_IN_LEGEND = ImmutableSet.of(
- TripMapPointType.seineActivityObsInHarbour,
- TripMapPointType.seineActivityObsWithFreeSchoolType,
- TripMapPointType.seineActivityObsWithObjectSchoolType,
- TripMapPointType.longlineActivityObsInHarbour,
- TripMapPointType.longlineActivityObsWithSettingStart,
- TripMapPointType.longlineActivityObsWithSettingEnd,
- TripMapPointType.longlineActivityObsWithHaulingStart,
- TripMapPointType.longlineActivityObsWithHaulingEnd,
- TripMapPointType.longlineActivityObsWithStation,
- TripMapPointType.longlineActivityObsWithInteraction,
- TripMapPointType.longlineActivityLogbookInHarbour,
- TripMapPointType.longlineActivityLogbookWithSettingStart,
- TripMapPointType.longlineActivityLogbookWithSettingEnd,
- TripMapPointType.longlineActivityLogbookWithHaulingStart,
- TripMapPointType.longlineActivityLogbookWithHaulingEnd,
- TripMapPointType.longlineActivityLogbookWithStation,
- TripMapPointType.longlineActivityLogbookWithInteraction
- );
- protected final MapContent mapContent;
- protected final List<ObserveMapPaneLegendItem> legendItems;
- protected StyledLayerDescriptor styledLayerDescriptor;
-
- public TripMapContentBuilder() {
- mapContent = new MapContent();
- legendItems = Lists.newArrayList();
- }
-
- public MapContent getMapContent() {
- return mapContent;
- }
-
- public List<ObserveMapPaneLegendItem> getLegendItems() {
- return legendItems;
- }
-
- public void setStyledLayerDescriptor(File styleFile) throws FileNotFoundException {
-
- StyleFactory styleFactory = CommonFactoryFinder.getStyleFactory(null);
-
- SLDParser stylereader = new SLDParser(styleFactory, styleFile);
-
- styledLayerDescriptor = stylereader.parseSLD();
- }
-
- public void addLayer(File layerFile) throws IOException {
- FileDataStore store = FileDataStoreFinder.getDataStore(layerFile);
- SimpleFeatureSource featureSource = store.getFeatureSource();
- Style style = SLD.createSimpleStyle(featureSource.getSchema());
- style = findStyle(styledLayerDescriptor, store.getNames().get(0).getLocalPart(), null, style);
- Layer layer = new FeatureLayer(featureSource, style, layerFile.getName());
- mapContent.addLayer(layer);
- }
-
- public void addTripLine(List<TripMapPoint> tripMapPoints) throws FactoryException {
-
- GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();
+public abstract class TripMapContentBuilder {
- SimpleFeatureTypeBuilder lineFeatureTypeBuilder = new SimpleFeatureTypeBuilder();
- lineFeatureTypeBuilder.setName("lineBuilder");
- lineFeatureTypeBuilder.setCRS(CRS.decode("EPSG:4326", true));
- lineFeatureTypeBuilder.add("line", LineString.class);
- lineFeatureTypeBuilder.add("label", String.class);
- lineFeatureTypeBuilder.add("type", String.class);
+ protected static final String TRIP_OBS_POINTS_LAYER_NAME = "Trip Obs points";
+ protected static final String TRIP_LOGBOOK_POINTS_LAYER_NAME = "Trip Logbook points";
+ protected static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("dd/MM");
- SimpleFeatureType lineFeatureType = lineFeatureTypeBuilder.buildFeatureType();
- SimpleFeatureBuilder lineBuilder = new SimpleFeatureBuilder(lineFeatureType);
-
- DefaultFeatureCollection linesFeatures = new DefaultFeatureCollection();
-
- List<Coordinate> coordinatesByDay = null;
+ protected MapContent mapContent;
+ protected final List<ObserveMapPaneLegendItem> legendItems;
+ protected final Set<TripMapPointType> acceptedTripPointTypes;
+ protected StyledLayerDescriptor styledLayerDescriptor;
- TripMapPoint previousPoint = null;
+ private static ImmutableSet<TripMapContentBuilder> PROVIDERS;
- for (TripMapPoint point : tripMapPoints) {
- if (previousPoint == null) {
- coordinatesByDay = Lists.newLinkedList();
- } else if (!DateUtils.isSameDay(previousPoint.getTime(), point.getTime())) {
+ public abstract boolean accept(TripMapDto tripMapDto);
- if (coordinatesByDay.size() > 1) {
- LineString line = geometryFactory.createLineString(coordinatesByDay.toArray(new Coordinate[0]));
- lineBuilder.add(line);
- lineBuilder.add(DATE_FORMAT.format(previousPoint.getTime()));
- lineBuilder.add("tripDay");
- SimpleFeature feature = lineBuilder.buildFeature(null);
+ protected abstract void addLines(List<TripMapPoint> tripMapPoints) throws FactoryException;
- linesFeatures.add(feature);
- }
+ protected abstract void addPoints(List<TripMapPoint> tripMapPoints) throws FactoryException;
+ protected abstract File getStyleFile(ClientConfig config);
- Coordinate[] coordinates = {
- new Coordinate(previousPoint.getLongitude(), previousPoint.getLatitude()),
- new Coordinate(point.getLongitude(), point.getLatitude()),
- };
- LineString lineBetweenTwoDays = geometryFactory.createLineString(coordinates);
- lineBuilder.add(lineBetweenTwoDays);
- lineBuilder.add(DateFormat.getDateInstance().format(previousPoint.getTime()));
- lineBuilder.add("tripBetweenTwoDays");
- linesFeatures.add(lineBuilder.buildFeature(null));
+ public static ImmutableSet<TripMapContentBuilder> providers() {
+ if (PROVIDERS == null) {
- coordinatesByDay = Lists.newLinkedList();
+ ImmutableSet.Builder<TripMapContentBuilder> modelsBuilder = ImmutableSet.builder();
+ for (TripMapContentBuilder dtoModel : ServiceLoader.load(TripMapContentBuilder.class)) {
+ modelsBuilder.add(dtoModel);
}
-
- Coordinate coordinate = new Coordinate(point.getLongitude(), point.getLatitude());
- coordinatesByDay.add(coordinate);
-
- previousPoint = point;
- }
-
- if (coordinatesByDay != null && coordinatesByDay.size() > 1) {
- LineString line = geometryFactory.createLineString(coordinatesByDay.toArray(new Coordinate[0]));
- lineBuilder.add(line);
- lineBuilder.add(DATE_FORMAT.format(previousPoint.getTime()));
- lineBuilder.add("tripDay");
- linesFeatures.add(lineBuilder.buildFeature(null));
+ PROVIDERS = modelsBuilder.build();
}
+ return PROVIDERS;
+ }
- Style styleLines = findStyle(styledLayerDescriptor, TRIP_LINES_LAYER_NAME, null);
+ public static TripMapContentBuilder of(ClientConfig config, TripMapDto tripMapDto, List<TripMapPoint> tripMapPoints) throws IOException, FactoryException {
+ TripMapContentBuilder builder = providers().stream().filter(t -> t.accept(tripMapDto)).findFirst().orElseThrow(IllegalStateException::new);
+ builder.reset();
+ File styleFile = builder.getStyleFile(config);
+ builder.setStyledLayerDescriptor(styleFile);
- if (!linesFeatures.isEmpty()) {
- Layer layerLines = new FeatureLayer(linesFeatures, styleLines, TRIP_LINES_LAYER_NAME);
- mapContent.addLayer(layerLines);
+ for (File layerFile : config.getMapLayerFiles()) {
+ builder.addLayer(layerFile);
}
+ builder.addLines(tripMapPoints);
+ builder.addPoints(tripMapPoints);
- // add line in legend
- LineString line = geometryFactory.createLineString(ObserveMapPaneLegendItem.lineCoordinates());
- lineBuilder.add(line);
- lineBuilder.add("");
- lineBuilder.add("tripDay");
-
- ObserveMapPaneLegendItem legendTripDay = new ObserveMapPaneLegendItem(
- lineBuilder.buildFeature(null),
- styleLines,
- t("observe.content.map.legend.tripDay"));
- legendItems.add(legendTripDay);
-
- lineBuilder.add(line);
- lineBuilder.add("");
- lineBuilder.add("tripBetweenTwoDays");
- ObserveMapPaneLegendItem legendTripBetweenTwoDays = new ObserveMapPaneLegendItem(
- lineBuilder.buildFeature(null),
- styleLines,
- t("observe.content.map.legend.tripBetweenTwoDays"));
- legendItems.add(legendTripBetweenTwoDays);
-
+ return builder;
}
- public void addLonglineObsFishingZone(List<TripMapPoint> tripMapPoints) throws FactoryException {
- GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();
-
- SimpleFeatureTypeBuilder polygonFeatureTypeBuilder = new SimpleFeatureTypeBuilder();
- polygonFeatureTypeBuilder.setName("longlineFishingZoneBuilder");
- polygonFeatureTypeBuilder.setCRS(CRS.decode("EPSG:4326", true));
- polygonFeatureTypeBuilder.add("zone", Polygon.class);
- polygonFeatureTypeBuilder.add("label", String.class);
- polygonFeatureTypeBuilder.add("type", String.class);
-
- SimpleFeatureType polygonFeatureType = polygonFeatureTypeBuilder.buildFeatureType();
- SimpleFeatureBuilder polygonBuilder = new SimpleFeatureBuilder(polygonFeatureType);
-
- DefaultFeatureCollection polygonsFeatures = new DefaultFeatureCollection();
-
- for (int indexPoint = 3; indexPoint < tripMapPoints.size(); indexPoint++) {
- if (tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.longlineActivityObsWithHaulingEnd)
- && tripMapPoints.get(indexPoint - 1).getType().equals(TripMapPointType.longlineActivityObsWithHaulingStart)
- && tripMapPoints.get(indexPoint - 2).getType().equals(TripMapPointType.longlineActivityObsWithSettingEnd)
- && tripMapPoints.get(indexPoint - 3).getType().equals(TripMapPointType.longlineActivityObsWithSettingStart)) {
-
- Coordinate[] coordinates = {
- new Coordinate(tripMapPoints.get(indexPoint - 3).getLongitude(), tripMapPoints.get(indexPoint - 3).getLatitude()),
- new Coordinate(tripMapPoints.get(indexPoint - 2).getLongitude(), tripMapPoints.get(indexPoint - 2).getLatitude()),
- new Coordinate(tripMapPoints.get(indexPoint - 1).getLongitude(), tripMapPoints.get(indexPoint - 1).getLatitude()),
- new Coordinate(tripMapPoints.get(indexPoint).getLongitude(), tripMapPoints.get(indexPoint).getLatitude()),
- new Coordinate(tripMapPoints.get(indexPoint - 3).getLongitude(), tripMapPoints.get(indexPoint - 3).getLatitude())
- };
-
-
- Polygon polygon = geometryFactory.createPolygon(coordinates);
- //polygon = (Polygon) polygon.convexHull(); // permet de transformer un poliqgone croisé en polygon convex
- polygonBuilder.add(polygon);
- polygonBuilder.add(DATE_FORMAT.format(tripMapPoints.get(indexPoint - 3).getTime()));
- polygonBuilder.add("longlineFishingZone");
- SimpleFeature feature = polygonBuilder.buildFeature(null);
- polygonsFeatures.add(feature);
-
- }
- }
-
- if (!polygonsFeatures.isEmpty()) {
- Style styleLines = findStyle(styledLayerDescriptor, TRIP_LONGLINE_OBS_FISHING_ZONE_LAYER_NAME, null);
- Layer layerLines = new FeatureLayer(polygonsFeatures, styleLines, TRIP_LONGLINE_OBS_FISHING_ZONE_LAYER_NAME);
- mapContent.addLayer(layerLines);
- }
+ private void reset() {
+ legendItems.clear();
+ mapContent=new MapContent();
}
- public void addLonglineLogbookFishingZone(List<TripMapPoint> tripMapPoints) throws FactoryException {
- GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();
-
- SimpleFeatureTypeBuilder polygonFeatureTypeBuilder = new SimpleFeatureTypeBuilder();
- polygonFeatureTypeBuilder.setName("longlineFishingZoneBuilder");
- polygonFeatureTypeBuilder.setCRS(CRS.decode("EPSG:4326", true));
- polygonFeatureTypeBuilder.add("zone", Polygon.class);
- polygonFeatureTypeBuilder.add("label", String.class);
- polygonFeatureTypeBuilder.add("type", String.class);
-
- SimpleFeatureType polygonFeatureType = polygonFeatureTypeBuilder.buildFeatureType();
- SimpleFeatureBuilder polygonBuilder = new SimpleFeatureBuilder(polygonFeatureType);
-
- DefaultFeatureCollection polygonsFeatures = new DefaultFeatureCollection();
-
- for (int indexPoint = 3; indexPoint < tripMapPoints.size(); indexPoint++) {
- if (tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.longlineActivityLogbookWithHaulingEnd)
- && tripMapPoints.get(indexPoint - 1).getType().equals(TripMapPointType.longlineActivityLogbookWithHaulingStart)
- && tripMapPoints.get(indexPoint - 2).getType().equals(TripMapPointType.longlineActivityLogbookWithSettingEnd)
- && tripMapPoints.get(indexPoint - 3).getType().equals(TripMapPointType.longlineActivityLogbookWithSettingStart)) {
-
- Coordinate[] coordinates = {
- new Coordinate(tripMapPoints.get(indexPoint - 3).getLongitude(), tripMapPoints.get(indexPoint - 3).getLatitude()),
- new Coordinate(tripMapPoints.get(indexPoint - 2).getLongitude(), tripMapPoints.get(indexPoint - 2).getLatitude()),
- new Coordinate(tripMapPoints.get(indexPoint - 1).getLongitude(), tripMapPoints.get(indexPoint - 1).getLatitude()),
- new Coordinate(tripMapPoints.get(indexPoint).getLongitude(), tripMapPoints.get(indexPoint).getLatitude()),
- new Coordinate(tripMapPoints.get(indexPoint - 3).getLongitude(), tripMapPoints.get(indexPoint - 3).getLatitude())
- };
-
-
- Polygon polygon = geometryFactory.createPolygon(coordinates);
- //polygon = (Polygon) polygon.convexHull(); // permet de transformer un poliqgone croisé en polygon convex
- polygonBuilder.add(polygon);
- polygonBuilder.add(DATE_FORMAT.format(tripMapPoints.get(indexPoint - 3).getTime()));
- polygonBuilder.add("longlineFishingZone");
- SimpleFeature feature = polygonBuilder.buildFeature(null);
- polygonsFeatures.add(feature);
-
- }
- }
-
- if (!polygonsFeatures.isEmpty()) {
- Style styleLines = findStyle(styledLayerDescriptor, TRIP_LONGLINE_LOGBOOK_FISHING_ZONE_LAYER_NAME, null);
- Layer layerLines = new FeatureLayer(polygonsFeatures, styleLines, TRIP_LONGLINE_LOGBOOK_FISHING_ZONE_LAYER_NAME);
- mapContent.addLayer(layerLines);
- }
+ protected TripMapContentBuilder(Set<TripMapPointType> acceptedTripPointTypes) {
+ this.legendItems = new ArrayList<>();
+ this.acceptedTripPointTypes = acceptedTripPointTypes;
}
- public void addLonglineObsLine(List<TripMapPoint> tripMapPoints) throws FactoryException {
- GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();
-
- SimpleFeatureTypeBuilder lineFeatureTypeBuilder = new SimpleFeatureTypeBuilder();
- lineFeatureTypeBuilder.setName("longlineSettingBuilder");
- lineFeatureTypeBuilder.setCRS(CRS.decode("EPSG:4326", true));
- lineFeatureTypeBuilder.add("line", LineString.class);
- lineFeatureTypeBuilder.add("type", String.class);
-
- SimpleFeatureType lineFeatureType = lineFeatureTypeBuilder.buildFeatureType();
- SimpleFeatureBuilder lineBuilder = new SimpleFeatureBuilder(lineFeatureType);
-
- DefaultFeatureCollection linesFeatures = new DefaultFeatureCollection();
-
- List<Coordinate> defaultLineCoordinates = Lists.newLinkedList();
- boolean found = false;
- for (int indexPoint = 0; indexPoint < tripMapPoints.size(); indexPoint++) {
- if (indexPoint > 1 && tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.longlineActivityObsWithSettingEnd)
- && tripMapPoints.get(indexPoint - 1).getType().equals(TripMapPointType.longlineActivityObsWithSettingStart)
- || tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.longlineActivityObsWithHaulingEnd)
- && tripMapPoints.get(indexPoint - 1).getType().equals(TripMapPointType.longlineActivityObsWithHaulingStart)) {
-
- found = true;
- Coordinate[] coordinates = {
- new Coordinate(tripMapPoints.get(indexPoint - 1).getLongitude(), tripMapPoints.get(indexPoint - 1).getLatitude()),
- new Coordinate(tripMapPoints.get(indexPoint).getLongitude(), tripMapPoints.get(indexPoint).getLatitude()),
- };
-
- boolean setting = tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.longlineActivityObsWithSettingEnd);
- LineString lineString = geometryFactory.createLineString(coordinates);
- lineBuilder.add(lineString);
- lineBuilder.add(setting ? "setting" : "hauling");
- SimpleFeature feature = lineBuilder.buildFeature(null);
- linesFeatures.add(feature);
-
- defaultLineCoordinates.clear();
- }
-
- if (!(tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.longlineActivityObsWithSettingEnd)
- || tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.longlineActivityObsWithHaulingStart))) {
-
- defaultLineCoordinates.add(new Coordinate(tripMapPoints.get(indexPoint).getLongitude(), tripMapPoints.get(indexPoint).getLatitude()));
-
- }
-
- if ((tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.longlineActivityObsWithSettingStart)
- || indexPoint == tripMapPoints.size() - 1) && defaultLineCoordinates.size() > 1) {
-
- LineString lineString = geometryFactory.createLineString(defaultLineCoordinates.toArray(new Coordinate[0]));
- lineBuilder.add(lineString);
- lineBuilder.add("trip");
- SimpleFeature feature = lineBuilder.buildFeature(null);
- linesFeatures.add(feature);
-
- defaultLineCoordinates.clear();
-
- }
-
-
- }
-
- Style styleLines = findStyle(styledLayerDescriptor, TRIP_LONGLINE_OBS_LINE_LAYER_NAME, null);
- if (!linesFeatures.isEmpty()) {
- Layer layerLines = new FeatureLayer(linesFeatures, styleLines, TRIP_LONGLINE_OBS_LINE_LAYER_NAME);
- mapContent.addLayer(layerLines);
- }
-
- if (found) {
- // add line in legend
- LineString line = geometryFactory.createLineString(ObserveMapPaneLegendItem.lineCoordinates());
- lineBuilder.add(line);
- lineBuilder.add("setting");
-
- ObserveMapPaneLegendItem legendTripDay = new ObserveMapPaneLegendItem(
- lineBuilder.buildFeature(null),
- styleLines,
- t("observe.content.map.legend.obs.setting"));
- legendItems.add(legendTripDay);
-
- line = geometryFactory.createLineString(ObserveMapPaneLegendItem.lineCoordinates());
- lineBuilder.add(line);
- lineBuilder.add("hauling");
-
- legendTripDay = new ObserveMapPaneLegendItem(
- lineBuilder.buildFeature(null),
- styleLines,
- t("observe.content.map.legend.obs.hauling"));
- legendItems.add(legendTripDay);
- }
-
+ public MapContent getMapContent() {
+ return mapContent;
}
- public void addLonglineLogbookLine(List<TripMapPoint> tripMapPoints) throws FactoryException {
- GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();
-
- SimpleFeatureTypeBuilder lineFeatureTypeBuilder = new SimpleFeatureTypeBuilder();
- lineFeatureTypeBuilder.setName("longlineSettingBuilder");
- lineFeatureTypeBuilder.setCRS(CRS.decode("EPSG:4326", true));
- lineFeatureTypeBuilder.add("line", LineString.class);
- lineFeatureTypeBuilder.add("type", String.class);
-
- SimpleFeatureType lineFeatureType = lineFeatureTypeBuilder.buildFeatureType();
- SimpleFeatureBuilder lineBuilder = new SimpleFeatureBuilder(lineFeatureType);
-
- DefaultFeatureCollection linesFeatures = new DefaultFeatureCollection();
-
- List<Coordinate> defaultLineCoordinates = Lists.newLinkedList();
- boolean found = false;
- for (int indexPoint = 0; indexPoint < tripMapPoints.size(); indexPoint++) {
- if (indexPoint > 1 && tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.longlineActivityLogbookWithSettingEnd)
- && tripMapPoints.get(indexPoint - 1).getType().equals(TripMapPointType.longlineActivityLogbookWithSettingStart)
- || tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.longlineActivityLogbookWithHaulingEnd)
- && tripMapPoints.get(indexPoint - 1).getType().equals(TripMapPointType.longlineActivityLogbookWithHaulingStart)) {
- found = true;
- Coordinate[] coordinates = {
- new Coordinate(tripMapPoints.get(indexPoint - 1).getLongitude(), tripMapPoints.get(indexPoint - 1).getLatitude()),
- new Coordinate(tripMapPoints.get(indexPoint).getLongitude(), tripMapPoints.get(indexPoint).getLatitude()),
- };
-
- boolean setting = tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.longlineActivityLogbookWithSettingEnd);
- LineString lineString = geometryFactory.createLineString(coordinates);
- lineBuilder.add(lineString);
- lineBuilder.add(setting ? "setting" : "hauling");
- SimpleFeature feature = lineBuilder.buildFeature(null);
- linesFeatures.add(feature);
-
- defaultLineCoordinates.clear();
- }
-
- if (!(tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.longlineActivityLogbookWithSettingEnd)
- || tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.longlineActivityLogbookWithHaulingStart))) {
-
- defaultLineCoordinates.add(new Coordinate(tripMapPoints.get(indexPoint).getLongitude(), tripMapPoints.get(indexPoint).getLatitude()));
-
- }
-
- if ((tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.longlineActivityLogbookWithSettingStart)
- || indexPoint == tripMapPoints.size() - 1) && defaultLineCoordinates.size() > 1) {
-
- LineString lineString = geometryFactory.createLineString(defaultLineCoordinates.toArray(new Coordinate[0]));
- lineBuilder.add(lineString);
- lineBuilder.add("trip");
- SimpleFeature feature = lineBuilder.buildFeature(null);
- linesFeatures.add(feature);
-
- defaultLineCoordinates.clear();
-
- }
-
-
- }
- if (found) {
- Style styleLines = findStyle(styledLayerDescriptor, TRIP_LONGLINE_LOGBOOK_LINE_LAYER_NAME, null);
- if (!linesFeatures.isEmpty()) {
- Layer layerLines = new FeatureLayer(linesFeatures, styleLines, TRIP_LONGLINE_LOGBOOK_LINE_LAYER_NAME);
- mapContent.addLayer(layerLines);
- }
+ public List<ObserveMapPaneLegendItem> getLegendItems() {
+ return legendItems;
+ }
- // add line in legend
- LineString line = geometryFactory.createLineString(ObserveMapPaneLegendItem.lineCoordinates());
- lineBuilder.add(line);
- lineBuilder.add("setting");
-
- ObserveMapPaneLegendItem legendTripDay = new ObserveMapPaneLegendItem(
- lineBuilder.buildFeature(null),
- styleLines,
- t("observe.content.map.legend.logbook.setting"));
- legendItems.add(legendTripDay);
-
- line = geometryFactory.createLineString(ObserveMapPaneLegendItem.lineCoordinates());
- lineBuilder.add(line);
- lineBuilder.add("hauling");
-
- legendTripDay = new ObserveMapPaneLegendItem(
- lineBuilder.buildFeature(null),
- styleLines,
- t("observe.content.map.legend.logbook.hauling"));
- legendItems.add(legendTripDay);
- }
+ public void setStyledLayerDescriptor(File styleFile) throws FileNotFoundException {
+ StyleFactory styleFactory = CommonFactoryFinder.getStyleFactory(null);
+ SLDParser styleReader = new SLDParser(styleFactory, styleFile);
+ styledLayerDescriptor = styleReader.parseSLD();
}
+ public void addLayer(File layerFile) throws IOException {
+ FileDataStore store = FileDataStoreFinder.getDataStore(layerFile);
+ SimpleFeatureSource featureSource = store.getFeatureSource();
+ Style style = SLD.createSimpleStyle(featureSource.getSchema());
+ style = findStyle(styledLayerDescriptor, store.getNames().get(0).getLocalPart(), null, style);
+ Layer layer = new FeatureLayer(featureSource, style, layerFile.getName());
+ mapContent.addLayer(layer);
+ }
- public void addPoints(List<TripMapPoint> tripMapPoints) throws FactoryException {
+ public void addPoints(List<TripMapPoint> tripMapPoints, String layerName) throws FactoryException {
GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();
@@ -525,7 +168,7 @@ public class TripMapContentBuilder {
DefaultFeatureCollection pointsFeatures = new DefaultFeatureCollection();
- Style stylePoints = findStyle(styledLayerDescriptor, TRIP_POINTS_LAYER_NAME, null);
+ Style stylePoints = findStyle(styledLayerDescriptor, layerName, null);
Set<TripMapPointType> pointTypeInLegend = Sets.newHashSet();
@@ -541,7 +184,7 @@ public class TripMapContentBuilder {
pointsFeatures.add(pointBuilder.buildFeature(null));
// add point in legend
- if (TRIP_MAP_POINT_TYPES_IN_LEGEND.contains(type) && !pointTypeInLegend.contains(type)) {
+ if (acceptedTripPointTypes.contains(type) && !pointTypeInLegend.contains(type)) {
point = geometryFactory.createPoint(ObserveMapPaneLegendItem.pointCoordinates());
pointBuilder.add(point);
pointBuilder.add("");
@@ -558,7 +201,7 @@ public class TripMapContentBuilder {
}
if (!pointsFeatures.isEmpty()) {
- Layer pointsLayer = new FeatureLayer(pointsFeatures, stylePoints, TRIP_POINTS_LAYER_NAME);
+ Layer pointsLayer = new FeatureLayer(pointsFeatures, stylePoints, layerName);
mapContent.addLayer(pointsLayer);
}
=====================================
client-core/src/main/java/fr/ird/observe/client/ui/util/tripMap/TripMapUIHandler.java
=====================================
@@ -22,17 +22,16 @@ package fr.ird.observe.client.ui.util.tripMap;
* #L%
*/
-import com.google.common.collect.Lists;
import fr.ird.observe.client.ObserveSwingApplicationContext;
import fr.ird.observe.client.ObserveSwingTechnicalException;
import fr.ird.observe.client.configuration.ClientConfig;
import fr.ird.observe.client.ui.ObserveKeyStrokes;
+import fr.ird.observe.client.ui.ObserveMainUIModel;
import fr.ird.observe.client.ui.actions.tripMap.TripMapActionSupport;
import fr.ird.observe.client.ui.content.api.spi.ObserveActionMap;
import fr.ird.observe.client.ui.util.BeanCheckBox;
import fr.ird.observe.dto.data.TripMapDto;
import fr.ird.observe.dto.data.TripMapPoint;
-import fr.ird.observe.spi.DtoModelClasses;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -56,7 +55,7 @@ import java.awt.event.MouseWheelEvent;
import java.awt.event.MouseWheelListener;
import java.awt.geom.AffineTransform;
import java.awt.geom.Point2D;
-import java.io.File;
+import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
@@ -91,9 +90,10 @@ public class TripMapUIHandler implements UIHandler<TripMapUI> {
public void doOpenMap(TripMapDto tripMapDto) {
+ ObserveMainUIModel model = ObserveSwingApplicationContext.get().getMainUI().getModel();
try {
flipContent();
- ObserveSwingApplicationContext.get().getMainUI().getModel().setBusy(true);
+ model.setBusy(true);
ObserveMapPane mapPane = getObserveMapPane();
@@ -102,30 +102,9 @@ public class TripMapUIHandler implements UIHandler<TripMapUI> {
mapPane.getMapContent().dispose();
}
- List<TripMapPoint> tripMapPoints = Lists.newArrayList(tripMapDto.getPoints());
+ List<TripMapPoint> tripMapPoints = new ArrayList<>(tripMapDto.getPoints());
-
- TripMapContentBuilder mapContentBuilder = new TripMapContentBuilder();
- mapContentBuilder.setStyledLayerDescriptor(config.getMapStyleFile());
-
- for (File layerFile : config.getMapLayerFiles()) {
- mapContentBuilder.addLayer(layerFile);
- }
-
- if (DtoModelClasses.isSeineId(tripMapDto.getTripId())) {
-
- mapContentBuilder.addTripLine(tripMapPoints);
-
- } else if (DtoModelClasses.isLonglineId(tripMapDto.getTripId())) {
-
- mapContentBuilder.addLonglineObsFishingZone(tripMapPoints);
- mapContentBuilder.addLonglineObsLine(tripMapPoints);
- mapContentBuilder.addLonglineLogbookFishingZone(tripMapPoints);
- mapContentBuilder.addLonglineLogbookLine(tripMapPoints);
-
- }
-
- mapContentBuilder.addPoints(tripMapPoints);
+ TripMapContentBuilder mapContentBuilder = TripMapContentBuilder.of(config, tripMapDto, tripMapPoints);
// set zoom
tripArea = new ReferencedEnvelope();
@@ -140,7 +119,7 @@ public class TripMapUIHandler implements UIHandler<TripMapUI> {
} catch (Exception e) {
throw new ObserveSwingTechnicalException("Unable to load trip map activity points", e);
} finally {
- ObserveSwingApplicationContext.get().getMainUI().getModel().setBusy(false);
+ model.setBusy(false);
}
}
=====================================
client-core/src/main/map/style.xml → client-core/src/main/map/ll-style.xml
=====================================
@@ -8,12 +8,12 @@
it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public
License along with this program. If not, see
<http://www.gnu.org/licenses/gpl-3.0.html>.
@@ -26,66 +26,6 @@
xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd
http://www.opengis.net/ogc http://schemas.opengis.net/filter/1.0.0/filter.xsd">
- <NamedLayer>
- <Name>Trip lines</Name>
- <UserStyle>
- <IsDefault>true</IsDefault>
- <FeatureTypeStyle>
- <Rule>
- <Name>Trip day</Name>
- <ogc:Filter>
- <ogc:PropertyIsEqualTo>
- <ogc:PropertyName>type</ogc:PropertyName>
- <ogc:Literal>tripDay</ogc:Literal>
- </ogc:PropertyIsEqualTo>
- </ogc:Filter>
- <LineSymbolizer>
- <Stroke>
- <CssParameter name="stroke">#ff4444</CssParameter>
- <CssParameter name="stroke-width">2</CssParameter>
- </Stroke>
- </LineSymbolizer>
- <TextSymbolizer>
- <Label>
- <ogc:PropertyName>label</ogc:PropertyName>
- </Label>
- <LabelPlacement>
- <LinePlacement>
- <PerpendicularOffset>10</PerpendicularOffset>
- </LinePlacement>
- </LabelPlacement>
- <Fill>
- <CssParameter name="fill">#000000</CssParameter>
- </Fill>
- <Font>
- <CssParameter name="font-size">14</CssParameter>
- <CssParameter name="font-style">normal</CssParameter>
- <CssParameter name="font-weight">bold</CssParameter>
- </Font>
- </TextSymbolizer>
- </Rule>
- </FeatureTypeStyle>
- <FeatureTypeStyle>
- <Rule>
- <Name>Trip between two days</Name>
- <ogc:Filter>
- <ogc:PropertyIsEqualTo>
- <ogc:PropertyName>type</ogc:PropertyName>
- <ogc:Literal>tripBetweenTwoDays</ogc:Literal>
- </ogc:PropertyIsEqualTo>
- </ogc:Filter>
- <LineSymbolizer>
- <Stroke>
- <CssParameter name="stroke">#ff4444</CssParameter>
- <CssParameter name="stroke-width">2</CssParameter>
- <CssParameter name="stroke-dasharray">6 4</CssParameter>
- </Stroke>
- </LineSymbolizer>
- </Rule>
- </FeatureTypeStyle>
- </UserStyle>
- </NamedLayer>
-
<NamedLayer>
<Name>Trip longline observation zone</Name>
<UserStyle>
@@ -134,7 +74,7 @@
<Name>Trip day</Name>
<PolygonSymbolizer>
<Fill>
- <CssParameter name="fill">#220080</CssParameter>
+ <CssParameter name="fill">#6262BF</CssParameter>
<CssParameter name="fill-opacity">0.5</CssParameter>
</Fill>
</PolygonSymbolizer>
@@ -179,7 +119,7 @@
</ogc:Filter>
<LineSymbolizer>
<Stroke>
- <CssParameter name="stroke">#222222</CssParameter>
+ <CssParameter name="stroke">#00FF00</CssParameter>
<CssParameter name="stroke-width">1</CssParameter>
<CssParameter name="stroke-dasharray">5 7</CssParameter>
</Stroke>
@@ -197,7 +137,7 @@
</ogc:Filter>
<LineSymbolizer>
<Stroke>
- <CssParameter name="stroke">#00ff00</CssParameter>
+ <CssParameter name="stroke">#00FF00</CssParameter>
<CssParameter name="stroke-width">2</CssParameter>
</Stroke>
</LineSymbolizer>
@@ -214,7 +154,7 @@
</ogc:Filter>
<LineSymbolizer>
<Stroke>
- <CssParameter name="stroke">#ff0000</CssParameter>
+ <CssParameter name="stroke">#FFFF00</CssParameter>
<CssParameter name="stroke-width">2</CssParameter>
</Stroke>
</LineSymbolizer>
@@ -256,7 +196,7 @@
</ogc:Filter>
<LineSymbolizer>
<Stroke>
- <CssParameter name="stroke">#00ff00</CssParameter>
+ <CssParameter name="stroke">#FF0000</CssParameter>
<CssParameter name="stroke-width">4</CssParameter>
</Stroke>
</LineSymbolizer>
@@ -273,7 +213,7 @@
</ogc:Filter>
<LineSymbolizer>
<Stroke>
- <CssParameter name="stroke">#ff0000</CssParameter>
+ <CssParameter name="stroke">#00FFFF</CssParameter>
<CssParameter name="stroke-width">4</CssParameter>
</Stroke>
</LineSymbolizer>
@@ -284,86 +224,32 @@
<NamedLayer>
- <Name>Trip points</Name>
+ <Name>Trip Obs points</Name>
<UserStyle>
<IsDefault>true</IsDefault>
- <FeatureTypeStyle>
- <Rule>
- <Name>Point seine activity Obs in harbour</Name>
- <ogc:Filter>
- <ogc:PropertyIsEqualTo>
- <ogc:PropertyName>pointType</ogc:PropertyName>
- <ogc:Literal>seineActivityObsInHarbour</ogc:Literal>
- </ogc:PropertyIsEqualTo>
- </ogc:Filter>
- <PointSymbolizer>
- <Graphic>
- <Mark>
- <WellKnownName>Circle</WellKnownName>
- <Fill>
- <CssParameter name="fill">#7800f6</CssParameter>
- </Fill>
- <Stroke>
- <CssParameter name="stroke">#000000</CssParameter>
- <CssParameter name="stroke-width">1</CssParameter>
- </Stroke>
- </Mark>
- <Size>12</Size>
- </Graphic>
- </PointSymbolizer>
- </Rule>
- </FeatureTypeStyle>
-
<FeatureTypeStyle>
<Rule>
- <Name>Point seine activity Obs with free school type</Name>
+ <Name>Point longline activity Obs (Other)</Name>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>pointType</ogc:PropertyName>
- <ogc:Literal>seineActivityObsWithFreeSchoolType</ogc:Literal>
+ <ogc:Literal>llActivityObs</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<PointSymbolizer>
<Graphic>
<Mark>
- <WellKnownName>Triangle</WellKnownName>
+ <WellKnownName>ttf://Serif#U+00B7</WellKnownName>
<Fill>
- <CssParameter name="fill">#7800f6</CssParameter>
- </Fill>
- <Stroke>
- <CssParameter name="stroke">#000000</CssParameter>
- <CssParameter name="stroke-width">1</CssParameter>
- </Stroke>
- </Mark>
- <Size>16</Size>
- </Graphic>
- </PointSymbolizer>
- </Rule>
- </FeatureTypeStyle>
-
- <FeatureTypeStyle>
- <Rule>
- <Name>Point seine activity Obs with object school type</Name>
- <ogc:Filter>
- <ogc:PropertyIsEqualTo>
- <ogc:PropertyName>pointType</ogc:PropertyName>
- <ogc:Literal>seineActivityObsWithObjectSchoolType</ogc:Literal>
- </ogc:PropertyIsEqualTo>
- </ogc:Filter>
- <PointSymbolizer>
- <Graphic>
- <Mark>
- <WellKnownName>X</WellKnownName>
- <Fill>
- <CssParameter name="fill">#7800f6</CssParameter>
+ <CssParameter name="fill">#00FF00</CssParameter>
</Fill>
<Stroke>
<CssParameter name="stroke">#000000</CssParameter>
<CssParameter name="stroke-width">1</CssParameter>
</Stroke>
</Mark>
- <Size>16</Size>
+ <Size>8</Size>
</Graphic>
</PointSymbolizer>
</Rule>
@@ -375,7 +261,7 @@
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>pointType</ogc:PropertyName>
- <ogc:Literal>longlineActivityObsWithSettingStart</ogc:Literal>
+ <ogc:Literal>llActivityObsWithSettingStart</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<PointSymbolizer>
@@ -395,15 +281,13 @@
</PointSymbolizer>
</Rule>
</FeatureTypeStyle>
-
-
<FeatureTypeStyle>
<Rule>
<Name>Point longline activity Obs with setting end</Name>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>pointType</ogc:PropertyName>
- <ogc:Literal>longlineActivityObsWithSettingEnd</ogc:Literal>
+ <ogc:Literal>llActivityObsWithSettingEnd</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<PointSymbolizer>
@@ -423,15 +307,13 @@
</PointSymbolizer>
</Rule>
</FeatureTypeStyle>
-
-
<FeatureTypeStyle>
<Rule>
<Name>Point longline activity Obs with hauling start</Name>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>pointType</ogc:PropertyName>
- <ogc:Literal>longlineActivityObsWithHaulingStart</ogc:Literal>
+ <ogc:Literal>llActivityObsWithHaulingStart</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<PointSymbolizer>
@@ -451,14 +333,13 @@
</PointSymbolizer>
</Rule>
</FeatureTypeStyle>
-
<FeatureTypeStyle>
<Rule>
<Name>Point longline activity Obs with hauling end</Name>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>pointType</ogc:PropertyName>
- <ogc:Literal>longlineActivityObsWithHaulingEnd</ogc:Literal>
+ <ogc:Literal>llActivityObsWithHaulingEnd</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<PointSymbolizer>
@@ -478,29 +359,28 @@
</PointSymbolizer>
</Rule>
</FeatureTypeStyle>
-
<FeatureTypeStyle>
<Rule>
<Name>Point longline activity Obs in harbour</Name>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>pointType</ogc:PropertyName>
- <ogc:Literal>longlineActivityObsInHarbour</ogc:Literal>
+ <ogc:Literal>llActivityObsInHarbour</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<PointSymbolizer>
<Graphic>
<Mark>
- <WellKnownName>Circle</WellKnownName>
+ <WellKnownName>Star</WellKnownName>
<Fill>
- <CssParameter name="fill">#7800f6</CssParameter>
+ <CssParameter name="fill">#00FF00</CssParameter>
</Fill>
<Stroke>
<CssParameter name="stroke">#000000</CssParameter>
<CssParameter name="stroke-width">1</CssParameter>
</Stroke>
</Mark>
- <Size>12</Size>
+ <Size>16</Size>
</Graphic>
</PointSymbolizer>
<TextSymbolizer>
@@ -527,108 +407,48 @@
</Rule>
</FeatureTypeStyle>
- <FeatureTypeStyle>
- <Rule>
- <Name>Point longline activity Obs with interaction</Name>
- <ogc:Filter>
- <ogc:PropertyIsEqualTo>
- <ogc:PropertyName>pointType</ogc:PropertyName>
- <ogc:Literal>longlineActivityObsWithInteraction</ogc:Literal>
- </ogc:PropertyIsEqualTo>
- </ogc:Filter>
- <PointSymbolizer>
- <Graphic>
- <Mark>
- <WellKnownName>Circle</WellKnownName>
- <Fill>
- <CssParameter name="fill">#FFFF00</CssParameter>
- </Fill>
- <Stroke>
- <CssParameter name="stroke">#000000</CssParameter>
- <CssParameter name="stroke-width">1</CssParameter>
- </Stroke>
- </Mark>
- <Size>12</Size>
- </Graphic>
- </PointSymbolizer>
- <TextSymbolizer>
- <Label>
- <ogc:PropertyName>label</ogc:PropertyName>
- </Label>
- <Font>
- <CssParameter name="font-size">14</CssParameter>
- <CssParameter name="font-style">normal</CssParameter>
- <CssParameter name="font-weight">bold</CssParameter>
- </Font>
- <LabelPlacement>
- <PointPlacement>
- <Displacement>
- <DisplacementX>5</DisplacementX>
- <DisplacementY>5</DisplacementY>
- </Displacement>
- </PointPlacement>
- </LabelPlacement>
- <Fill>
- <CssParameter name="fill">#000000</CssParameter>
- </Fill>
- </TextSymbolizer>
- </Rule>
- </FeatureTypeStyle>
+ </UserStyle>
+ </NamedLayer>
+
+ <NamedLayer>
+ <Name>Trip Logbook points</Name>
+ <UserStyle>
+ <IsDefault>true</IsDefault>
<FeatureTypeStyle>
<Rule>
- <Name>Point longline activity Obs with station</Name>
+ <Name>Point longline activity Logbook (Other)</Name>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>pointType</ogc:PropertyName>
- <ogc:Literal>longlineActivityObsWithStation</ogc:Literal>
+ <ogc:Literal>llActivityLogbook</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<PointSymbolizer>
<Graphic>
<Mark>
- <WellKnownName>star</WellKnownName>
+ <WellKnownName>ttf://Serif#U+00B7</WellKnownName>
<Fill>
- <CssParameter name="fill">#FFFF00</CssParameter>
+ <CssParameter name="fill">#FF0000</CssParameter>
</Fill>
<Stroke>
<CssParameter name="stroke">#000000</CssParameter>
<CssParameter name="stroke-width">1</CssParameter>
</Stroke>
</Mark>
- <Size>16</Size>
+ <Size>8</Size>
</Graphic>
</PointSymbolizer>
- <TextSymbolizer>
- <Label>
- <ogc:PropertyName>label</ogc:PropertyName>
- </Label>
- <Font>
- <CssParameter name="font-size">14</CssParameter>
- <CssParameter name="font-style">normal</CssParameter>
- <CssParameter name="font-weight">bold</CssParameter>
- </Font>
- <LabelPlacement>
- <PointPlacement>
- <Displacement>
- <DisplacementX>5</DisplacementX>
- <DisplacementY>5</DisplacementY>
- </Displacement>
- </PointPlacement>
- </LabelPlacement>
- <Fill>
- <CssParameter name="fill">#000000</CssParameter>
- </Fill>
- </TextSymbolizer>
</Rule>
</FeatureTypeStyle>
+
<FeatureTypeStyle>
<Rule>
<Name>Point longline activity Logbook with setting start</Name>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>pointType</ogc:PropertyName>
- <ogc:Literal>longlineActivityLogbookWithSettingStart</ogc:Literal>
+ <ogc:Literal>llActivityLogbookWithSettingStart</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<PointSymbolizer>
@@ -649,14 +469,13 @@
</Rule>
</FeatureTypeStyle>
-
<FeatureTypeStyle>
<Rule>
<Name>Point longline activity Logbook with setting end</Name>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>pointType</ogc:PropertyName>
- <ogc:Literal>longlineActivityLogbookWithSettingEnd</ogc:Literal>
+ <ogc:Literal>llActivityLogbookWithSettingEnd</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<PointSymbolizer>
@@ -677,14 +496,13 @@
</Rule>
</FeatureTypeStyle>
-
<FeatureTypeStyle>
<Rule>
<Name>Point longline activity Logbook with hauling start</Name>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>pointType</ogc:PropertyName>
- <ogc:Literal>longlineActivityLogbookWithHaulingStart</ogc:Literal>
+ <ogc:Literal>llActivityLogbookWithHaulingStart</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<PointSymbolizer>
@@ -711,7 +529,7 @@
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>pointType</ogc:PropertyName>
- <ogc:Literal>longlineActivityLogbookWithHaulingEnd</ogc:Literal>
+ <ogc:Literal>llActivityLogbookWithHaulingEnd</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<PointSymbolizer>
@@ -738,111 +556,15 @@
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>pointType</ogc:PropertyName>
- <ogc:Literal>longlineActivityLogbookInHarbour</ogc:Literal>
- </ogc:PropertyIsEqualTo>
- </ogc:Filter>
- <PointSymbolizer>
- <Graphic>
- <Mark>
- <WellKnownName>Circle</WellKnownName>
- <Fill>
- <CssParameter name="fill">#7800f6</CssParameter>
- </Fill>
- <Stroke>
- <CssParameter name="stroke">#000000</CssParameter>
- <CssParameter name="stroke-width">3</CssParameter>
- </Stroke>
- </Mark>
- <Size>12</Size>
- </Graphic>
- </PointSymbolizer>
- <TextSymbolizer>
- <Label>
- <ogc:PropertyName>label</ogc:PropertyName>
- </Label>
- <Font>
- <CssParameter name="font-size">14</CssParameter>
- <CssParameter name="font-style">normal</CssParameter>
- <CssParameter name="font-weight">bold</CssParameter>
- </Font>
- <LabelPlacement>
- <PointPlacement>
- <Displacement>
- <DisplacementX>5</DisplacementX>
- <DisplacementY>5</DisplacementY>
- </Displacement>
- </PointPlacement>
- </LabelPlacement>
- <Fill>
- <CssParameter name="fill">#000000</CssParameter>
- </Fill>
- </TextSymbolizer>
- </Rule>
- </FeatureTypeStyle>
-
- <FeatureTypeStyle>
- <Rule>
- <Name>Point longline activity Logbook with interaction</Name>
- <ogc:Filter>
- <ogc:PropertyIsEqualTo>
- <ogc:PropertyName>pointType</ogc:PropertyName>
- <ogc:Literal>longlineActivityLogbookWithInteraction</ogc:Literal>
+ <ogc:Literal>llActivityLogbookInHarbour</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<PointSymbolizer>
<Graphic>
<Mark>
- <WellKnownName>Circle</WellKnownName>
+ <WellKnownName>Star</WellKnownName>
<Fill>
- <CssParameter name="fill">#FFFF00</CssParameter>
- </Fill>
- <Stroke>
- <CssParameter name="stroke">#000000</CssParameter>
- <CssParameter name="stroke-width">3</CssParameter>
- </Stroke>
- </Mark>
- <Size>12</Size>
- </Graphic>
- </PointSymbolizer>
- <TextSymbolizer>
- <Label>
- <ogc:PropertyName>label</ogc:PropertyName>
- </Label>
- <Font>
- <CssParameter name="font-size">14</CssParameter>
- <CssParameter name="font-style">normal</CssParameter>
- <CssParameter name="font-weight">bold</CssParameter>
- </Font>
- <LabelPlacement>
- <PointPlacement>
- <Displacement>
- <DisplacementX>5</DisplacementX>
- <DisplacementY>5</DisplacementY>
- </Displacement>
- </PointPlacement>
- </LabelPlacement>
- <Fill>
- <CssParameter name="fill">#000000</CssParameter>
- </Fill>
- </TextSymbolizer>
- </Rule>
- </FeatureTypeStyle>
-
- <FeatureTypeStyle>
- <Rule>
- <Name>Point longline activity Logbook with station</Name>
- <ogc:Filter>
- <ogc:PropertyIsEqualTo>
- <ogc:PropertyName>pointType</ogc:PropertyName>
- <ogc:Literal>longlineActivityLogbookWithStation</ogc:Literal>
- </ogc:PropertyIsEqualTo>
- </ogc:Filter>
- <PointSymbolizer>
- <Graphic>
- <Mark>
- <WellKnownName>star</WellKnownName>
- <Fill>
- <CssParameter name="fill">#FFFF00</CssParameter>
+ <CssParameter name="fill">#FF0000</CssParameter>
</Fill>
<Stroke>
<CssParameter name="stroke">#000000</CssParameter>
=====================================
client-core/src/main/map/ps-style.xml
=====================================
@@ -0,0 +1,280 @@
+<!--
+ #%L
+ ObServe :: Client core
+ %%
+ Copyright (C) 2008 - 2019 IRD, Code Lutin, Ultreia.io
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public
+ License along with this program. If not, see
+ <http://www.gnu.org/licenses/gpl-3.0.html>.
+ #L%
+ -->
+<StyledLayerDescriptor version="1.0.0"
+ xmlns="http://www.opengis.net/sld"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ogc="http://www.opengis.net/ogc"
+ xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd
+ http://www.opengis.net/ogc http://schemas.opengis.net/filter/1.0.0/filter.xsd">
+
+ <NamedLayer>
+ <Name>Trip seine lines</Name>
+ <UserStyle>
+ <IsDefault>true</IsDefault>
+ <FeatureTypeStyle>
+ <Rule>
+ <Name>Trip day</Name>
+ <ogc:Filter>
+ <ogc:PropertyIsEqualTo>
+ <ogc:PropertyName>type</ogc:PropertyName>
+ <ogc:Literal>tripDay</ogc:Literal>
+ </ogc:PropertyIsEqualTo>
+ </ogc:Filter>
+ <LineSymbolizer>
+ <Stroke>
+ <CssParameter name="stroke">#00FF00</CssParameter>
+ <CssParameter name="stroke-width">2</CssParameter>
+ </Stroke>
+ </LineSymbolizer>
+ <TextSymbolizer>
+ <Label>
+ <ogc:PropertyName>label</ogc:PropertyName>
+ </Label>
+ <LabelPlacement>
+ <LinePlacement>
+ <PerpendicularOffset>10</PerpendicularOffset>
+ </LinePlacement>
+ </LabelPlacement>
+ <Fill>
+ <CssParameter name="fill">#000000</CssParameter>
+ </Fill>
+ <Font>
+ <CssParameter name="font-size">14</CssParameter>
+ <CssParameter name="font-style">normal</CssParameter>
+ <CssParameter name="font-weight">bold</CssParameter>
+ </Font>
+ </TextSymbolizer>
+ </Rule>
+ </FeatureTypeStyle>
+ <FeatureTypeStyle>
+ <Rule>
+ <Name>Trip between two days</Name>
+ <ogc:Filter>
+ <ogc:PropertyIsEqualTo>
+ <ogc:PropertyName>type</ogc:PropertyName>
+ <ogc:Literal>tripBetweenTwoDays</ogc:Literal>
+ </ogc:PropertyIsEqualTo>
+ </ogc:Filter>
+ <LineSymbolizer>
+ <Stroke>
+ <CssParameter name="stroke">#00FF00</CssParameter>
+ <CssParameter name="stroke-width">2</CssParameter>
+ <CssParameter name="stroke-dasharray">6 4</CssParameter>
+ </Stroke>
+ </LineSymbolizer>
+ </Rule>
+ </FeatureTypeStyle>
+ </UserStyle>
+ </NamedLayer>
+
+ <NamedLayer>
+ <Name>Trip Obs points</Name>
+ <UserStyle>
+ <IsDefault>true</IsDefault>
+ <FeatureTypeStyle>
+ <Rule>
+ <Name>Point seine activity Obs in harbour</Name>
+ <ogc:Filter>
+ <ogc:PropertyIsEqualTo>
+ <ogc:PropertyName>pointType</ogc:PropertyName>
+ <ogc:Literal>psActivityObsInHarbour</ogc:Literal>
+ </ogc:PropertyIsEqualTo>
+ </ogc:Filter>
+ <PointSymbolizer>
+ <Graphic>
+ <Mark>
+ <WellKnownName>Star</WellKnownName>
+ <Fill>
+ <CssParameter name="fill">#00FF00</CssParameter>
+ </Fill>
+ <Stroke>
+ <CssParameter name="stroke">#000000</CssParameter>
+ <CssParameter name="stroke-width">1</CssParameter>
+ </Stroke>
+ </Mark>
+ <Size>16</Size>
+ </Graphic>
+ </PointSymbolizer>
+ </Rule>
+ </FeatureTypeStyle>
+
+ <FeatureTypeStyle>
+ <Rule>
+ <Name>Point seine activity Obs (Other)</Name>
+ <ogc:Filter>
+ <ogc:PropertyIsEqualTo>
+ <ogc:PropertyName>pointType</ogc:PropertyName>
+ <ogc:Literal>psActivityObs</ogc:Literal>
+ </ogc:PropertyIsEqualTo>
+ </ogc:Filter>
+ <PointSymbolizer>
+ <Graphic>
+ <Mark>
+ <WellKnownName>ttf://Serif#U+00B7</WellKnownName>
+ <Fill>
+ <CssParameter name="fill">#00FF00</CssParameter>
+ </Fill>
+ <Stroke>
+ <CssParameter name="stroke">#000000</CssParameter>
+ <CssParameter name="stroke-width">1</CssParameter>
+ </Stroke>
+ </Mark>
+ <Size>8</Size>
+ </Graphic>
+ </PointSymbolizer>
+ </Rule>
+ </FeatureTypeStyle>
+
+ <FeatureTypeStyle>
+ <Rule>
+ <Name>Point seine activity Obs with free school type</Name>
+ <ogc:Filter>
+ <ogc:PropertyIsEqualTo>
+ <ogc:PropertyName>pointType</ogc:PropertyName>
+ <ogc:Literal>psActivityObsWithFreeSchoolType</ogc:Literal>
+ </ogc:PropertyIsEqualTo>
+ </ogc:Filter>
+ <PointSymbolizer>
+ <Graphic>
+ <Mark>
+ <WellKnownName>ttf://Serif#U+25C6</WellKnownName>
+ <Fill>
+ <CssParameter name="fill">#00FF00</CssParameter>
+ </Fill>
+ <Stroke>
+ <CssParameter name="stroke">#000000</CssParameter>
+ <CssParameter name="stroke-width">1</CssParameter>
+ </Stroke>
+ </Mark>
+ <Size>16</Size>
+ </Graphic>
+ </PointSymbolizer>
+ </Rule>
+ </FeatureTypeStyle>
+
+ <FeatureTypeStyle>
+ <Rule>
+ <Name>Point seine activity Obs with object school type</Name>
+ <ogc:Filter>
+ <ogc:PropertyIsEqualTo>
+ <ogc:PropertyName>pointType</ogc:PropertyName>
+ <ogc:Literal>psActivityObsWithObjectSchoolType</ogc:Literal>
+ </ogc:PropertyIsEqualTo>
+ </ogc:Filter>
+ <PointSymbolizer>
+ <Graphic>
+ <Mark>
+ <WellKnownName>ttf://Serif#U+2B1F</WellKnownName>
+ <Fill>
+ <CssParameter name="fill">#00FF00</CssParameter>
+ </Fill>
+ <Stroke>
+ <CssParameter name="stroke">#000000</CssParameter>
+ <CssParameter name="stroke-width">1</CssParameter>
+ </Stroke>
+ </Mark>
+ <Size>16</Size>
+ </Graphic>
+ </PointSymbolizer>
+ </Rule>
+ </FeatureTypeStyle>
+
+ </UserStyle>
+ </NamedLayer>
+
+ <NamedLayer>
+ <Name>World_EEZ_v8_2014</Name>
+ <UserStyle>
+ <FeatureTypeStyle>
+ <Rule>
+ <PolygonSymbolizer>
+ <Fill>
+ <CssParameter name="fill">#82F4F9</CssParameter>
+ </Fill>
+ <Stroke>
+ <CssParameter name="stroke">#000000</CssParameter>
+ <CssParameter name="stroke-width">1</CssParameter>
+ </Stroke>
+ </PolygonSymbolizer>
+ </Rule>
+ </FeatureTypeStyle>
+ </UserStyle>
+ </NamedLayer>
+
+ <NamedLayer>
+ <Name>GSHHS_l_L1</Name>
+ <UserStyle>
+ <FeatureTypeStyle>
+ <Rule>
+ <PolygonSymbolizer>
+ <Fill>
+ <CssParameter name="fill">#FBE9D7</CssParameter>
+ </Fill>
+ <Stroke>
+ <CssParameter name="stroke">#000000</CssParameter>
+ <CssParameter name="stroke-width">1</CssParameter>
+ </Stroke>
+ </PolygonSymbolizer>
+ </Rule>
+ </FeatureTypeStyle>
+ </UserStyle>
+ </NamedLayer>
+
+ <NamedLayer>
+ <Name>GSHHS_l_L6</Name>
+ <UserStyle>
+ <FeatureTypeStyle>
+ <Rule>
+ <PolygonSymbolizer>
+ <Fill>
+ <CssParameter name="fill">#F5F5FF</CssParameter>
+ </Fill>
+ <Stroke>
+ <CssParameter name="stroke">#000000</CssParameter>
+ <CssParameter name="stroke-width">1</CssParameter>
+ </Stroke>
+ </PolygonSymbolizer>
+ </Rule>
+ </FeatureTypeStyle>
+ </UserStyle>
+ </NamedLayer>
+
+ <NamedLayer>
+ <Name>GSHHS_l_L2</Name>
+ <UserStyle>
+ <FeatureTypeStyle>
+ <Rule>
+ <PolygonSymbolizer>
+ <Fill>
+ <CssParameter name="fill">#7FB7FF</CssParameter>
+ </Fill>
+ <Stroke>
+ <CssParameter name="stroke">#7FB7FF</CssParameter>
+ <CssParameter name="stroke-width">1</CssParameter>
+ </Stroke>
+ </PolygonSymbolizer>
+ </Rule>
+ </FeatureTypeStyle>
+ </UserStyle>
+ </NamedLayer>
+
+</StyledLayerDescriptor>
=====================================
dto/src/main/i18n/getters/java-enumeration.getter
=====================================
@@ -12,36 +12,26 @@ observe.constant.NonTargetCatchReleaseStatus.M
observe.constant.NonTargetCatchReleaseStatus.P
observe.constant.NonTargetCatchReleaseStatus.S
observe.constant.NonTargetCatchReleaseStatus.U
-observe.constant.Ownership.autreVessel
-observe.constant.Ownership.ceVessel
-observe.constant.Ownership.unknown
-observe.constant.SchoolType.libre
-observe.constant.SchoolType.objet
-observe.constant.SchoolType.undefined
-observe.constant.TripMapPointType.longlineActivityLogbook
-observe.constant.TripMapPointType.longlineActivityLogbookInHarbour
-observe.constant.TripMapPointType.longlineActivityLogbookWithHaulingEnd
-observe.constant.TripMapPointType.longlineActivityLogbookWithHaulingStart
-observe.constant.TripMapPointType.longlineActivityLogbookWithInteraction
-observe.constant.TripMapPointType.longlineActivityLogbookWithSettingEnd
-observe.constant.TripMapPointType.longlineActivityLogbookWithSettingStart
-observe.constant.TripMapPointType.longlineActivityLogbookWithStation
-observe.constant.TripMapPointType.longlineActivityObs
-observe.constant.TripMapPointType.longlineActivityObsInHarbour
-observe.constant.TripMapPointType.longlineActivityObsWithHaulingEnd
-observe.constant.TripMapPointType.longlineActivityObsWithHaulingStart
-observe.constant.TripMapPointType.longlineActivityObsWithInteraction
-observe.constant.TripMapPointType.longlineActivityObsWithSettingEnd
-observe.constant.TripMapPointType.longlineActivityObsWithSettingStart
-observe.constant.TripMapPointType.longlineActivityObsWithStation
-observe.constant.TripMapPointType.longlineDepartureHarbour
-observe.constant.TripMapPointType.longlineLandingHarbour
-observe.constant.TripMapPointType.seineActivityObs
-observe.constant.TripMapPointType.seineActivityObsInHarbour
-observe.constant.TripMapPointType.seineActivityObsWithFreeSchoolType
-observe.constant.TripMapPointType.seineActivityObsWithObjectSchoolType
-observe.constant.TripMapPointType.seineDepartureHarbour
-observe.constant.TripMapPointType.seineLandingHarbour
+observe.constant.TripMapPointType.llActivityLogbook
+observe.constant.TripMapPointType.llActivityLogbookInHarbour
+observe.constant.TripMapPointType.llActivityLogbookWithHaulingEnd
+observe.constant.TripMapPointType.llActivityLogbookWithHaulingStart
+observe.constant.TripMapPointType.llActivityLogbookWithSettingEnd
+observe.constant.TripMapPointType.llActivityLogbookWithSettingStart
+observe.constant.TripMapPointType.llActivityObs
+observe.constant.TripMapPointType.llActivityObsInHarbour
+observe.constant.TripMapPointType.llActivityObsWithHaulingEnd
+observe.constant.TripMapPointType.llActivityObsWithHaulingStart
+observe.constant.TripMapPointType.llActivityObsWithSettingEnd
+observe.constant.TripMapPointType.llActivityObsWithSettingStart
+observe.constant.TripMapPointType.llTripDepartureHarbour
+observe.constant.TripMapPointType.llTripLandingHarbour
+observe.constant.TripMapPointType.psActivityObs
+observe.constant.TripMapPointType.psActivityObsInHarbour
+observe.constant.TripMapPointType.psActivityObsWithFreeSchoolType
+observe.constant.TripMapPointType.psActivityObsWithObjectSchoolType
+observe.constant.TripMapPointType.psTripDepartureHarbour
+observe.constant.TripMapPointType.psTripLandingHarbour
observe.constant.TypeTransmittingBuoyOperation.pasDeBalise
observe.constant.TypeTransmittingBuoyOperation.pose
observe.constant.TypeTransmittingBuoyOperation.recuperation
=====================================
dto/src/main/java/fr/ird/observe/dto/data/TripMapPointType.java
=====================================
@@ -24,38 +24,74 @@ package fr.ird.observe.dto.data;
/**
* <b>Attention : les noms des constantes sont utilisées dans la feuille de style de rendu. Si on change les noms ici,
- * il faut réimpacter dans le fichier style.xml</b>
+ * il faut réimpacter dans les fichiers ps-style.xml et ll-style.xml</b>
*
* @author Tony Chemit - dev(a)tchemit.fr
*/
public enum TripMapPointType {
- seineDepartureHarbour,
- seineLandingHarbour,
- seineActivityObs,
- seineActivityObsInHarbour,
- seineActivityObsWithFreeSchoolType,
- seineActivityObsWithObjectSchoolType,
-
- longlineDepartureHarbour,
- longlineLandingHarbour,
-
- longlineActivityObs,
- longlineActivityObsInHarbour,
- longlineActivityObsWithSettingStart,
- longlineActivityObsWithSettingEnd,
- longlineActivityObsWithHaulingStart,
- longlineActivityObsWithHaulingEnd,
- longlineActivityObsWithInteraction,
- longlineActivityObsWithStation,
-
- longlineActivityLogbook,
- longlineActivityLogbookInHarbour,
- longlineActivityLogbookWithSettingStart,
- longlineActivityLogbookWithSettingEnd,
- longlineActivityLogbookWithHaulingStart,
- longlineActivityLogbookWithHaulingEnd,
- longlineActivityLogbookWithInteraction,
- longlineActivityLogbookWithStation
+ psTripDepartureHarbour,
+ psTripLandingHarbour,
+ psActivityObs,
+ psActivityObsInHarbour,
+ psActivityObsWithFreeSchoolType,
+ psActivityObsWithObjectSchoolType,
+
+ llTripDepartureHarbour,
+ llTripLandingHarbour,
+
+ llActivityObs,
+ llActivityObsInHarbour,
+ llActivityObsWithSettingStart,
+ llActivityObsWithSettingEnd,
+ llActivityObsWithHaulingStart,
+ llActivityObsWithHaulingEnd,
+
+ llActivityLogbook,
+ llActivityLogbookInHarbour,
+ llActivityLogbookWithSettingStart,
+ llActivityLogbookWithSettingEnd,
+ llActivityLogbookWithHaulingStart,
+ llActivityLogbookWithHaulingEnd;
+
+ private final boolean seine;
+ private final boolean longline;
+ private final boolean trip;
+ private final boolean activity;
+ private final boolean obs;
+ private final boolean logbook;
+
+ TripMapPointType() {
+ this.seine = name().startsWith("ps");
+ this.longline = name().startsWith("ll");
+ this.trip = name().contains("Trip");
+ this.activity = name().contains("Activity");
+ this.obs = name().contains("Obs");
+ this.logbook = name().contains("Logbook");
+ }
+
+ public boolean isSeine() {
+ return seine;
+ }
+
+ public boolean isLongline() {
+ return longline;
+ }
+
+ public boolean isTrip() {
+ return trip;
+ }
+
+ public boolean isActivity() {
+ return activity;
+ }
+
+ public boolean isObs() {
+ return obs;
+ }
+
+ public boolean isLogbook() {
+ return logbook;
+ }
}
=====================================
observe-i18n/src/main/i18n/translations/observe_en_GB.properties
=====================================
@@ -2674,7 +2674,8 @@ observe.config.map.layer6.description=File (shapefile) for layer 6 of map
observe.config.map.layer7.description=File (shapefile) for layer 7 of map
observe.config.map.layer8.description=File (shapefile) for layer 8 of map
observe.config.map.layer9.description=File (shapefile) for layer 9 of map
-observe.config.map.style.description=File of styles used in map
+observe.config.map.ll.style.description=[Longline] File of styles used in map
+observe.config.map.ps.style.description=[Seine] File of styles used in map
observe.config.observation.activitysDetaillees=Observation of detailled activities
observe.config.observation.fauneAssociee=Observation of non target
observe.config.observation.floatingObject=Observation of floating objects
@@ -2840,38 +2841,26 @@ observe.constant.StorageStep.ROLES=Security
observe.constant.StorageStep.ROLES.description=Apply security on database roles
observe.constant.StorageStep.SELECT_DATA=Data selection
observe.constant.StorageStep.SELECT_DATA.description=Select data to export in backup
-observe.constant.TripMapPointType.longlineActivity=Activity
-observe.constant.TripMapPointType.longlineActivityInHarbour=Au Harbour
-observe.constant.TripMapPointType.longlineActivityLogbook=Logbook - Activity
-observe.constant.TripMapPointType.longlineActivityLogbookInHarbour=Logbook - At Harbour
-observe.constant.TripMapPointType.longlineActivityLogbookWithHaulingEnd=Logbook - Hauling end
-observe.constant.TripMapPointType.longlineActivityLogbookWithHaulingStart=Logbook - Hauling start
-observe.constant.TripMapPointType.longlineActivityLogbookWithInteraction=Logbook - Encounter
-observe.constant.TripMapPointType.longlineActivityLogbookWithSettingEnd=Logbook - Setting end
-observe.constant.TripMapPointType.longlineActivityLogbookWithSettingStart=Logbook - Setting start
-observe.constant.TripMapPointType.longlineActivityLogbookWithStation=Logbook - Station
-observe.constant.TripMapPointType.longlineActivityObs=Observation - Activity
-observe.constant.TripMapPointType.longlineActivityObsInHarbour=Observation - At Harbour
-observe.constant.TripMapPointType.longlineActivityObsWithHaulingEnd=Observation - Hauling end
-observe.constant.TripMapPointType.longlineActivityObsWithHaulingStart=Observation - Hauling start
-observe.constant.TripMapPointType.longlineActivityObsWithInteraction=Observation - Encounter
-observe.constant.TripMapPointType.longlineActivityObsWithSettingEnd=Observation - Setting end
-observe.constant.TripMapPointType.longlineActivityObsWithSettingStart=Observation - Setting start
-observe.constant.TripMapPointType.longlineActivityObsWithStation=Observation - Station
-observe.constant.TripMapPointType.longlineActivityWithHaulingEnd=Hauling end
-observe.constant.TripMapPointType.longlineActivityWithHaulingStart=Hauling start
-observe.constant.TripMapPointType.longlineActivityWithInteraction=Encounter
-observe.constant.TripMapPointType.longlineActivityWithSettingEnd=Setting end
-observe.constant.TripMapPointType.longlineActivityWithSettingStart=Setting start
-observe.constant.TripMapPointType.longlineActivityWithStation=Station
-observe.constant.TripMapPointType.longlineDepartureHarbour=Harbour departure
-observe.constant.TripMapPointType.longlineLandingHarbour=Harbour landing
-observe.constant.TripMapPointType.seineActivityObs=Activity
-observe.constant.TripMapPointType.seineActivityObsInHarbour=In harbour
-observe.constant.TripMapPointType.seineActivityObsWithFreeSchoolType=Free School type
-observe.constant.TripMapPointType.seineActivityObsWithObjectSchoolType=Object School type
-observe.constant.TripMapPointType.seineDepartureHarbour=Harbour departure
-observe.constant.TripMapPointType.seineLandingHarbour=Harbour landing
+observe.constant.TripMapPointType.llActivityLogbook=Logbook - Activity (Other)
+observe.constant.TripMapPointType.llActivityLogbookInHarbour=Logbook - At Harbour
+observe.constant.TripMapPointType.llActivityLogbookWithHaulingEnd=Logbook - Hauling end
+observe.constant.TripMapPointType.llActivityLogbookWithHaulingStart=Logbook - Hauling start
+observe.constant.TripMapPointType.llActivityLogbookWithSettingEnd=Logbook - Setting end
+observe.constant.TripMapPointType.llActivityLogbookWithSettingStart=Logbook - Setting start
+observe.constant.TripMapPointType.llActivityObs=Observation - Activity (Other)
+observe.constant.TripMapPointType.llActivityObsInHarbour=Observation - At Harbour
+observe.constant.TripMapPointType.llActivityObsWithHaulingEnd=Observation - Hauling end
+observe.constant.TripMapPointType.llActivityObsWithHaulingStart=Observation - Hauling start
+observe.constant.TripMapPointType.llActivityObsWithSettingEnd=Observation - Setting end
+observe.constant.TripMapPointType.llActivityObsWithSettingStart=Observation - Setting start
+observe.constant.TripMapPointType.llTripDepartureHarbour=Harbour departure
+observe.constant.TripMapPointType.llTripLandingHarbour=Harbour landing
+observe.constant.TripMapPointType.psActivityObs=Activity (Other)
+observe.constant.TripMapPointType.psActivityObsInHarbour=In harbour
+observe.constant.TripMapPointType.psActivityObsWithFreeSchoolType=Free School type
+observe.constant.TripMapPointType.psActivityObsWithObjectSchoolType=Object School type
+observe.constant.TripMapPointType.psTripDepartureHarbour=Harbour departure
+observe.constant.TripMapPointType.psTripLandingHarbour=Harbour landing
observe.constant.TypeTransmittingBuoyOperation.pasDeBalise=No Beacon
observe.constant.TypeTransmittingBuoyOperation.pose=Posing
observe.constant.TypeTransmittingBuoyOperation.recuperation=Grab
=====================================
observe-i18n/src/main/i18n/translations/observe_es_ES.properties
=====================================
@@ -2674,7 +2674,8 @@ observe.config.map.layer6.description=Archivo (shapeFiles) del sexto calco del m
observe.config.map.layer7.description=Archivo (shapeFiles) del séptimo calco del mapa
observe.config.map.layer8.description=Archivo (shapeFiles) del octavo calco del mapa
observe.config.map.layer9.description=Archivo (shapeFiles) del noveno calco del mapa
-observe.config.map.style.description=Archivo de los estilos a aplicar sobre los calcos del mapa
+observe.config.map.ll.style.description=[Longline] Archivo de los estilos a aplicar sobre los calcos del mapa \#TODO
+observe.config.map.ps.style.description=[Seina] Archivo de los estilos a aplicar sobre los calcos del mapa \#TODO
observe.config.observation.activitysDetaillees=Observación de actividades detalladas
observe.config.observation.fauneAssociee=Observación de Fauna asociada
observe.config.observation.floatingObject=Observación de objetos flotantes
@@ -2840,38 +2841,26 @@ observe.constant.StorageStep.ROLES=Seguridad
observe.constant.StorageStep.ROLES.description=Configuración de la seguridad
observe.constant.StorageStep.SELECT_DATA=Selección de datos
observe.constant.StorageStep.SELECT_DATA.description=Seleccionar los datos a exportar en la copia de seguridad
-observe.constant.TripMapPointType.longlineActivity=Actividad
-observe.constant.TripMapPointType.longlineActivityInHarbour=En puerto
-observe.constant.TripMapPointType.longlineActivityLogbook=Logbook - Actividad
-observe.constant.TripMapPointType.longlineActivityLogbookInHarbour=Logbook - En el puerto
-observe.constant.TripMapPointType.longlineActivityLogbookWithHaulingEnd=Logbook - Fin de arrastre
-observe.constant.TripMapPointType.longlineActivityLogbookWithHaulingStart=Logbook - Inicio de arrastre
-observe.constant.TripMapPointType.longlineActivityLogbookWithInteraction=Logbook - Encuentro
-observe.constant.TripMapPointType.longlineActivityLogbookWithSettingEnd=Logbook - Fin de calada
-observe.constant.TripMapPointType.longlineActivityLogbookWithSettingStart=Logbook - Inicio de calada
-observe.constant.TripMapPointType.longlineActivityLogbookWithStation=Logbook - Station
-observe.constant.TripMapPointType.longlineActivityObs=Observation - Actividad
-observe.constant.TripMapPointType.longlineActivityObsInHarbour=Observation - En el puerto
-observe.constant.TripMapPointType.longlineActivityObsWithHaulingEnd=Observation - Fin de arrastre
-observe.constant.TripMapPointType.longlineActivityObsWithHaulingStart=Observation - Inicio de arrastre
-observe.constant.TripMapPointType.longlineActivityObsWithInteraction=Observation - Encuentro
-observe.constant.TripMapPointType.longlineActivityObsWithSettingEnd=Observation - Fin de calada
-observe.constant.TripMapPointType.longlineActivityObsWithSettingStart=Observation - Inicio de calada
-observe.constant.TripMapPointType.longlineActivityObsWithStation=Observation - Station
-observe.constant.TripMapPointType.longlineActivityWithHaulingEnd=Fin de arrastre
-observe.constant.TripMapPointType.longlineActivityWithHaulingStart=Inicio de arrastre
-observe.constant.TripMapPointType.longlineActivityWithInteraction=Encuentro
-observe.constant.TripMapPointType.longlineActivityWithSettingEnd=Fin de calada
-observe.constant.TripMapPointType.longlineActivityWithSettingStart=Inicio de calada
-observe.constant.TripMapPointType.longlineActivityWithStation=Estación Oceanográfica
-observe.constant.TripMapPointType.longlineDepartureHarbour=Puerto de salida
-observe.constant.TripMapPointType.longlineLandingHarbour=Puerto de llegada
-observe.constant.TripMapPointType.seineActivityObs=Actividad
-observe.constant.TripMapPointType.seineActivityObsInHarbour=En puerto
-observe.constant.TripMapPointType.seineActivityObsWithFreeSchoolType=Banco libre
-observe.constant.TripMapPointType.seineActivityObsWithObjectSchoolType=Banco a objeto
-observe.constant.TripMapPointType.seineDepartureHarbour=Puerto de salida
-observe.constant.TripMapPointType.seineLandingHarbour=Puerto de llegada
+observe.constant.TripMapPointType.llActivityLogbook=Logbook - Actividad (Other) \#TODO
+observe.constant.TripMapPointType.llActivityLogbookInHarbour=Logbook - En el puerto
+observe.constant.TripMapPointType.llActivityLogbookWithHaulingEnd=Logbook - Fin de arrastre
+observe.constant.TripMapPointType.llActivityLogbookWithHaulingStart=Logbook - Inicio de arrastre
+observe.constant.TripMapPointType.llActivityLogbookWithSettingEnd=Logbook - Fin de calada
+observe.constant.TripMapPointType.llActivityLogbookWithSettingStart=Logbook - Inicio de calada
+observe.constant.TripMapPointType.llActivityObs=Observation - Actividad (Other) \#TODO
+observe.constant.TripMapPointType.llActivityObsInHarbour=Observation - En el puerto
+observe.constant.TripMapPointType.llActivityObsWithHaulingEnd=Observation - Fin de arrastre
+observe.constant.TripMapPointType.llActivityObsWithHaulingStart=Observation - Inicio de arrastre
+observe.constant.TripMapPointType.llActivityObsWithSettingEnd=Observation - Fin de calada
+observe.constant.TripMapPointType.llActivityObsWithSettingStart=Observation - Inicio de calada
+observe.constant.TripMapPointType.llTripDepartureHarbour=Puerto de salida
+observe.constant.TripMapPointType.llTripLandingHarbour=Puerto de llegada
+observe.constant.TripMapPointType.psActivityObs=Actividad (Other) \#TODO
+observe.constant.TripMapPointType.psActivityObsInHarbour=En puerto
+observe.constant.TripMapPointType.psActivityObsWithFreeSchoolType=Banco libre
+observe.constant.TripMapPointType.psActivityObsWithObjectSchoolType=Banco a objeto
+observe.constant.TripMapPointType.psTripDepartureHarbour=Puerto de salida
+observe.constant.TripMapPointType.psTripLandingHarbour=Puerto de llegada
observe.constant.TypeTransmittingBuoyOperation.pasDeBalise=DCP sin baliza
observe.constant.TypeTransmittingBuoyOperation.pose=Colocación de nueva baliza
observe.constant.TypeTransmittingBuoyOperation.recuperation=Recogida de baliza sin regreso al agua
=====================================
observe-i18n/src/main/i18n/translations/observe_fr_FR.properties
=====================================
@@ -2674,7 +2674,8 @@ observe.config.map.layer6.description=Fichier (Shape Files) du sixième calque d
observe.config.map.layer7.description=Fichier (Shape Files) du septième calque de la carte
observe.config.map.layer8.description=Fichier (Shape Files) du huitième calque de la carte
observe.config.map.layer9.description=Fichier (Shape Files) du neuvième calque de la carte
-observe.config.map.style.description=Fichier des style à appliquer sur les calques de la carte
+observe.config.map.ll.style.description=Fichier des style (Palangre) à appliquer sur les calques de la carte
+observe.config.map.ps.style.description=Fichier des style (Senne) à appliquer sur les calques de la carte
observe.config.observation.activitysDetaillees=Observation des activités détaillées
observe.config.observation.fauneAssociee=Observation des Faunes associées
observe.config.observation.floatingObject=Observation des objets flottants
@@ -2840,38 +2841,26 @@ observe.constant.StorageStep.ROLES=Sécurité
observe.constant.StorageStep.ROLES.description=Mise en place de la sécurité
observe.constant.StorageStep.SELECT_DATA=Sélection données
observe.constant.StorageStep.SELECT_DATA.description=Sélectionner les données à exporter dans la sauvegarde
-observe.constant.TripMapPointType.longlineActivity=point d'activité
-observe.constant.TripMapPointType.longlineActivityInHarbour=Au port
-observe.constant.TripMapPointType.longlineActivityLogbook=Livre de bord - point d'activité
-observe.constant.TripMapPointType.longlineActivityLogbookInHarbour=Livre de bord - Au port
-observe.constant.TripMapPointType.longlineActivityLogbookWithHaulingEnd=Livre de bord - Fin de virage
-observe.constant.TripMapPointType.longlineActivityLogbookWithHaulingStart=Livre de bord - Début de virage
-observe.constant.TripMapPointType.longlineActivityLogbookWithInteraction=Livre de bord - Rencontre
-observe.constant.TripMapPointType.longlineActivityLogbookWithSettingEnd=Livre de bord - Fin de filage
-observe.constant.TripMapPointType.longlineActivityLogbookWithSettingStart=Livre de bord - Début de filage
-observe.constant.TripMapPointType.longlineActivityLogbookWithStation=Livre de bord - Station océanographique
-observe.constant.TripMapPointType.longlineActivityObs=Observation - point d'activité
-observe.constant.TripMapPointType.longlineActivityObsInHarbour=Observation - Au port
-observe.constant.TripMapPointType.longlineActivityObsWithHaulingEnd=Observation - Fin de virage
-observe.constant.TripMapPointType.longlineActivityObsWithHaulingStart=Observation - Début de virage
-observe.constant.TripMapPointType.longlineActivityObsWithInteraction=Observation - Rencontre
-observe.constant.TripMapPointType.longlineActivityObsWithSettingEnd=Observation - Fin de filage
-observe.constant.TripMapPointType.longlineActivityObsWithSettingStart=Observation - Début de filage
-observe.constant.TripMapPointType.longlineActivityObsWithStation=Observation - Station océanographique
-observe.constant.TripMapPointType.longlineActivityWithHaulingEnd=Fin de virage
-observe.constant.TripMapPointType.longlineActivityWithHaulingStart=Début de virage
-observe.constant.TripMapPointType.longlineActivityWithInteraction=Rencontre
-observe.constant.TripMapPointType.longlineActivityWithSettingEnd=Fin de filage
-observe.constant.TripMapPointType.longlineActivityWithSettingStart=Début de filage
-observe.constant.TripMapPointType.longlineActivityWithStation=Station océanographique
-observe.constant.TripMapPointType.longlineDepartureHarbour=Port de départ
-observe.constant.TripMapPointType.longlineLandingHarbour=Port d'arrivée
-observe.constant.TripMapPointType.seineActivityObs=point d'activité
-observe.constant.TripMapPointType.seineActivityObsInHarbour=Au port
-observe.constant.TripMapPointType.seineActivityObsWithFreeSchoolType=Banc libre
-observe.constant.TripMapPointType.seineActivityObsWithObjectSchoolType=Banc objet
-observe.constant.TripMapPointType.seineDepartureHarbour=Port de départ
-observe.constant.TripMapPointType.seineLandingHarbour=Port d'arrivée
+observe.constant.TripMapPointType.llActivityLogbook=Livre de bord - Activité (autre)
+observe.constant.TripMapPointType.llActivityLogbookInHarbour=Livre de bord - Au port
+observe.constant.TripMapPointType.llActivityLogbookWithHaulingEnd=Livre de bord - Fin de virage
+observe.constant.TripMapPointType.llActivityLogbookWithHaulingStart=Livre de bord - Début de virage
+observe.constant.TripMapPointType.llActivityLogbookWithSettingEnd=Livre de bord - Fin de filage
+observe.constant.TripMapPointType.llActivityLogbookWithSettingStart=Livre de bord - Début de filage
+observe.constant.TripMapPointType.llActivityObs=Observation - Activité (autre)
+observe.constant.TripMapPointType.llActivityObsInHarbour=Observation - Au port
+observe.constant.TripMapPointType.llActivityObsWithHaulingEnd=Observation - Fin de virage
+observe.constant.TripMapPointType.llActivityObsWithHaulingStart=Observation - Début de virage
+observe.constant.TripMapPointType.llActivityObsWithSettingEnd=Observation - Fin de filage
+observe.constant.TripMapPointType.llActivityObsWithSettingStart=Observation - Début de filage
+observe.constant.TripMapPointType.llTripDepartureHarbour=Port de départ
+observe.constant.TripMapPointType.llTripLandingHarbour=Port d'arrivée
+observe.constant.TripMapPointType.psActivityObs=Activité (autre)
+observe.constant.TripMapPointType.psActivityObsInHarbour=Au port
+observe.constant.TripMapPointType.psActivityObsWithFreeSchoolType=Banc libre
+observe.constant.TripMapPointType.psActivityObsWithObjectSchoolType=Banc objet
+observe.constant.TripMapPointType.psTripDepartureHarbour=Port de départ
+observe.constant.TripMapPointType.psTripLandingHarbour=Port d'arrivée
observe.constant.TypeTransmittingBuoyOperation.pasDeBalise=Pas de balise liée au DCP
observe.constant.TypeTransmittingBuoyOperation.pose=Pose d'une nouvelle balise
observe.constant.TypeTransmittingBuoyOperation.recuperation=Récupération d'une balise sans remise à l'eau
=====================================
persistence/src/main/java/fr/ird/observe/entities/data/ll/common/TripLonglineTopiaDao.java
=====================================
@@ -10,12 +10,12 @@ package fr.ird.observe.entities.data.ll.common;
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/gpl-3.0.html>.
@@ -23,7 +23,6 @@ package fr.ird.observe.entities.data.ll.common;
*/
import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Lists;
import fr.ird.observe.dto.data.TripMapConfigDto;
import fr.ird.observe.dto.data.TripMapPoint;
import fr.ird.observe.dto.data.TripMapPointType;
@@ -40,19 +39,21 @@ import java.sql.Timestamp;
import java.util.Collections;
import java.util.Date;
import java.util.LinkedHashSet;
+import java.util.LinkedList;
import java.util.List;
import java.util.Objects;
+import java.util.Optional;
import java.util.stream.Collectors;
public class TripLonglineTopiaDao extends AbstractTripLonglineTopiaDao<TripLongline> {
//FIXME-PROTECTED-ID
- public static final String ACTIVITY_OBS_INTERACTION_ID= "fr.ird.referential.ll.common.VesselActivityLongline#1239832686138#0.4";
+ public static final String ACTIVITY_OBS_INTERACTION_ID = "fr.ird.referential.ll.common.VesselActivityLongline#1239832686138#0.4";
//FIXME-PROTECTED-ID
- public static final String ACTIVITY_LOGBOOK_INTERACTION_ID= "fr.ird.referential.ll.common.VesselActivityLongline#1239832686138#0.4";
+ public static final String ACTIVITY_LOGBOOK_INTERACTION_ID = "fr.ird.referential.ll.common.VesselActivityLongline#1239832686138#0.4";
//FIXME-PROTECTED-ID
- public static final String ACTIVITY_OBS_STATION_ID= "fr.ird.referential.ll.common.VesselActivityLongline#1239832686138#0.3";
+ public static final String ACTIVITY_OBS_STATION_ID = "fr.ird.referential.ll.common.VesselActivityLongline#1239832686138#0.3";
//FIXME-PROTECTED-ID
- public static final String ACTIVITY_LOGBOOK_STATION_ID= "fr.ird.referential.ll.common.VesselActivityLongline#1239832686138#0.3";
+ public static final String ACTIVITY_LOGBOOK_STATION_ID = "fr.ird.referential.ll.common.VesselActivityLongline#1239832686138#0.3";
public LinkedHashSet<TripMapPoint> extractTripMapActivityPoints(TripMapConfigDto tripMapConfig) {
@@ -63,18 +64,8 @@ public class TripLonglineTopiaDao extends AbstractTripLonglineTopiaDao<TripLongl
LinkedHashSet<TripMapPoint> tripMapPoints = new LinkedHashSet<>();
- // add departure harbours
- Harbour departureHarbour = tripLongline.getDepartureHarbour();
- if (departureHarbour != null
- && departureHarbour.getLatitude() != null
- && departureHarbour.getLongitude() != null) {
- TripMapPoint departurePoint = new TripMapPoint();
- departurePoint.setTime(tripLongline.getStartDate());
- departurePoint.setLatitude(departureHarbour.getLatitude());
- departurePoint.setLongitude(departureHarbour.getLongitude());
- departurePoint.setType(TripMapPointType.longlineDepartureHarbour);
- tripMapPoints.add(departurePoint);
- }
+ // add departure harbour
+ createPoint(tripLongline.getDepartureHarbour(), tripLongline.getStartDate(), TripMapPointType.llTripDepartureHarbour).map(tripMapPoints::add);
if (addObservation) {
// Add Activities Observation
@@ -89,19 +80,8 @@ public class TripLonglineTopiaDao extends AbstractTripLonglineTopiaDao<TripLongl
results.forEach(tripMapPoints::addAll);
}
- // add landing harbours
- Harbour landingHarbour = tripLongline.getLandingHarbour();
- if (landingHarbour != null
- && landingHarbour.getLatitude() != null
- && landingHarbour.getLongitude() != null) {
- TripMapPoint landingPoint = new TripMapPoint();
- landingPoint.setTime(tripLongline.getEndDate());
- landingPoint.setLatitude(landingHarbour.getLatitude());
- landingPoint.setLongitude(landingHarbour.getLongitude());
- landingPoint.setType(TripMapPointType.longlineLandingHarbour);
- tripMapPoints.add(landingPoint);
- }
-
+ // add landing harbour
+ createPoint(tripLongline.getLandingHarbour(), tripLongline.getEndDate(), TripMapPointType.llTripLandingHarbour).map(tripMapPoints::add);
return tripMapPoints;
}
@@ -163,9 +143,10 @@ public class TripLonglineTopiaDao extends AbstractTripLonglineTopiaDao<TripLongl
"vesselId", vesselId,
"startDate", startDate,
"endDate", endDate))
- .filter(t -> !Objects.equals(id ,t.getTopiaId()))
+ .filter(t -> !Objects.equals(id, t.getTopiaId()))
.collect(Collectors.toList());
}
+
private static class TripMapActivityObsPointQuery extends TopiaSqlQuery<List<TripMapPoint>> {
private static final String SQL = "SELECT" +
@@ -207,69 +188,29 @@ public class TripLonglineTopiaDao extends AbstractTripLonglineTopiaDao<TripLongl
@Override
public List<TripMapPoint> prepareResult(ResultSet resultSet) throws SQLException {
- List<TripMapPoint> result = Lists.newLinkedList();
+ List<TripMapPoint> result = new LinkedList<>();
if (resultSet.getString(5) == null) {
-
- // activity
- TripMapPoint activity = new TripMapPoint();
- activity.setTime(resultSet.getDate(1));
- activity.setLatitude(resultSet.getFloat(2));
- activity.setLongitude(resultSet.getFloat(3));
-
- String vesselActivityId = resultSet.getString(4);
- if (vesselActivityId == null) {
- activity.setType(TripMapPointType.longlineActivityObs);
- } else if (ACTIVITY_OBS_INTERACTION_ID.equals(vesselActivityId)) {
- activity.setType(TripMapPointType.longlineActivityObsWithInteraction);
- } else if (ACTIVITY_OBS_STATION_ID.equals(vesselActivityId)) {
- activity.setType(TripMapPointType.longlineActivityObsWithStation);
- } else {
- activity.setType(TripMapPointType.longlineActivityObs);
- }
-
- result.add(activity);
+ // simple activity
+ Optional<TripMapPoint> activity = createPoint(resultSet, 1, TripMapPointType.llActivityObs);
+ activity.ifPresent(result::add);
}
// settingStart
- if (resultSet.getString(5) != null) {
- TripMapPoint settingStart = new TripMapPoint();
- settingStart.setTime(resultSet.getDate(5));
- settingStart.setLatitude(resultSet.getFloat(6));
- settingStart.setLongitude(resultSet.getFloat(7));
- settingStart.setType(TripMapPointType.longlineActivityObsWithSettingStart);
- result.add(settingStart);
- }
+ Optional<TripMapPoint> settingStart = createPoint(resultSet, 5, TripMapPointType.llActivityObsWithSettingStart);
+ settingStart.ifPresent(result::add);
// settingEnd
- if (resultSet.getString(8) != null) {
- TripMapPoint settingEnd = new TripMapPoint();
- settingEnd.setTime(resultSet.getDate(8));
- settingEnd.setLatitude(resultSet.getFloat(9));
- settingEnd.setLongitude(resultSet.getFloat(10));
- settingEnd.setType(TripMapPointType.longlineActivityObsWithSettingEnd);
- result.add(settingEnd);
- }
+ Optional<TripMapPoint> settingEnd = createPoint(resultSet, 8, TripMapPointType.llActivityObsWithSettingEnd);
+ settingEnd.ifPresent(result::add);
// haulingStart
- if (resultSet.getString(11) != null) {
- TripMapPoint haulingStart = new TripMapPoint();
- haulingStart.setTime(resultSet.getDate(11));
- haulingStart.setLatitude(resultSet.getFloat(12));
- haulingStart.setLongitude(resultSet.getFloat(13));
- haulingStart.setType(TripMapPointType.longlineActivityObsWithHaulingStart);
- result.add(haulingStart);
- }
+ Optional<TripMapPoint> haulingStart = createPoint(resultSet, 11, TripMapPointType.llActivityObsWithHaulingStart);
+ haulingStart.ifPresent(result::add);
// haulingEnd
- if (resultSet.getString(14) != null) {
- TripMapPoint haulingEnd = new TripMapPoint();
- haulingEnd.setTime(resultSet.getDate(14));
- haulingEnd.setLatitude(resultSet.getFloat(15));
- haulingEnd.setLongitude(resultSet.getFloat(16));
- haulingEnd.setType(TripMapPointType.longlineActivityObsWithHaulingEnd);
- result.add(haulingEnd);
- }
+ Optional<TripMapPoint> haulingEnd = createPoint(resultSet, 14, TripMapPointType.llActivityObsWithHaulingEnd);
+ haulingEnd.ifPresent(result::add);
return result;
}
@@ -316,69 +257,29 @@ public class TripLonglineTopiaDao extends AbstractTripLonglineTopiaDao<TripLongl
@Override
public List<TripMapPoint> prepareResult(ResultSet resultSet) throws SQLException {
- List<TripMapPoint> result = Lists.newLinkedList();
+ List<TripMapPoint> result = new LinkedList<>();
if (resultSet.getString(5) == null) {
-
- // activity
- TripMapPoint activity = new TripMapPoint();
- activity.setTime(resultSet.getDate(1));
- activity.setLatitude(resultSet.getFloat(2));
- activity.setLongitude(resultSet.getFloat(3));
-
- String vesselActivityId = resultSet.getString(4);
- if (vesselActivityId == null) {
- activity.setType(TripMapPointType.longlineActivityLogbook);
- } else if (ACTIVITY_LOGBOOK_INTERACTION_ID.equals(vesselActivityId)) {
- activity.setType(TripMapPointType.longlineActivityLogbookWithInteraction);
- } else if (ACTIVITY_LOGBOOK_STATION_ID.equals(vesselActivityId)) {
- activity.setType(TripMapPointType.longlineActivityLogbookWithStation);
- } else {
- activity.setType(TripMapPointType.longlineActivityLogbook);
- }
-
- result.add(activity);
+ // simple activity
+ Optional<TripMapPoint> activity = createPoint(resultSet, 1, TripMapPointType.llActivityLogbook);
+ activity.ifPresent(result::add);
}
// settingStart
- if (resultSet.getString(5) != null) {
- TripMapPoint settingStart = new TripMapPoint();
- settingStart.setTime(resultSet.getDate(5));
- settingStart.setLatitude(resultSet.getFloat(6));
- settingStart.setLongitude(resultSet.getFloat(7));
- settingStart.setType(TripMapPointType.longlineActivityLogbookWithSettingStart);
- result.add(settingStart);
- }
+ Optional<TripMapPoint> settingStart = createPoint(resultSet, 5, TripMapPointType.llActivityLogbookWithSettingStart);
+ settingStart.ifPresent(result::add);
// settingEnd
- if (resultSet.getString(8) != null) {
- TripMapPoint settingEnd = new TripMapPoint();
- settingEnd.setTime(resultSet.getDate(8));
- settingEnd.setLatitude(resultSet.getFloat(9));
- settingEnd.setLongitude(resultSet.getFloat(10));
- settingEnd.setType(TripMapPointType.longlineActivityLogbookWithSettingEnd);
- result.add(settingEnd);
- }
+ Optional<TripMapPoint> settingEnd = createPoint(resultSet, 8, TripMapPointType.llActivityLogbookWithSettingEnd);
+ settingEnd.ifPresent(result::add);
// haulingStart
- if (resultSet.getString(11) != null) {
- TripMapPoint haulingStart = new TripMapPoint();
- haulingStart.setTime(resultSet.getDate(11));
- haulingStart.setLatitude(resultSet.getFloat(12));
- haulingStart.setLongitude(resultSet.getFloat(13));
- haulingStart.setType(TripMapPointType.longlineActivityLogbookWithHaulingStart);
- result.add(haulingStart);
- }
+ Optional<TripMapPoint> haulingStart = createPoint(resultSet, 11, TripMapPointType.llActivityLogbookWithHaulingStart);
+ haulingStart.ifPresent(result::add);
// haulingEnd
- if (resultSet.getString(14) != null) {
- TripMapPoint haulingEnd = new TripMapPoint();
- haulingEnd.setTime(resultSet.getDate(14));
- haulingEnd.setLatitude(resultSet.getFloat(15));
- haulingEnd.setLongitude(resultSet.getFloat(16));
- haulingEnd.setType(TripMapPointType.longlineActivityLogbookWithHaulingEnd);
- result.add(haulingEnd);
- }
+ Optional<TripMapPoint> haulingEnd = createPoint(resultSet, 14, TripMapPointType.llActivityLogbookWithHaulingEnd);
+ haulingEnd.ifPresent(result::add);
return result;
}
@@ -421,4 +322,30 @@ public class TripLonglineTopiaDao extends AbstractTripLonglineTopiaDao<TripLongl
}
}
+
+ private static Optional<TripMapPoint> createPoint(Harbour harbour, Date date, TripMapPointType tripMapPointType) {
+ TripMapPoint result = null;
+ if (harbour != null && harbour.getLatitude() != null && harbour.getLongitude() != null) {
+ result = new TripMapPoint();
+ result.setTime(date);
+ result.setLatitude(harbour.getLatitude());
+ result.setLongitude(harbour.getLongitude());
+ result.setType(tripMapPointType);
+ }
+ return Optional.ofNullable(result);
+ }
+
+ private static Optional<TripMapPoint> createPoint(ResultSet resultSet, int dateColumnIndex, TripMapPointType tripMapPointType) throws SQLException {
+
+ TripMapPoint result = null;
+ if (resultSet.getString(dateColumnIndex) != null) {
+ result = new TripMapPoint();
+ result.setTime(resultSet.getDate(dateColumnIndex));
+ result.setLatitude(resultSet.getFloat(dateColumnIndex + 1));
+ result.setLongitude(resultSet.getFloat(dateColumnIndex + 2));
+ result.setType(tripMapPointType);
+ }
+ return Optional.ofNullable(result);
+ }
+
}
=====================================
persistence/src/main/java/fr/ird/observe/entities/data/ps/common/TripSeineTopiaDao.java
=====================================
@@ -40,6 +40,7 @@ import java.util.Date;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Objects;
+import java.util.Optional;
import java.util.stream.Collectors;
/**
@@ -58,31 +59,15 @@ public class TripSeineTopiaDao extends AbstractTripSeineTopiaDao<TripSeine> {
LinkedHashSet<TripMapPoint> tripMapPoints = new LinkedHashSet<>();
- // add departure harbours
- Harbour departureHarbour = tripSeine.getDepartureHarbour();
- if (departureHarbour != null && departureHarbour.getLatitude() != null && departureHarbour.getLongitude() != null) {
- TripMapPoint departurePoint = new TripMapPoint();
- departurePoint.setTime(tripSeine.getStartDate());
- departurePoint.setLatitude(departureHarbour.getLatitude());
- departurePoint.setLongitude(departureHarbour.getLongitude());
- departurePoint.setType(TripMapPointType.seineDepartureHarbour);
- tripMapPoints.add(departurePoint);
- }
+ // add departure harbour
+ createPoint(tripSeine.getDepartureHarbour(), tripSeine.getStartDate(), TripMapPointType.psTripDepartureHarbour).map(tripMapPoints::add);
// Add Activities
TripMapActivityPointQuery tripMapActivityPointQuery = new TripMapActivityPointQuery(tripId);
tripMapPoints.addAll(topiaSqlSupport.findMultipleResult(tripMapActivityPointQuery));
- // add landing harbours
- Harbour landingHarbour = tripSeine.getLandingHarbour();
- if (landingHarbour != null && landingHarbour.getLatitude() != null && landingHarbour.getLongitude() != null) {
- TripMapPoint landingPoint = new TripMapPoint();
- landingPoint.setTime(tripSeine.getEndDate());
- landingPoint.setLatitude(landingHarbour.getLatitude());
- landingPoint.setLongitude(landingHarbour.getLongitude());
- landingPoint.setType(TripMapPointType.seineLandingHarbour);
- tripMapPoints.add(landingPoint);
- }
+ // add landing harbour
+ createPoint(tripSeine.getLandingHarbour(), tripSeine.getEndDate(), TripMapPointType.psTripLandingHarbour).map(tripMapPoints::add);
return tripMapPoints;
}
@@ -142,31 +127,26 @@ public class TripSeineTopiaDao extends AbstractTripSeineTopiaDao<TripSeine> {
point.setLatitude(resultSet.getFloat(3));
point.setLongitude(resultSet.getFloat(4));
if (ACTIVITY_HARBOUR_ID.equals(resultSet.getString(5))) {
- point.setType(TripMapPointType.seineActivityObsInHarbour);
+ point.setType(TripMapPointType.psActivityObsInHarbour);
} else if (resultSet.getString(6) == null) {
- point.setType(TripMapPointType.seineActivityObs);
+ point.setType(TripMapPointType.psActivityObs);
} else {
String schoolType = resultSet.getString(6);
switch (schoolType) {
case SchoolTypeHelper.SCHOOL_TYPE_FREE_ID:
- point.setType(TripMapPointType.seineActivityObsWithFreeSchoolType);
+ point.setType(TripMapPointType.psActivityObsWithFreeSchoolType);
break;
case SchoolTypeHelper.SCHOOL_TYPE_OBJECT_ID:
- point.setType(TripMapPointType.seineActivityObsWithObjectSchoolType);
- break;
- case SchoolTypeHelper.SCHOOL_TYPE_UNDEFINED_ID:
- point.setType(TripMapPointType.seineActivityObs);
+ point.setType(TripMapPointType.psActivityObsWithObjectSchoolType);
break;
default:
- point.setType(TripMapPointType.seineActivityObs);
+ point.setType(TripMapPointType.psActivityObs);
}
-
}
-
return point;
}
- }
+ }
public boolean updateEndDate(TripSeine trip) {
boolean wasUpdated = false;
@@ -252,4 +232,16 @@ public class TripSeineTopiaDao extends AbstractTripSeineTopiaDao<TripSeine> {
}
+ private static Optional<TripMapPoint> createPoint(Harbour harbour, Date date, TripMapPointType tripMapPointType) {
+ TripMapPoint result = null;
+ if (harbour != null && harbour.getLatitude() != null && harbour.getLongitude() != null) {
+ result = new TripMapPoint();
+ result.setTime(date);
+ result.setLatitude(harbour.getLatitude());
+ result.setLongitude(harbour.getLongitude());
+ result.setType(tripMapPointType);
+ }
+ return Optional.ofNullable(result);
+ }
+
}
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/f6f71f0ddde77cd2492446c11a…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/f6f71f0ddde77cd2492446c11a…
You're receiving this email because of your account on gitlab.com.
1
0