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
September 2018
- 1 participants
- 147 discussions
Tony CHEMIT deleted branch release/7.0-RC-22 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-RC-22 at ultreiaio / ird-observe
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/tree/v7.0-RC-22
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][release/7.0-RC-22] [jgitflow-maven-plugin]updating poms for branch'release/7.0-RC-22' with…
by Tony CHEMIT 23 Sep '18
by Tony CHEMIT 23 Sep '18
23 Sep '18
Tony CHEMIT pushed to branch release/7.0-RC-22 at ultreiaio / ird-observe
Commits:
99b971a7 by Tony CHEMIT at 2018-09-23T20:46:59Z
[jgitflow-maven-plugin]updating poms for branch'release/7.0-RC-22' with non-snapshot versions[skip ci]
- - - - -
13 changed files:
- client-configuration/pom.xml
- client/pom.xml
- dto/pom.xml
- observe/pom.xml
- persistence/pom.xml
- pom.xml
- server-configuration/pom.xml
- server/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-RC-22-SNAPSHOT</version>
+ <version>7.0-RC-22</version>
</parent>
<artifactId>client-configuration</artifactId>
=====================================
client/pom.xml
=====================================
@@ -26,7 +26,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0-RC-22-SNAPSHOT</version>
+ <version>7.0-RC-22</version>
</parent>
<artifactId>client</artifactId>
=====================================
dto/pom.xml
=====================================
@@ -27,7 +27,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0-RC-22-SNAPSHOT</version>
+ <version>7.0-RC-22</version>
</parent>
<artifactId>dto</artifactId>
=====================================
observe/pom.xml
=====================================
@@ -26,7 +26,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0-RC-22-SNAPSHOT</version>
+ <version>7.0-RC-22</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-RC-22-SNAPSHOT</version>
+ <version>7.0-RC-22</version>
</parent>
<artifactId>persistence</artifactId>
=====================================
pom.xml
=====================================
@@ -31,7 +31,7 @@
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0-RC-22-SNAPSHOT</version>
+ <version>7.0-RC-22</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-RC-22-SNAPSHOT</version>
+ <version>7.0-RC-22</version>
</parent>
<artifactId>server-configuration</artifactId>
=====================================
server/pom.xml
=====================================
@@ -27,7 +27,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0-RC-22-SNAPSHOT</version>
+ <version>7.0-RC-22</version>
</parent>
<artifactId>server</artifactId>
=====================================
services-client/pom.xml
=====================================
@@ -27,7 +27,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0-RC-22-SNAPSHOT</version>
+ <version>7.0-RC-22</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-RC-22-SNAPSHOT</version>
+ <version>7.0-RC-22</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-RC-22-SNAPSHOT</version>
+ <version>7.0-RC-22</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-RC-22-SNAPSHOT</version>
+ <version>7.0-RC-22</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-RC-22-SNAPSHOT</version>
+ <version>7.0-RC-22</version>
</parent>
<artifactId>validation</artifactId>
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/99b971a77233d5692c445810456…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/99b971a77233d5692c445810456…
You're receiving this email because of your account on gitlab.com.
1
0
23 Sep '18
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe
Commits:
eed4e25e by Tony CHEMIT at 2018-09-23T11:28:54Z
optimize i18n
- - - - -
1e822246 by Tony CHEMIT at 2018-09-23T12:03:19Z
optimize i18n + detect again all we can
- - - - -
fec04535 by Tony CHEMIT at 2018-09-23T12:17:00Z
optimize dependencies
- - - - -
e4977e49 by Tony CHEMIT at 2018-09-23T12:18:09Z
[jgitflow-maven-plugin]updating poms for 7.0-RC-22 branch with snapshot versions[skip ci]
- - - - -
d5576682 by Tony CHEMIT at 2018-09-23T12:40:43Z
[jgitflow-maven-plugin]updating poms for branch'release/7.0-RC-22' with non-snapshot versions[skip ci]
- - - - -
5051afba by Tony CHEMIT at 2018-09-23T12:48:45Z
[jgitflow-maven-plugin]merging 'release/7.0-RC-22' into 'master-7.x'
- - - - -
96c75a89 by Tony CHEMIT at 2018-09-23T20:41:19Z
[jgitflow-maven-plugin]updating poms for 7.0-RC-22 branch with snapshot versions[skip ci]
- - - - -
99b971a7 by Tony CHEMIT at 2018-09-23T20:46:59Z
[jgitflow-maven-plugin]updating poms for branch'release/7.0-RC-22' with non-snapshot versions[skip ci]
- - - - -
6521b438 by Tony CHEMIT at 2018-09-23T20:58:12Z
[jgitflow-maven-plugin]merging 'release/7.0-RC-22' into 'master-7.x'
- - - - -
1804568b by Tony CHEMIT at 2018-09-23T20:58:18Z
[jgitflow-maven-plugin]updating develop poms to master versions to avoid merge conflicts[skip ci]
- - - - -
0f2b92ab by Tony CHEMIT at 2018-09-23T20:58:19Z
[jgitflow-maven-plugin]merging 'master-7.x' into 'develop-7.x'
- - - - -
26c0d184 by Tony CHEMIT at 2018-09-23T20:58:21Z
[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/a8244f9ae67786c2e3e6c24cc1…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/a8244f9ae67786c2e3e6c24cc1…
You're receiving this email because of your account on gitlab.com.
1
0
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
fb5deba0 by Tony CHEMIT at 2018-09-23T20:45:44Z
update changelog
- - - - -
2 changed files:
- .mvn/gitlab-cache/milestones/654414-issues.json
- CHANGELOG.md
Changes:
=====================================
.mvn/gitlab-cache/milestones/654414-issues.json
=====================================
@@ -200,6 +200,55 @@
"updatedAt": "Sep 23, 2018 12:01:59 PM",
"createdAt": "Jun 4, 2018 3:14:48 PM"
},
+ {
+ "id": 14412286,
+ "iid": 1081,
+ "projectId": 2722779,
+ "title": "Les rapports ne fonctionnent pas très bien",
+ "description": "Il y a plusieurs erreurs à corriger (pb de sérialisation en mode serveur, décorateur non trouvé, sélection multiple de marées).",
+ "labels": [
+ "Anomalie",
+ "Contrat Code Lutin-2016"
+ ],
+ "milestone": {
+ "id": 654414,
+ "iid": 125,
+ "projectId": 2722779,
+ "groupId": 0,
+ "title": "7.0-RC-22",
+ "description": "",
+ "dueDate": "Sep 22, 2018 2:00:00 AM",
+ "startDate": "Sep 20, 2018 2:00:00 AM",
+ "state": "closed"
+ },
+ "assignee": {
+ "_id": 166231,
+ "_username": "tchemit",
+ "_name": "Tony CHEMIT",
+ "_state": "active",
+ "_darkScheme": false,
+ "_isAdmin": false,
+ "_canCreateGroup": false,
+ "_canCreateProject": false,
+ "_canCreateTeam": false,
+ "_avatarUrl": "https://secure.gravatar.com/avatar/2a915aa9a1df35c8b609ff2f750d5dac?s\u003d…"
+ },
+ "author": {
+ "_id": 166231,
+ "_username": "tchemit",
+ "_name": "Tony CHEMIT",
+ "_state": "active",
+ "_darkScheme": false,
+ "_isAdmin": false,
+ "_canCreateGroup": false,
+ "_canCreateProject": false,
+ "_canCreateTeam": false,
+ "_avatarUrl": "https://secure.gravatar.com/avatar/2a915aa9a1df35c8b609ff2f750d5dac?s\u003d…"
+ },
+ "state": "closed",
+ "updatedAt": "Sep 23, 2018 10:39:19 PM",
+ "createdAt": "Sep 23, 2018 10:06:54 PM"
+ },
{
"id": 14373303,
"iid": 1073,
=====================================
CHANGELOG.md
=====================================
@@ -1,7 +1,7 @@
# ObServe changelog
* Author [Tony Chemit](mailto:dev@tchemit.fr)
- * Last generated at 2018-09-23 13:14.
+ * Last generated at 2018-09-23 22:45.
## Version [8.0-alpha-3](https://gitlab.com/ultreiaio/ird-observe/milestones/114)
Première partie du troisième lot du contrat IRD-2018-01-V8. contient les nouveaux écrans, mais aucune des fonctionnalités avancées.
@@ -82,6 +82,7 @@ Premier lot du contrat IRD-2018-01-V8
* [[Anomalie 1073]](https://gitlab.com/ultreiaio/ird-observe/issues/1073) **La mise à jour des référentiels ne fonctionne pas si il y a des référentiels obsolètes!** (Thanks to ) (Reported by Tony CHEMIT)
* [[Anomalie 1074]](https://gitlab.com/ultreiaio/ird-observe/issues/1074) **Après avoir réussit à effectuer les remplacements de référentiels obsolètes, la base source est toujours sauvegardé!** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
* [[Anomalie 1075]](https://gitlab.com/ultreiaio/ird-observe/issues/1075) **[PS] La création automatique d'une calée ne fonctionne plus** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
+ * [[Anomalie 1081]](https://gitlab.com/ultreiaio/ird-observe/issues/1081) **Les rapports ne fonctionnent pas très bien** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
* [[Evolution 960]](https://gitlab.com/ultreiaio/ird-observe/issues/960) **Widget température °C/°F : message de validation perfectible** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
* [[Evolution 1080]](https://gitlab.com/ultreiaio/ird-observe/issues/1080) **Un contrôle insoupçonné vérifie les températures entre activités** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/fb5deba00986e3133e252edc75e…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/fb5deba00986e3133e252edc75e…
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-RC-23-SNAPSHOT development[skip ci]
by Tony CHEMIT 23 Sep '18
by Tony CHEMIT 23 Sep '18
23 Sep '18
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe
Commits:
a8244f9a by Tony CHEMIT at 2018-09-23T20:41:20Z
[jgitflow-maven-plugin]updating poms for 7.0-RC-23-SNAPSHOT development[skip ci]
- - - - -
13 changed files:
- client-configuration/pom.xml
- client/pom.xml
- dto/pom.xml
- observe/pom.xml
- persistence/pom.xml
- pom.xml
- server-configuration/pom.xml
- server/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-RC-22-SNAPSHOT</version>
+ <version>7.0-RC-23-SNAPSHOT</version>
</parent>
<artifactId>client-configuration</artifactId>
=====================================
client/pom.xml
=====================================
@@ -26,7 +26,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0-RC-22-SNAPSHOT</version>
+ <version>7.0-RC-23-SNAPSHOT</version>
</parent>
<artifactId>client</artifactId>
=====================================
dto/pom.xml
=====================================
@@ -21,14 +21,13 @@
#L%
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0-RC-22-SNAPSHOT</version>
+ <version>7.0-RC-23-SNAPSHOT</version>
</parent>
<artifactId>dto</artifactId>
@@ -241,10 +240,10 @@
<target>
<copy failonerror="true" overwrite="true" filtering="true" todir="${project.build.directory}/models">
<filterset>
- <filter value="${observe.model.version}" token="observe.model.version"/>
+ <filter value="${observe.model.version}" token="observe.model.version" />
</filterset>
<fileset dir="${basedir}/src/main/models">
- <include name="*.model"/>
+ <include name="*.model" />
</fileset>
</copy>
</target>
=====================================
observe/pom.xml
=====================================
@@ -26,7 +26,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0-RC-22-SNAPSHOT</version>
+ <version>7.0-RC-23-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-RC-22-SNAPSHOT</version>
+ <version>7.0-RC-23-SNAPSHOT</version>
</parent>
<artifactId>persistence</artifactId>
=====================================
pom.xml
=====================================
@@ -31,7 +31,7 @@
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0-RC-22-SNAPSHOT</version>
+ <version>7.0-RC-23-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-RC-22-SNAPSHOT</version>
+ <version>7.0-RC-23-SNAPSHOT</version>
</parent>
<artifactId>server-configuration</artifactId>
=====================================
server/pom.xml
=====================================
@@ -27,7 +27,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0-RC-22-SNAPSHOT</version>
+ <version>7.0-RC-23-SNAPSHOT</version>
</parent>
<artifactId>server</artifactId>
=====================================
services-client/pom.xml
=====================================
@@ -27,7 +27,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0-RC-22-SNAPSHOT</version>
+ <version>7.0-RC-23-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-RC-22-SNAPSHOT</version>
+ <version>7.0-RC-23-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-RC-22-SNAPSHOT</version>
+ <version>7.0-RC-23-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-RC-22-SNAPSHOT</version>
+ <version>7.0-RC-23-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-RC-22-SNAPSHOT</version>
+ <version>7.0-RC-23-SNAPSHOT</version>
</parent>
<artifactId>validation</artifactId>
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/a8244f9ae67786c2e3e6c24cc17…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/a8244f9ae67786c2e3e6c24cc17…
You're receiving this email because of your account on gitlab.com.
1
0
23 Sep '18
Tony CHEMIT pushed new branch release/7.0-RC-22 at ultreiaio / ird-observe
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/tree/release/7.0-RC-22
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop-7.x] 2 commits: Les rapports ne fonctionnent pas très bien - Closes #1081
by Tony CHEMIT 23 Sep '18
by Tony CHEMIT 23 Sep '18
23 Sep '18
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe
Commits:
5bd56caf by Tony CHEMIT at 2018-09-23T20:33:04Z
Les rapports ne fonctionnent pas très bien - Closes #1081
- - - - -
6a9d6644 by Tony CHEMIT at 2018-09-23T20:33:05Z
remove some default shortcuts on some uis (but it still does not work for some of them)...
- - - - -
15 changed files:
- client/src/main/java/fr/ird/observe/client/ui/admin/config/SelectDataModel.java
- client/src/main/java/fr/ird/observe/client/ui/admin/report/ReportUI.jcss
- client/src/main/java/fr/ird/observe/client/ui/admin/report/ReportUIHandler.java
- client/src/main/java/fr/ird/observe/client/ui/dcprefs/FloatingObjectPresetsUIHandler.java
- client/src/main/java/fr/ird/observe/client/ui/storage/presets/RemotePresetsUIHandler.java
- services-client/src/test/java/fr/ird/observe/services/client/service/actions/report/AbstractReportServiceClientTest.java
- services-local/src/main/java/fr/ird/observe/services/local/service/actions/report/ReportServiceLocal.java
- services-local/src/test/java/fr/ird/observe/services/local/service/actions/report/AbstractReportServiceLocalTest.java
- + services-local/src/test/java/fr/ird/observe/services/local/service/actions/report/ReportNonTargetDistributionLengthsTest.java
- services/pom.xml
- services/src/main/java/fr/ird/observe/services/gson/ReportVariableAdapter.java
- services/src/main/java/fr/ird/observe/services/service/actions/report/ReportBuilder.java
- services/src/main/java/fr/ird/observe/services/service/actions/report/ReportRequest.java
- services/src/main/java/fr/ird/observe/services/service/actions/report/ReportService.java
- services/src/main/resources/observe-reports.properties
Changes:
=====================================
client/src/main/java/fr/ird/observe/client/ui/admin/config/SelectDataModel.java
=====================================
@@ -10,36 +10,39 @@ package fr.ird.observe.client.ui.admin.config;
* 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.common.collect.ImmutableSet;
import fr.ird.observe.client.db.ObserveSwingDataSource;
import fr.ird.observe.client.ui.admin.AdminActionModel;
import fr.ird.observe.client.ui.admin.AdminStep;
import fr.ird.observe.client.ui.admin.AdminUIModel;
import fr.ird.observe.client.ui.admin.report.ReportModel;
import fr.ird.observe.client.ui.tree.selection.SelectionTreeModel;
+import fr.ird.observe.dto.IdDto;
import fr.ird.observe.dto.IdHelper;
import fr.ird.observe.dto.ObserveModelType;
import fr.ird.observe.dto.data.longline.TripLonglineReference;
import fr.ird.observe.dto.data.seine.TripSeineReference;
import fr.ird.observe.dto.reference.DataDtoReference;
import fr.ird.observe.dto.reference.DataDtoReferenceSet;
-import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
+import java.util.stream.Collectors;
/**
* Created on 28/11/16.
@@ -99,10 +102,8 @@ public class SelectDataModel extends AdminActionModel {
// on doit aussi calculer les ids des marées distantes
ObserveSwingDataSource safeCentralSource = uiModel.getConfigModel().getSafeCentralSource(true);
- List<DataDtoReference<?, ?>> existingTrip = new ArrayList<>();
-
DataDtoReferenceSet<TripSeineReference> tripSeineSet = safeCentralSource.getTripSeineService().getAllTripSeine();
- existingTrip.addAll(tripSeineSet.toSet());
+ List<DataDtoReference<?, ?>> existingTrip = new ArrayList<>(tripSeineSet.toSet());
DataDtoReferenceSet<TripLonglineReference> tripLonglineSet = safeCentralSource.getTripLonglineService().getAllTripLongline();
existingTrip.addAll(tripLonglineSet.toSet());
@@ -136,6 +137,17 @@ public class SelectDataModel extends AdminActionModel {
return null;
}
+ public ImmutableSet<DataDtoReference> getSelectedTrips() {
+ ImmutableSet.Builder<DataDtoReference> result = ImmutableSet.builder();
+ Set<DataDtoReference<?, ?>> data = getSelectionDataModel().getSelectedData();
+ for (DataDtoReference<?, ?> datum : data) {
+ if (IdHelper.isTrip(datum)) {
+ result.add(datum);
+ }
+ }
+ return result.build();
+ }
+
public void start(AdminUIModel uiModel) {
if (!uiModel.needSelect()) {
@@ -194,6 +206,7 @@ public class SelectDataModel extends AdminActionModel {
public boolean validate(AdminUIModel uiModel) {
boolean validate = true;
+ boolean empty = selectionDataModel.isSelectionEmpty();
if (uiModel.containsOperation(AdminStep.VALIDATE)) {
@@ -202,7 +215,6 @@ public class SelectDataModel extends AdminActionModel {
if (validate) {
// il faut au moins une donnee de selectionnee
- boolean empty = selectionDataModel.isSelectionEmpty();
validate = !empty;
}
}
@@ -213,7 +225,6 @@ public class SelectDataModel extends AdminActionModel {
if (validate) {
// il faut au moins une donnee de selectionnee
- boolean empty = selectionDataModel.isSelectionEmpty();
validate = !empty;
}
}
@@ -224,7 +235,6 @@ public class SelectDataModel extends AdminActionModel {
if (validate) {
// il faut au moins une donnee de selectionnee
- boolean empty = selectionDataModel.isSelectionEmpty();
validate = !empty;
}
}
@@ -234,12 +244,15 @@ public class SelectDataModel extends AdminActionModel {
validate &= uiModel.validate(AdminStep.CONFIG);
if (validate) {
- // il faut exactement une Trip de selectionnee
- int selectedCount = selectionDataModel.getSelectedCount();
- validate = selectedCount == 1;
+ // il faut au moins une donnee de selectionnee
+ validate = !empty;
}
}
return validate;
}
+
+ public ImmutableSet<String> getSelectedTripIds() {
+ return ImmutableSet.copyOf(getSelectedTrips().stream().map(IdDto::getId).collect(Collectors.toSet()));
+ }
}
=====================================
client/src/main/java/fr/ird/observe/client/ui/admin/report/ReportUI.jcss
=====================================
@@ -71,7 +71,7 @@ JToolBar {
}
#reportDescription {
- text:{getHandler().updateSelectedReportDescrption(stepModel.getSelectedReport())};
+ text:{getHandler().updateSelectedReportDescription(stepModel.getSelectedReport())};
editable:false;
focusable:false;
}
=====================================
client/src/main/java/fr/ird/observe/client/ui/admin/report/ReportUIHandler.java
=====================================
@@ -6,22 +6,22 @@
* %%
* 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
+ * 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
+ *
+ * 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%
*/
package fr.ird.observe.client.ui.admin.report;
-import com.google.common.collect.Lists;
+import com.google.common.collect.ImmutableSet;
import fr.ird.observe.client.ObserveSwingTechnicalException;
import fr.ird.observe.client.db.ObserveSwingDataSource;
import fr.ird.observe.client.ui.admin.AdminStep;
@@ -36,8 +36,9 @@ import fr.ird.observe.services.service.actions.report.DataMatrix;
import fr.ird.observe.services.service.actions.report.Report;
import fr.ird.observe.services.service.actions.report.ReportService;
import fr.ird.observe.services.service.actions.report.ReportVariable;
-import org.apache.logging.log4j.Logger;
+import fr.ird.observe.spi.DtoModelHelper;
import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.nuiton.decorator.Decorator;
import org.nuiton.decorator.JXPathDecorator;
import org.nuiton.jaxx.runtime.context.JAXXInitialContext;
@@ -57,6 +58,7 @@ import java.awt.Component;
import java.awt.Font;
import java.awt.event.ItemEvent;
import java.io.File;
+import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -71,7 +73,7 @@ import static org.nuiton.i18n.I18n.t;
*/
public class ReportUIHandler extends AdminTabUIHandler<ReportUI> implements UIHandler<ReportUI> {
- public static final String VARIABLE_NAME = "variableName";
+ private static final String VARIABLE_NAME = "variableName";
/** Logger */
private static final Logger log = LogManager.getLogger(ReportUIHandler.class);
@@ -142,14 +144,14 @@ public class ReportUIHandler extends AdminTabUIHandler<ReportUI> implements UIHa
Font headerFont;
- public Font getDefaultFont(JTable table) {
+ Font getDefaultFont(JTable table) {
if (defaultFont == null) {
defaultFont = table.getFont();
}
return defaultFont;
}
- public Font getHeaderFont(JTable table) {
+ Font getHeaderFont(JTable table) {
if (headerFont == null) {
headerFont = getDefaultFont(table).deriveFont(Font.BOLD);
}
@@ -187,13 +189,13 @@ public class ReportUIHandler extends AdminTabUIHandler<ReportUI> implements UIHa
configUI.getExtraConfig().add(extraConfig);
}
- public void setModelTypeFromEvent(ItemEvent event) {
+ void setModelTypeFromEvent(ItemEvent event) {
if (event.getStateChange() == ItemEvent.SELECTED) {
getStepModel().setModelType((ObserveModelType) event.getItem());
}
}
- public void updateSelectedReportFromEvent(ItemEvent event) {
+ void updateSelectedReportFromEvent(ItemEvent event) {
if (event.getStateChange() == ItemEvent.SELECTED) {
if (log.isInfoEnabled()) {
@@ -204,7 +206,7 @@ public class ReportUIHandler extends AdminTabUIHandler<ReportUI> implements UIHa
}
}
- public void updateSelectedReport(Report report) {
+ void updateSelectedReport(Report report) {
ui.getModel().setBusy(true);
try {
if (log.isInfoEnabled()) {
@@ -217,14 +219,14 @@ public class ReportUIHandler extends AdminTabUIHandler<ReportUI> implements UIHa
}
}
- public String updateSelectedReportDescrption(Report report) {
+ String updateSelectedReportDescription(Report report) {
if (report == null) {
return t("observe.message.no.report.selected");
}
return t(report.getDescription());
}
- public void updateVariable(JComboBox combo, Object value) {
+ private void updateVariable(JComboBox combo, Object value) {
String variableName = (String) combo.getClientProperty(VARIABLE_NAME);
if (variableName == null) {
throw new IllegalStateException(
@@ -236,7 +238,7 @@ public class ReportUIHandler extends AdminTabUIHandler<ReportUI> implements UIHa
getStepModel().addVariable(variableName, value);
}
- public void chooseReportFile() {
+ void chooseReportFile() {
ReportModel model = ui.getModel().getReportModel();
File f = UIHelper.chooseFile(
ui,
@@ -248,10 +250,10 @@ public class ReportUIHandler extends AdminTabUIHandler<ReportUI> implements UIHa
model.setReportFile(f);
}
- public void copyReportToClipBoard(Report report,
- ResultTableModel model,
- boolean copyRowHeaders,
- boolean copyColumnHeaders) {
+ void copyReportToClipBoard(Report report,
+ ResultTableModel model,
+ boolean copyRowHeaders,
+ boolean copyColumnHeaders) {
if (report == null) {
// pas de report sélectionné, rien à faire
@@ -267,7 +269,7 @@ public class ReportUIHandler extends AdminTabUIHandler<ReportUI> implements UIHa
UIHelper.copyToClipBoard(content);
}
- protected void onReportsChanged(ReportUI tabUI, List<?> newValue) {
+ private void onReportsChanged(ReportUI tabUI, List<?> newValue) {
if (log.isDebugEnabled()) {
log.debug("New reports : " + newValue);
@@ -281,7 +283,7 @@ public class ReportUIHandler extends AdminTabUIHandler<ReportUI> implements UIHa
}
@SuppressWarnings({"unchecked"})
- protected void onSelectedReportChanged(ReportUI tabUI, ReportModel model, Report report) {
+ private void onSelectedReportChanged(ReportUI tabUI, ReportModel model, Report report) {
if (log.isInfoEnabled()) {
log.info("New selected report [" + report + "]");
@@ -309,7 +311,7 @@ public class ReportUIHandler extends AdminTabUIHandler<ReportUI> implements UIHa
ReportService reportService = dataSource.getReportService();
- report = reportService.populateVariables(report, ui.getModel().getSelectDataModel().getSelectedTrip().getId());
+ report = reportService.populateVariables(report, ui.getModel().getSelectDataModel().getSelectedTripIds());
} catch (Exception e) {
throw new ObserveSwingTechnicalException("unable to populate report : " + report.getName(), e);
@@ -322,16 +324,18 @@ public class ReportUIHandler extends AdminTabUIHandler<ReportUI> implements UIHa
String variableName = variable.getName();
// String value = variables.get(variableName);
Set values = variable.getValues();
- List<Object> universe = Lists.newArrayList(values);
+ List<Object> universe = new ArrayList<>(values);
BeanComboBox<Object> combo = new BeanComboBox<>();
combo.setShowReset(true);
variablesPanel.add(combo);
Decorator decorator;
if (ReferentialDto.class.isAssignableFrom(variable.getType()) && !universe.isEmpty()) {
- decorator = getDecoratorService().getReferentialReferenceDecorator(variable.getType());
+ Class type = DtoModelHelper.fromReferentialDto(variable.getType()).toReferenceType();
+ decorator = getDecoratorService().getReferentialReferenceDecorator(type);
} else if (DataDto.class.isAssignableFrom(variable.getType()) && !universe.isEmpty()) {
- decorator = getDecoratorService().getDataReferenceDecorator(variable.getType());
+ Class type = DtoModelHelper.fromDataDto(variable.getType()).toReferenceType();
+ decorator = getDecoratorService().getDataReferenceDecorator(type);
} else {
decorator = getDecoratorService().getDecoratorByType(variable.getType());
}
@@ -372,7 +376,7 @@ public class ReportUIHandler extends AdminTabUIHandler<ReportUI> implements UIHa
}
}
- protected void onVariablesChanges(ReportModel model, Map<String, Object> variables) {
+ private void onVariablesChanges(ReportModel model, Map<String, Object> variables) {
Report report = model.getSelectedReport();
if (report != null) {
@@ -381,7 +385,7 @@ public class ReportUIHandler extends AdminTabUIHandler<ReportUI> implements UIHa
}
}
- protected void onValidChanged(ReportModel model, boolean valid) {
+ private void onValidChanged(ReportModel model, boolean valid) {
if (log.isInfoEnabled()) {
log.info("valid state changed to " + valid);
@@ -399,11 +403,10 @@ public class ReportUIHandler extends AdminTabUIHandler<ReportUI> implements UIHa
Report report = model.getSelectedReport();
+ ImmutableSet<String> tripIds = ui.getModel().getSelectDataModel().getSelectedTripIds();
DataDtoReference trip = ui.getModel().getSelectDataModel().getSelectedTrip();
- if (log.isDebugEnabled()) {
- log.debug("Build result for report [" + report.getName() + "] on " + trip);
- }
+ log.info(String.format("Build result for report [%s] on %s", report.getName(), trip));
Map<String, Object> variables = model.getVariables();
@@ -421,13 +424,11 @@ public class ReportUIHandler extends AdminTabUIHandler<ReportUI> implements UIHa
ReportService reportService = dataSource.getReportService();
- DataMatrix data = reportService.executeReport(report, trip.getId());
+ DataMatrix data = reportService.executeReport(report, tripIds);
timeLog.log(startTime, "execute", report.getName());
- if (log.isInfoEnabled()) {
- log.info("Result to dispaly:\n" + data.getClipboardContent(true, true, false, '\t'));
- }
+ log.info("Result to display:\n" + data.getClipboardContent(true, true, false, '\t'));
// calcul des données et contruction du tableau
model.getResultModel().populate(report, data);
@@ -439,17 +440,11 @@ public class ReportUIHandler extends AdminTabUIHandler<ReportUI> implements UIHa
model.isCopyRowHeaders(),
model.isCopyColumnHeaders());
}
-
} catch (Exception e) {
-
UIHelper.handlingError("Could not obtain report data", e);
-
model.getResultModel().clear();
-
} finally {
-
ui.getModel().setBusy(false);
-
}
}
@@ -457,15 +452,13 @@ public class ReportUIHandler extends AdminTabUIHandler<ReportUI> implements UIHa
return ui.getModel().getReportModel();
}
- protected void updateValidState(Report report, Map<String, Object> variables) {
-
+ private void updateValidState(Report report, Map<String, Object> variables) {
boolean canExecute = report != null && report.canExecute(variables);
getStepModel().setValid(canExecute);
}
public void destroy() {
ObserveSwingDataSource dataSource = ui.getModel().getConfigModel().getSafeLocalSource(false);
-
if (dataSource.isOpen()) {
dataSource.close();
}
=====================================
client/src/main/java/fr/ird/observe/client/ui/dcprefs/FloatingObjectPresetsUIHandler.java
=====================================
@@ -10,12 +10,12 @@ package fr.ird.observe.client.ui.dcprefs;
* 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>.
@@ -33,8 +33,12 @@ import org.nuiton.jaxx.runtime.swing.renderer.DecoratorListCellRenderer;
import javax.swing.AbstractButton;
import javax.swing.DefaultListModel;
+import javax.swing.JComponent;
+import javax.swing.JSplitPane;
+import javax.swing.KeyStroke;
import javax.swing.SwingUtilities;
import java.awt.BorderLayout;
+import java.awt.event.KeyEvent;
import java.util.LinkedList;
import java.util.List;
import java.util.Objects;
@@ -69,6 +73,8 @@ public class FloatingObjectPresetsUIHandler implements UIHandler<FloatingObjectP
if (o instanceof AbstractButton) {
init(actionMap, (AbstractButton) o);
+ } else if (o instanceof JSplitPane) {
+ init((JSplitPane) o);
}
}
@@ -119,6 +125,12 @@ public class FloatingObjectPresetsUIHandler implements UIHandler<FloatingObjectP
UIHelper.askFocus(ui.getQuitAction());
}
+
+ protected void init(JSplitPane editor) {
+ editor.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
+ .put(KeyStroke.getKeyStroke(KeyEvent.VK_F6, 0), "none");
+ }
+
protected void init(ObserveActionMap actionMap, AbstractButton editor) {
String actionId = (String) editor.getClientProperty(OBSERVE_ACTION);
if (actionId == null) {
=====================================
client/src/main/java/fr/ird/observe/client/ui/storage/presets/RemotePresetsUIHandler.java
=====================================
@@ -29,8 +29,8 @@ import fr.ird.observe.client.ui.util.UIHelper;
import fr.ird.observe.dto.decoration.DecoratorService;
import fr.ird.observe.dto.presets.RemoteDataSourceConfiguration;
import fr.ird.observe.dto.presets.ServerDataSourceConfiguration;
-import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.nuiton.decorator.Decorator;
import org.nuiton.jaxx.runtime.spi.UIHandler;
import org.nuiton.jaxx.runtime.swing.renderer.DecoratorListCellRenderer;
@@ -40,8 +40,11 @@ import javax.swing.ActionMap;
import javax.swing.DefaultListModel;
import javax.swing.InputMap;
import javax.swing.JComponent;
+import javax.swing.JSplitPane;
+import javax.swing.KeyStroke;
import javax.swing.SwingUtilities;
import java.awt.BorderLayout;
+import java.awt.event.KeyEvent;
import java.util.List;
import java.util.Objects;
@@ -79,6 +82,8 @@ public class RemotePresetsUIHandler implements UIHandler<RemotePresetsUI> {
if (o instanceof AbstractButton) {
init(inputMap, actionMap, (AbstractButton) o);
+ } else if (o instanceof JSplitPane) {
+ init((JSplitPane) o);
}
}
@@ -190,6 +195,11 @@ public class RemotePresetsUIHandler implements UIHandler<RemotePresetsUI> {
}
+ protected void init(JSplitPane editor) {
+ editor.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
+ .put(KeyStroke.getKeyStroke(KeyEvent.VK_F6, 0), "none");
+ }
+
protected void init(InputMap inputMap, ActionMap actionMap, AbstractButton editor) {
String actionId = (String) editor.getClientProperty(OBSERVE_ACTION);
if (actionId == null) {
=====================================
services-client/src/test/java/fr/ird/observe/services/client/service/actions/report/AbstractReportServiceClientTest.java
=====================================
@@ -6,15 +6,15 @@
* %%
* 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
+ * 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
+ *
+ * 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%
@@ -22,6 +22,7 @@
package fr.ird.observe.services.client.service.actions.report;
+import com.google.common.collect.ImmutableSet;
import fr.ird.observe.dto.reference.DtoReference;
import fr.ird.observe.services.client.service.ServiceClientTestSupport;
import fr.ird.observe.services.service.actions.report.DataMatrix;
@@ -43,7 +44,7 @@ import java.util.List;
/**
* Classe abstraite de test d'un report.
- *
+ * <p>
* On définit ici le mécanisme pour tester unitairement un report et son
* résultat.
*
@@ -54,15 +55,45 @@ public abstract class AbstractReportServiceClientTest extends ServiceClientTestS
/** Logger */
private static final Logger log = LogManager.getLogger(AbstractReportServiceClientTest.class);
-
- protected ReportService service;
-
/** La liste de tous les reports connus. */
protected static List<Report> reports;
-
+ protected ReportService service;
/** Le report à tester. */
private Report report;
+ protected static Report getReport(Logger log, String reportId) throws IOException {
+ if (reports == null) {
+
+ URL reportLocation =
+ AbstractReportServiceClientTest.class.getResource("/observe-reports.properties");
+
+ if (log.isInfoEnabled()) {
+ log.info("Loading reports from " + reportLocation);
+ }
+
+ ReportBuilder builder = new ReportBuilder();
+
+ reports = builder.load(reportLocation);
+
+ builder.clear();
+
+ Assert.assertNotNull(reports);
+ Assert.assertFalse(reports.isEmpty());
+ }
+
+ Report result = null;
+ // recuperation du report à tester
+ for (Report report : reports) {
+ if (reportId.equals(report.getId())) {
+ result = report;
+ break;
+ }
+ }
+
+ Assert.assertNotNull("Could not find report with id " + reportId, reports);
+ return result;
+ }
+
protected abstract String getReportId();
@Before
@@ -81,16 +112,14 @@ public abstract class AbstractReportServiceClientTest extends ServiceClientTestS
}
-
/**
* L'unique test à lancer.
- *
+ * <p>
* On vérifie :
* <ul>
* <li>la syntaxe du report via {@link #testReportSyntax(Report)}</li>
* <li>le résultat du report via {@link #testReportResult(DataMatrix)}</li>
* </ul>
- *
*/
@Test
public final void testReport() {
@@ -99,23 +128,25 @@ public abstract class AbstractReportServiceClientTest extends ServiceClientTestS
testReportSyntax(report);
// creation de l'executeur de report
- report = service.populateVariables(report, ObserveFixtures.TRIP_SEINE_ID_1);
+ ImmutableSet<String> tripIds = getTripIds();
+ report = service.populateVariables(report, tripIds);
// preparation des variables
prepareVariables();
// on execute le report
- DataMatrix result = service.executeReport(report,ObserveFixtures. TRIP_SEINE_ID_1);
-
- if (log.isInfoEnabled()) {
- log.info("Result :\n" + result.getClipboardContent(true, true, false, '\t'));
- }
+ DataMatrix result = service.executeReport(report, tripIds);
+ log.info("Result :\n" + result.getClipboardContent(true, true, false, '\t'));
// on verifie le resultat
testReportResult(result);
}
+ protected ImmutableSet<String> getTripIds() {
+ return ImmutableSet.of(ObserveFixtures.TRIP_SEINE_ID_1);
+ }
+
protected void prepareVariables() {
}
@@ -127,9 +158,9 @@ public abstract class AbstractReportServiceClientTest extends ServiceClientTestS
if (variableName.equals(variable.getName())) {
Object value = variable.getValues().stream()
- .filter(DtoReference.newIdPredicate(id))
- .findFirst()
- .orElse(null);
+ .filter(DtoReference.newIdPredicate(id))
+ .findFirst()
+ .orElse(null);
variable.setSelectedValue(value);
@@ -143,39 +174,6 @@ public abstract class AbstractReportServiceClientTest extends ServiceClientTestS
protected abstract void testReportResult(DataMatrix result);
- protected static Report getReport(Logger log, String reportId) throws IOException {
- if (reports == null) {
-
- URL reportLocation =
- AbstractReportServiceClientTest.class.getResource("/observe-reports.properties");
-
- if (log.isInfoEnabled()) {
- log.info("Loading reports from " + reportLocation);
- }
-
- ReportBuilder builder = new ReportBuilder();
-
- reports = builder.load(reportLocation);
-
- builder.clear();
-
- Assert.assertNotNull(reports);
- Assert.assertFalse(reports.isEmpty());
- }
-
- Report result = null;
- // recuperation du report à tester
- for (Report report : reports) {
- if (reportId.equals(report.getId())) {
- result = report;
- break;
- }
- }
-
- Assert.assertNotNull("Could not find report with id " + reportId, reports);
- return result;
- }
-
protected void assertReportName(Report report,
String name,
String description) {
=====================================
services-local/src/main/java/fr/ird/observe/services/local/service/actions/report/ReportServiceLocal.java
=====================================
@@ -10,18 +10,19 @@ package fr.ird.observe.services.local.service.actions.report;
* 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.common.collect.ImmutableSet;
import com.google.common.collect.Maps;
import fr.ird.observe.dto.data.DataDto;
import fr.ird.observe.dto.reference.DataDtoReferenceSet;
@@ -42,6 +43,10 @@ import fr.ird.observe.services.service.actions.report.ReportVariable;
import fr.ird.observe.spi.DbModelHelper;
import fr.ird.observe.spi.context.DataDtoEntityContext;
import fr.ird.observe.spi.context.ReferentialDtoEntityContext;
+import org.apache.commons.lang3.mutable.MutableInt;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
import java.awt.Dimension;
import java.awt.Point;
import java.io.Serializable;
@@ -53,9 +58,6 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
-import org.apache.commons.lang3.mutable.MutableInt;
-import org.apache.logging.log4j.Logger;
-import org.apache.logging.log4j.LogManager;
/**
* @author Tony Chemit - dev(a)tchemit.fr
@@ -66,11 +68,11 @@ public class ReportServiceLocal extends ObserveServiceLocal implements ReportSer
private static final Logger log = LogManager.getLogger(ReportServiceLocal.class);
@Override
- public Report populateVariables(Report report, String tripId) {
+ public Report populateVariables(Report report, ImmutableSet<String> tripIds) {
Map<String, Object> vars = new TreeMap<>();
- vars.put(ReportRequest.TRIP_ID_VARIABLE, tripId);
+ vars.put(ReportRequest.TRIP_ID_VARIABLE, tripIds);
for (ReportVariable variable : report.getVariables()) {
@@ -116,7 +118,7 @@ public class ReportServiceLocal extends ObserveServiceLocal implements ReportSer
}
@Override
- public DataMatrix executeReport(Report report, String tripId) {
+ public DataMatrix executeReport(Report report, ImmutableSet<String> tripId) {
if (report == null) {
@@ -171,7 +173,7 @@ public class ReportServiceLocal extends ObserveServiceLocal implements ReportSer
return result;
}
- private DataMatrix executeReportOperation(ReportOperation executeRequests, Report report, String tripId, DataMatrix incoming) {
+ private DataMatrix executeReportOperation(ReportOperation executeRequests, Report report, ImmutableSet<String> tripId, DataMatrix incoming) {
DataMatrix result = incoming;
@@ -413,7 +415,7 @@ public class ReportServiceLocal extends ObserveServiceLocal implements ReportSer
return result;
}
- private DataMatrix executeReportRequest(ReportRequest request, Report report, String tripId, ReportVariable repeatValues) {
+ private DataMatrix executeReportRequest(ReportRequest request, Report report, ImmutableSet<String> tripId, ReportVariable repeatValues) {
DataMatrix result = new DataMatrix();
@@ -457,7 +459,7 @@ public class ReportServiceLocal extends ObserveServiceLocal implements ReportSer
return result;
}
- private DataMatrix executeReportRequest(ReportRequest request, Report report, String tripId) {
+ private DataMatrix executeReportRequest(ReportRequest request, Report report, ImmutableSet<String> tripId) {
Map<String, Object> params = ReportRequest.extractParams(report, tripId);
return executeReportRequest(request, params);
@@ -650,10 +652,11 @@ public class ReportServiceLocal extends ObserveServiceLocal implements ReportSer
AbstractObserveTopiaDao dao = (AbstractObserveTopiaDao) getTopiaPersistenceContext().getDao(TripSeine.class);
+ log.info(String.format("Request: %s, params: %s", request, paramsFixes));
return dao.findAllFromHql(request, paramsFixes);
}
- private void doPopulateRepeatVariables(Report report, String tripId) {
+ private void doPopulateRepeatVariables(Report report, ImmutableSet<String> tripId) {
Map<String, Object> vars = ReportRequest.extractParams(report, tripId);
=====================================
services-local/src/test/java/fr/ird/observe/services/local/service/actions/report/AbstractReportServiceLocalTest.java
=====================================
@@ -6,15 +6,15 @@
* %%
* 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
+ * 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
+ *
+ * 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%
@@ -22,6 +22,7 @@
package fr.ird.observe.services.local.service.actions.report;
+import com.google.common.collect.ImmutableSet;
import fr.ird.observe.dto.reference.DtoReference;
import fr.ird.observe.services.local.service.ServiceLocalTestSupport;
import fr.ird.observe.services.service.actions.report.DataMatrix;
@@ -33,15 +34,16 @@ import fr.ird.observe.services.service.actions.report.ReportVariable;
import fr.ird.observe.test.DatabaseName;
import fr.ird.observe.test.ObserveFixtures;
import fr.ird.observe.test.spi.DatabaseNameConfiguration;
-import java.io.IOException;
-import java.net.URL;
-import java.util.List;
-import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
+import java.io.IOException;
+import java.net.URL;
+import java.util.List;
+
/**
* Classe abstraite de test d'un report.
* <p>
@@ -56,15 +58,45 @@ public abstract class AbstractReportServiceLocalTest extends ServiceLocalTestSup
/** Logger */
private static final Logger log = LogManager.getLogger(AbstractReportServiceLocalTest.class);
-
- protected ReportService service;
-
/** La liste de tous les reports connus. */
protected static List<Report> reports;
-
+ protected ReportService service;
/** Le report à tester. */
private Report report;
+ protected static Report getReport(Logger log, String reportId) throws IOException {
+ if (reports == null) {
+
+ URL reportLocation =
+ AbstractReportServiceLocalTest.class.getResource("/observe-reports.properties");
+
+ if (log.isInfoEnabled()) {
+ log.info("Loading reports from " + reportLocation);
+ }
+
+ ReportBuilder builder = new ReportBuilder();
+
+ reports = builder.load(reportLocation);
+
+ builder.clear();
+
+ Assert.assertNotNull(reports);
+ Assert.assertFalse(reports.isEmpty());
+ }
+
+ Report result = null;
+ // recuperation du report à tester
+ for (Report report : reports) {
+ if (reportId.equals(report.getId())) {
+ result = report;
+ break;
+ }
+ }
+
+ Assert.assertNotNull("Could not find report with id " + reportId, reports);
+ return result;
+ }
+
protected abstract String getReportId();
@Before
@@ -81,7 +113,6 @@ public abstract class AbstractReportServiceLocalTest extends ServiceLocalTestSup
}
-
/**
* L'unique test à lancer.
* <p>
@@ -90,7 +121,6 @@ public abstract class AbstractReportServiceLocalTest extends ServiceLocalTestSup
* <li>la syntaxe du report via {@link #testReportSyntax(Report)}</li>
* <li>le résultat du report via {@link #testReportResult(DataMatrix)}</li>
* </ul>
- *
*/
@Test
public final void testReport() {
@@ -98,24 +128,28 @@ public abstract class AbstractReportServiceLocalTest extends ServiceLocalTestSup
// test de la syntaxe du report
testReportSyntax(report);
+ ImmutableSet<String> tripIds = getTripIds();
+
// creation de l'executeur de report
- report = service.populateVariables(report, ObserveFixtures.TRIP_SEINE_ID_1);
+ report = service.populateVariables(report, tripIds);
// preparation des variables
prepareVariables();
// on execute le report
- DataMatrix result = service.executeReport(report, ObserveFixtures.TRIP_SEINE_ID_1);
+ DataMatrix result = service.executeReport(report, tripIds);
- if (log.isInfoEnabled()) {
- log.info("Result :\n" + result.getClipboardContent(true, true, true, ','));
- }
+ log.info(String.format("Result :\n%s", result.getClipboardContent(true, true, true, ',')));
// on verifie le resultat
testReportResult(result);
}
+ protected ImmutableSet<String> getTripIds() {
+ return ImmutableSet.of(ObserveFixtures.TRIP_SEINE_ID_1);
+ }
+
protected void prepareVariables() {
}
@@ -143,39 +177,6 @@ public abstract class AbstractReportServiceLocalTest extends ServiceLocalTestSup
protected abstract void testReportResult(DataMatrix result);
- protected static Report getReport(Logger log, String reportId) throws IOException {
- if (reports == null) {
-
- URL reportLocation =
- AbstractReportServiceLocalTest.class.getResource("/observe-reports.properties");
-
- if (log.isInfoEnabled()) {
- log.info("Loading reports from " + reportLocation);
- }
-
- ReportBuilder builder = new ReportBuilder();
-
- reports = builder.load(reportLocation);
-
- builder.clear();
-
- Assert.assertNotNull(reports);
- Assert.assertFalse(reports.isEmpty());
- }
-
- Report result = null;
- // recuperation du report à tester
- for (Report report : reports) {
- if (reportId.equals(report.getId())) {
- result = report;
- break;
- }
- }
-
- Assert.assertNotNull("Could not find report with id " + reportId, reports);
- return result;
- }
-
protected void assertReportName(Report report,
String name,
String description) {
@@ -228,12 +229,12 @@ public abstract class AbstractReportServiceLocalTest extends ServiceLocalTestSup
protected void assertResultRow(DataMatrix result, int rowId, Object... row) {
Object[] actualRow = result.getData()[rowId];
- int index=0;
+ int index = 0;
for (Object o : actualRow) {
- if (o==null) {
+ if (o == null) {
Assert.assertEquals(row[index++], o);
- }else {
- Assert.assertArrayEquals(row[index++].toString().split("\\s*\\n\\s*"),o.toString().split("\\s*\\n\\s*"));
+ } else {
+ Assert.assertArrayEquals(row[index++].toString().split("\\s*\\n\\s*"), o.toString().split("\\s*\\n\\s*"));
}
}
//Assert.assertArrayEquals(row, actualRow);
=====================================
services-local/src/test/java/fr/ird/observe/services/local/service/actions/report/ReportNonTargetDistributionLengthsTest.java
=====================================
@@ -0,0 +1,89 @@
+/*
+ * #%L
+ * ObServe :: Services local implementation
+ * %%
+ * Copyright (C) 2008 - 2018 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%
+ */
+package fr.ird.observe.services.local.service.actions.report;
+
+
+import com.google.common.collect.ImmutableSet;
+import fr.ird.observe.services.service.actions.report.DataMatrix;
+import fr.ird.observe.services.service.actions.report.Report;
+import fr.ird.observe.services.service.actions.report.ReportRequest;
+import fr.ird.observe.test.ObserveFixtures;
+import org.junit.Assert;
+
+/**
+ * Test du report {@code accessoryCatch}.
+ *
+ * @author Tony Chemit - dev(a)tchemit.fr
+ * @since 1.9
+ */
+public class ReportNonTargetDistributionLengthsTest extends AbstractReportServiceLocalTest {
+
+ @Override
+ protected void testReportSyntax(Report report) {
+ Assert.assertNotNull(report);
+ assertReportName(
+ report,
+ "Distribution des tailles par espèces non ciblées",
+ "Afficher la nombre d'individus mesurés par classe de taille pour les espèces non ciblées"
+ );
+
+ assertReportDimension(
+ report,
+ -1,
+ 2,
+ new String[]{"Classe de taille", "Effectif"}
+ );
+
+ assertReportNbRequests(report, 1);
+
+ ReportRequest[] requests = report.getRequests();
+
+ assertReportRequestDimension(
+ requests[0],
+ ReportRequest.RequestLayout.row,
+ 0,
+ 0
+ );
+
+ }
+
+ @Override
+ protected String getReportId() {
+ return "nonTargetDistributionLengths";
+ }
+
+ @Override
+ protected ImmutableSet<String> getTripIds() {
+ return ImmutableSet.of(ObserveFixtures.TRIP_SEINE_ID_1, ObserveFixtures.TRIP_SEINE_ID_2);
+ }
+
+ @Override
+ protected void prepareVariables() {
+ setVariableValue("speciesId", "fr.ird.observe.entities.referentiel.Species#1239832684439#0.9130769003657221");
+ }
+
+ @Override
+ protected void testReportResult(DataMatrix result) {
+ assertResultDimension(result, 2, 1, 0, 1);
+ assertResultRow(result, 0, "14.0", "1");
+ }
+}
=====================================
services/pom.xml
=====================================
@@ -93,6 +93,10 @@
<groupId>io.ultreia.java4all.jaxx</groupId>
<artifactId>jaxx-widgets-gis</artifactId>
</dependency>
+ <dependency>
+ <groupId>io.ultreia.java4all</groupId>
+ <artifactId>java-lang</artifactId>
+ </dependency>
<!-- XWork -->
<dependency>
=====================================
services/src/main/java/fr/ird/observe/services/gson/ReportVariableAdapter.java
=====================================
@@ -29,10 +29,9 @@ import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
import fr.ird.observe.dto.data.DataDto;
-import fr.ird.observe.dto.reference.DataDtoReference;
-import fr.ird.observe.dto.reference.ReferentialDtoReference;
import fr.ird.observe.dto.referential.ReferentialDto;
import fr.ird.observe.services.service.actions.report.ReportVariable;
+import fr.ird.observe.spi.DtoModelHelper;
import java.lang.reflect.Type;
import java.util.Set;
@@ -55,10 +54,10 @@ public class ReportVariableAdapter implements JsonDeserializer<ReportVariable> {
Class valueType = type;
if (DataDto.class.isAssignableFrom(type)) {
- valueType = DataDtoReference.class;
+ valueType = DtoModelHelper.fromDataDto((Class) type).toReferenceType();
}
if (ReferentialDto.class.isAssignableFrom(type)) {
- valueType = ReferentialDtoReference.class;
+ valueType = DtoModelHelper.fromReferentialDto((Class) type).toReferenceType();
}
JsonElement valuesJson = reportVariableJson.get(ReportVariable.PROPERTY_VALUES);
=====================================
services/src/main/java/fr/ird/observe/services/service/actions/report/ReportBuilder.java
=====================================
@@ -6,15 +6,15 @@
* %%
* 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
+ * 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
+ *
+ * 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%
@@ -23,6 +23,7 @@ package fr.ird.observe.services.service.actions.report;
import fr.ird.observe.dto.ObserveModelType;
+import io.ultreia.java4all.lang.Objects2;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.nuiton.util.SortedProperties;
@@ -62,16 +63,13 @@ public class ReportBuilder {
/** Logger */
private static final Logger log = LogManager.getLogger(ReportBuilder.class);
-
+ /** les operations connues par le système */
+ protected static Map<String, Class<?>> operations;
/** les propriétés chargées par le builder pour construire les reports */
protected Properties properties;
-
/** la liste des lastName sde reports connus par le système */
protected List<String> reportNames;
- /** les operations connues par le système */
- protected static Map<String, Class<?>> operations;
-
public List<String> getReportNames() {
return reportNames;
}
@@ -331,7 +329,7 @@ public class ReportBuilder {
// on interdit l'utilisation de la variable tripId
if (ReportRequest.TRIP_ID_VARIABLE.equals(id)) {
- throw new IllegalArgumentException("La variable tripId n'est pas utilisable (c'est uen variable réservée) pour le report " + reportName);
+ throw new IllegalArgumentException("La variable tripId n'est pas utilisable (c'est une variable réservée) pour le report " + reportName);
}
ids.add(id);
String[] parts = operations.split("\\|");
@@ -341,13 +339,8 @@ public class ReportBuilder {
}
String typeStr = parts[0].trim();
String request = parts[1].trim();
- Class<?> type;
- try {
- type = Class.forName(typeStr);
- } catch (ClassNotFoundException eee) {
- throw new IllegalArgumentException("Le type " + typeStr + " n'est pas connu", eee);
- }
- ReportVariable variable = new ReportVariable(id, type, request);
+ Class<?> type = Objects2.forName(typeStr);
+ ReportVariable<?> variable = new ReportVariable<>(id, type, request);
log.debug(String.format("Detects a variable : [%s:%s] = %s (type = %s)", reportName, variable.getName(), variable.getRequest(), variable.getType().getName()));
result.add(variable);
itr.remove();
@@ -386,12 +379,7 @@ public class ReportBuilder {
}
String typeStr = parts[0].trim();
String request = parts[1].trim();
- Class<?> type = null;
- try {
- type = Class.forName(typeStr);
- } catch (ClassNotFoundException eee) {
- throw new IllegalArgumentException("Le type " + typeStr + " n'est pas connu", eee);
- }
+ Class<?> type = Objects2.forName(typeStr);
ReportVariable<?> variable = new ReportVariable<>(id, type, request);
log.debug(String.format("Detects a variable : [%s:%s] = %s (type = %s)", reportName, variable.getName(), variable.getRequest(), variable.getType().getName()));
result.add(variable);
=====================================
services/src/main/java/fr/ird/observe/services/service/actions/report/ReportRequest.java
=====================================
@@ -6,26 +6,27 @@
* %%
* 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
+ * 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
+ *
+ * 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%
*/
package fr.ird.observe.services.service.actions.report;
+import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Maps;
import fr.ird.observe.dto.ObserveDto;
import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import java.awt.Point;
import java.io.Serializable;
@@ -41,61 +42,16 @@ import java.util.Map;
*/
public class ReportRequest implements Serializable, ObserveDto {
+ public static final String TRIP_ID_VARIABLE = "tripId";
private static final long serialVersionUID = 1L;
-
/** Logger. */
private static final Logger log = LogManager.getLogger(ReportRequest.class);
-
- public static final String TRIP_ID_VARIABLE = "tripId";
-
- /** le layout de la requete. */
- public enum RequestLayout {
- /** lorsque les résultats de la requète sont les lignes du résultat. */
- row,
- /** lorsque les résultats de la requète sont les colonnes du résultat. */
- column
- }
-
- /** Un repeater optionnel sur la requête. */
- public static class RequestRepeat implements Serializable, ObserveDto {
-
- protected final String variableName;
-
- protected final RequestLayout layout;
-
- private static final long serialVersionUID = 1L;
-
- public RequestRepeat(String variableName, RequestLayout layout) {
- this.variableName = variableName;
- this.layout = layout;
- }
-
- public String getVariableName() {
- return variableName;
- }
-
- public RequestLayout getLayout() {
- return layout;
- }
-
- @Override
- public String toString() {
- ToStringBuilder builder = new ToStringBuilder(this);
- builder.append("variableName", getVariableName());
- builder.append("layout", getLayout());
- return builder.toString();
- }
- }
-
/** layout de la requète. */
protected final RequestLayout layout;
-
/** la requète à exécuter. */
protected final String request;
-
/** la position de la requète. */
protected final Point location;
-
/** le repeater optionel. */
protected final RequestRepeat repeat;
@@ -110,31 +66,7 @@ public class ReportRequest implements Serializable, ObserveDto {
location = new Point(x, y);
}
- public RequestLayout getLayout() {
- return layout;
- }
-
- public int getX() {
- return (int) location.getX();
- }
-
- public int getY() {
- return (int) location.getY();
- }
-
- public Point getLocation() {
- return location;
- }
-
- public String getRequest() {
- return request;
- }
-
- public RequestRepeat getRepeat() {
- return repeat;
- }
-
- public static Map<String, Object> extractParams(Report report, String tripId) {
+ public static Map<String, Object> extractParams(Report report, ImmutableSet<String> tripId) {
Map<String, Object> params = Maps.newHashMap();
@@ -175,6 +107,30 @@ public class ReportRequest implements Serializable, ObserveDto {
return datas;
}
+ public RequestLayout getLayout() {
+ return layout;
+ }
+
+ public int getX() {
+ return (int) location.getX();
+ }
+
+ public int getY() {
+ return (int) location.getY();
+ }
+
+ public Point getLocation() {
+ return location;
+ }
+
+ public String getRequest() {
+ return request;
+ }
+
+ public RequestRepeat getRepeat() {
+ return repeat;
+ }
+
@Override
public String toString() {
ToStringBuilder builder = new ToStringBuilder(this);
@@ -184,4 +140,41 @@ public class ReportRequest implements Serializable, ObserveDto {
builder.append("repeatVariable", getRepeat());
return builder.toString();
}
+
+ /** le layout de la requete. */
+ public enum RequestLayout {
+ /** lorsque les résultats de la requète sont les lignes du résultat. */
+ row,
+ /** lorsque les résultats de la requète sont les colonnes du résultat. */
+ column
+ }
+
+ /** Un repeater optionnel sur la requête. */
+ public static class RequestRepeat implements Serializable, ObserveDto {
+
+ private static final long serialVersionUID = 1L;
+ protected final String variableName;
+ protected final RequestLayout layout;
+
+ public RequestRepeat(String variableName, RequestLayout layout) {
+ this.variableName = variableName;
+ this.layout = layout;
+ }
+
+ public String getVariableName() {
+ return variableName;
+ }
+
+ public RequestLayout getLayout() {
+ return layout;
+ }
+
+ @Override
+ public String toString() {
+ ToStringBuilder builder = new ToStringBuilder(this);
+ builder.append("variableName", getVariableName());
+ builder.append("layout", getLayout());
+ return builder.toString();
+ }
+ }
}
=====================================
services/src/main/java/fr/ird/observe/services/service/actions/report/ReportService.java
=====================================
@@ -22,6 +22,7 @@ package fr.ird.observe.services.service.actions.report;
* #L%
*/
+import com.google.common.collect.ImmutableSet;
import fr.ird.observe.services.service.ObserveService;
import fr.ird.observe.services.spi.ReadDataPermission;
import fr.ird.observe.services.spi.ReadReferentialPermission;
@@ -35,10 +36,10 @@ public interface ReportService extends ObserveService {
@ReadDataPermission
@ReadReferentialPermission
@Post
- Report populateVariables(Report report, String tripId);
+ Report populateVariables(Report report, ImmutableSet<String> tripId);
@ReadDataPermission
@ReadReferentialPermission
@Post
- DataMatrix executeReport(Report report, String tripId);
+ DataMatrix executeReport(Report report, ImmutableSet<String> tripId);
}
=====================================
services/src/main/resources/observe-reports.properties
=====================================
@@ -19,7 +19,6 @@
# <http://www.gnu.org/licenses/gpl-3.0.html>.
# #L%
###
-
################################################################################
## Liste des \u00e9quipements (Seine)
################################################################################
@@ -33,10 +32,9 @@ report.tripSeineGearUseFeatures.repeatVariable.gearUseFeaturesId=java.lang.Strin
From TripSeineImpl m \
Join m.gearUseFeaturesSeine g \
Where \
- m.id = :tripId \
+ m.id In :tripId \
and g in elements (m.gearUseFeaturesSeine) \
Order By g.gear.label2
-
report.tripSeineGearUseFeatures.request.1=0,0|row|\
Select \
concat(CASE When g.gear.code IS NULL Then 'Aucun code' Else g.gear.code End, ' - ', g.gear.label2), \
@@ -44,9 +42,7 @@ report.tripSeineGearUseFeatures.request.1=0,0|row|\
( CASE g.usedInTrip When true Then 'Oui' Else Case g.usedInTrip When false Then 'Non' Else 'Ind\u00e9termin\u00e9' End End )\
From GearUseFeaturesSeineImpl g \
Where g.id = :gearUseFeaturesId
-
report.tripSeineGearUseFeatures.request.1.repeat=gearUseFeaturesId|column
-
################################################################################
## Liste des \u00e9quipements (Longline)
################################################################################
@@ -60,10 +56,9 @@ report.tripLonglineGearUseFeatures.repeatVariable.gearUseFeaturesId=java.lang.St
From TripLonglineImpl m \
Join m.gearUseFeaturesLongline g \
Where \
- m.id = :tripId \
+ m.id In :tripId \
and g in elements (m.gearUseFeaturesLongline) \
Order By g.gear.label2
-
report.tripLonglineGearUseFeatures.request.1=0,0|row|\
Select \
concat(CASE When g.gear.code IS NULL Then 'Aucun code' Else g.gear.code End, ' - ', g.gear.label2), \
@@ -71,9 +66,7 @@ report.tripLonglineGearUseFeatures.request.1=0,0|row|\
( CASE g.usedInTrip When true Then 'Oui' Else Case g.usedInTrip When false Then 'Non' Else 'Ind\u00e9termin\u00e9' End End )\
From GearUseFeaturesLonglineImpl g \
Where g.id = :gearUseFeaturesId
-
report.tripLonglineGearUseFeatures.request.1.repeat=gearUseFeaturesId|column
-
################################################################################
## Liste des activit\u00e9s avec des comments
################################################################################
@@ -88,10 +81,9 @@ report.activityWithComment.request.1=0,0|row|\
Join r.activitySeine a \
Join a.vesselActivitySeine ab \
Where \
- m.id = :tripId \
+ m.id In :tripId \
and a.comment is not null \
Order By r.date, a.time
-
################################################################################
## Liste de toutes les activit\u00e9s et leurs positions
################################################################################
@@ -106,9 +98,8 @@ report.allActivitys.request.1=0,0|row|\
Join r.activitySeine a \
Join a.vesselActivitySeine ab \
Where \
- m.id = :tripId \
+ m.id In :tripId \
Order By r.date, a.time
-
################################################################################
## Nombre de cal\u00e9es et captures journali\u00e8res d'une mar\u00e9e
################################################################################
@@ -124,10 +115,9 @@ report.dailySetAndCatch.request.1=0,0|row|\
Join a.setSeine s \
left join s.targetCatch as ct \
Where \
- m.id = :tripId \
+ m.id In :tripId \
Group By r.date \
Order By r.date
-
################################################################################
## Utilisation des DCP
################################################################################
@@ -143,16 +133,14 @@ report.dcpUsage.repeatVariable.typeObjetId=java.lang.String|\
Join a.floatingObject dcp \
Join dcp.objectType to \
Where \
- m.id = :tripId \
+ m.id In :tripId \
Order by to.code
-
report.dcpUsage.request.1=0,0|row|\
Select concat(str(to.code) , ' - ', to.label2) \
From ObjectTypeImpl to \
Where \
to.id = :typeObjetId
report.dcpUsage.request.1.repeat=typeObjetId|column
-
report.dcpUsage.request.2=1,0|row|\
Select Count(dcp) \
From TripSeineImpl m \
@@ -160,11 +148,10 @@ report.dcpUsage.request.2=1,0|row|\
Join r.activitySeine a \
Join a.floatingObject dcp \
Where \
- m.id = :tripId \
+ m.id In :tripId \
and dcp.objectType.id = :typeObjetId \
and dcp.objectOperation.id = 'fr.ird.observe.entities.referentiel.seine.ObjectOperation#1239832686249#0.8268884472438458'
report.dcpUsage.request.2.repeat=typeObjetId|column
-
report.dcpUsage.request.3=2,0|row|\
Select Count(dcp) \
From TripSeineImpl m \
@@ -172,11 +159,10 @@ report.dcpUsage.request.3=2,0|row|\
Join r.activitySeine a \
Join a.floatingObject dcp \
Where \
- m.id = :tripId \
+ m.id In :tripId \
and dcp.objectType.id = :typeObjetId \
and dcp.objectOperation.id = 'fr.ird.observe.entities.referentiel.seine.ObjectOperation#1239832686249#0.8431519556575698'
report.dcpUsage.request.3.repeat=typeObjetId|column
-
report.dcpUsage.request.4=3,0|row|\
Select Count(dcp) \
From TripSeineImpl m \
@@ -184,11 +170,10 @@ report.dcpUsage.request.4=3,0|row|\
Join r.activitySeine a \
Join a.floatingObject dcp \
Where \
- m.id = :tripId \
+ m.id In :tripId \
and dcp.objectType.id = :typeObjetId \
and dcp.objectOperation.id = 'fr.ird.observe.entities.referentiel.seine.ObjectOperation#1239832686248#0.8669327599318251'
report.dcpUsage.request.4.repeat=typeObjetId|column
-
report.dcpUsage.request.5=4,0|row|\
Select Count(dcp) \
From TripSeineImpl m \
@@ -196,12 +181,11 @@ report.dcpUsage.request.5=4,0|row|\
Join r.activitySeine a \
Join a.floatingObject dcp \
Where \
- m.id = :tripId \
+ m.id In :tripId \
and dcp.objectType.id = :typeObjetId \
and dcp.objectFate.id = 'fr.ird.observe.entities.referentiel.seine.ObjectFate#1396860761530#0.8869464242156488' \
and dcp.objectOperation.id != 'fr.ird.observe.entities.referentiel.seine.ObjectOperation#1239832686248#0.8669327599318251'
report.dcpUsage.request.5.repeat=typeObjetId|column
-
report.dcpUsage.request.6=5,0|row|\
Select Count(dcp) \
From TripSeineImpl m \
@@ -209,11 +193,10 @@ report.dcpUsage.request.6=5,0|row|\
Join r.activitySeine a \
Join a.floatingObject dcp \
Where \
- m.id = :tripId \
+ m.id In :tripId \
and dcp.objectType.id = :typeObjetId \
and dcp.objectOperation.id = 'fr.ird.observe.entities.referentiel.seine.ObjectOperation#1239832686249#0.7838704130950722'
report.dcpUsage.request.6.repeat=typeObjetId|column
-
report.dcpUsage.request.7=6,0|row| \
Select Sum(efo.count) \
From TripSeineImpl m \
@@ -222,11 +205,10 @@ report.dcpUsage.request.7=6,0|row| \
Join a.floatingObject dcp \
Join dcp.objectObservedSpecies efo \
Where \
- m.id = :tripId \
+ m.id In :tripId \
and dcp.objectType.id = :typeObjetId \
and efo.species.speciesGroup.id = 'fr.ird.observe.entities.referentiel.SpeciesGroup#1239832683690#0.24333033683679461'
report.dcpUsage.request.7.repeat=typeObjetId|column
-
################################################################################
## Nombre des cal\u00e9es selon le type d'association
################################################################################
@@ -244,12 +226,11 @@ report.setByAssociation.request.1=0,0|column|\
Join r.activitySeine a, \
ObservedSystemImpl os \
Where \
- m.id = :tripId \
+ m.id In :tripId \
and a.setSeine.schoolType = 2 \
and a.setSeine.reasonForNullSet is null \
and os.topiaId = 'fr.ird.observe.entities.referentiel.seine.ObservedSystem#1239832686428#0.9395222812356602' \
and os not in elements(a.observedSystem)
-
report.setByAssociation.request.2=0,1|column|\
Select Count(a) \
From TripSeineImpl m \
@@ -257,12 +238,11 @@ report.setByAssociation.request.2=0,1|column|\
Join r.activitySeine a, \
ObservedSystemImpl os \
Where \
- m.id = :tripId \
+ m.id In :tripId \
and a.setSeine.schoolType = 2 \
and a.setSeine.reasonForNullSet is not null \
and os.topiaId = 'fr.ird.observe.entities.referentiel.seine.ObservedSystem#1239832686428#0.9395222812356602' \
and os not in elements(a.observedSystem)
-
report.setByAssociation.request.3=1,0|column|\
Select Count(a) \
From TripSeineImpl m \
@@ -270,12 +250,11 @@ report.setByAssociation.request.3=1,0|column|\
Join r.activitySeine a, \
ObservedSystemImpl os \
Where \
- m.id = :tripId \
+ m.id In :tripId \
and a.setSeine.schoolType = 2 \
and a.setSeine.reasonForNullSet is null \
and os.topiaId = 'fr.ird.observe.entities.referentiel.seine.ObservedSystem#1239832686428#0.9395222812356602' \
and os in elements(a.observedSystem)
-
report.setByAssociation.request.4=1,1|column|\
Select Count(a) \
From TripSeineImpl m \
@@ -283,12 +262,11 @@ report.setByAssociation.request.4=1,1|column|\
Join r.activitySeine a, \
ObservedSystemImpl os \
Where \
- m.id = :tripId \
+ m.id In :tripId \
and a.setSeine.schoolType = 2 \
and a.setSeine.reasonForNullSet is not null \
and os.topiaId = 'fr.ird.observe.entities.referentiel.seine.ObservedSystem#1239832686428#0.9395222812356602' \
and os in elements(a.observedSystem)
-
report.setByAssociation.request.5=2,0|column|\
Select Count(a) \
From TripSeineImpl m \
@@ -296,12 +274,11 @@ report.setByAssociation.request.5=2,0|column|\
Join r.activitySeine a, \
ObservedSystemImpl os \
Where \
- m.id = :tripId \
+ m.id In :tripId \
and a.setSeine.schoolType = 1 \
and a.setSeine.reasonForNullSet is null \
and os.topiaId = 'fr.ird.observe.entities.referentiel.seine.ObservedSystem#1239832686428#0.9217864901728908' \
and os in elements(a.observedSystem)
-
report.setByAssociation.request.6=2,1|column|\
Select Count(a) \
From TripSeineImpl m \
@@ -309,12 +286,11 @@ report.setByAssociation.request.6=2,1|column|\
Join r.activitySeine a, \
ObservedSystemImpl os \
Where \
- m.id = :tripId \
+ m.id In :tripId \
and a.setSeine.schoolType = 1 \
and a.setSeine.reasonForNullSet is not null \
and os.topiaId = 'fr.ird.observe.entities.referentiel.seine.ObservedSystem#1239832686428#0.9217864901728908' \
and os in elements(a.observedSystem)
-
report.setByAssociation.request.7=3,0|column|\
Select Count(a) \
From TripSeineImpl m \
@@ -322,12 +298,11 @@ report.setByAssociation.request.7=3,0|column|\
Join r.activitySeine a, \
ObservedSystemImpl os \
Where \
- m.id = :tripId \
+ m.id In :tripId \
and a.setSeine.schoolType = 1 \
and a.setSeine.reasonForNullSet is null \
and os.topiaId = 'fr.ird.observe.entities.referentiel.seine.ObservedSystem#1239832686428#0.9217864901728908' \
and os not in elements(a.observedSystem)
-
report.setByAssociation.request.8=3,1|column|\
Select Count(a) \
From TripSeineImpl m \
@@ -335,12 +310,11 @@ report.setByAssociation.request.8=3,1|column|\
Join r.activitySeine a, \
ObservedSystemImpl os \
Where \
- m.id = :tripId \
+ m.id In :tripId \
and a.setSeine.schoolType = 1 \
and a.setSeine.reasonForNullSet is not null \
and os.topiaId = 'fr.ird.observe.entities.referentiel.seine.ObservedSystem#1239832686428#0.9217864901728908' \
and os not in elements(a.observedSystem)
-
################################################################################
## Captures thon par type d'association
################################################################################
@@ -351,7 +325,6 @@ report.targetCatchByAssociation.columns=YFT, SKJ, BET, LTA, FRI, Autres, Total
report.targetCatchByAssociation.rows=BL sans baleine, BL avec baleine, BO avec requin-baleine, BO sans requin-baleine, Total
report.targetCatchByAssociation.operations.1=SumRow
report.targetCatchByAssociation.operations.2=SumColumn
-
# ligne 1
report.targetCatchByAssociation.request.1=0,0|row|\
Select \
@@ -380,10 +353,9 @@ report.targetCatchByAssociation.request.1=0,0|row|\
with ct.discarded = false, \
ObservedSystemImpl os \
Where \
- m.id = :tripId \
+ m.id In :tripId \
and os.topiaId = 'fr.ird.observe.entities.referentiel.seine.ObservedSystem#1239832686428#0.9395222812356602' \
and os not in elements(a.observedSystem)
-
# ligne 2
report.targetCatchByAssociation.request.7=0,1|row|\
Select \
@@ -412,10 +384,9 @@ report.targetCatchByAssociation.request.7=0,1|row|\
with ct.discarded = false, \
ObservedSystemImpl os \
Where \
- m.id = :tripId \
+ m.id In :tripId \
and os.topiaId = 'fr.ird.observe.entities.referentiel.seine.ObservedSystem#1239832686428#0.9395222812356602' \
and os in elements(a.observedSystem)
-
# ligne 3
report.targetCatchByAssociation.request.13=0,2|row|\
Select \
@@ -444,10 +415,9 @@ report.targetCatchByAssociation.request.13=0,2|row|\
with ct.discarded = false, \
ObservedSystemImpl os \
Where \
- m.id = :tripId \
+ m.id In :tripId \
and os.topiaId = 'fr.ird.observe.entities.referentiel.seine.ObservedSystem#1239832686428#0.9217864901728908' \
and os in elements(a.observedSystem)
-
# ligne 4
report.targetCatchByAssociation.request.19=0,3|row|\
Select \
@@ -476,10 +446,9 @@ report.targetCatchByAssociation.request.19=0,3|row|\
with ct.discarded = false, \
ObservedSystemImpl os \
Where \
- m.id = :tripId \
+ m.id In :tripId \
and os.topiaId = 'fr.ird.observe.entities.referentiel.seine.ObservedSystem#1239832686428#0.9217864901728908' \
and os not in elements(a.observedSystem)
-
################################################################################
## Rejets thons selon le type d'association
################################################################################
@@ -490,7 +459,6 @@ report.targetDiscardedByAssociation.columns=YFT, SKJ, BET, LTA, FRI, Autres, Tot
report.targetDiscardedByAssociation.rows=BL sans baleine, BL avec baleine, BO avec requin-baleine, BO sans requin-baleine, Total
report.targetDiscardedByAssociation.operations.1=SumRow
report.targetDiscardedByAssociation.operations.2=SumColumn
-
# ligne 1
report.targetDiscardedByAssociation.request.1=0,0|row|\
Select \
@@ -519,10 +487,9 @@ report.targetDiscardedByAssociation.request.1=0,0|row|\
with ct.discarded = true, \
ObservedSystemImpl os \
Where \
- m.id = :tripId \
+ m.id In :tripId \
and os.topiaId = 'fr.ird.observe.entities.referentiel.seine.ObservedSystem#1239832686428#0.9395222812356602' \
and os not in elements(a.observedSystem)
-
# ligne 2
report.targetDiscardedByAssociation.request.7=0,1|row|\
Select \
@@ -551,10 +518,9 @@ report.targetDiscardedByAssociation.request.7=0,1|row|\
with ct.discarded = true, \
ObservedSystemImpl os \
Where \
- m.id = :tripId \
+ m.id In :tripId \
and os.topiaId = 'fr.ird.observe.entities.referentiel.seine.ObservedSystem#1239832686428#0.9395222812356602' \
and os in elements(a.observedSystem)
-
# ligne 3
report.targetDiscardedByAssociation.request.13=0,2|row|\
Select \
@@ -583,10 +549,9 @@ report.targetDiscardedByAssociation.request.13=0,2|row|\
with ct.discarded = true, \
ObservedSystemImpl os \
Where \
- m.id = :tripId \
+ m.id In :tripId \
and os.topiaId = 'fr.ird.observe.entities.referentiel.seine.ObservedSystem#1239832686428#0.9217864901728908' \
and os in elements(a.observedSystem)
-
# ligne 4
report.targetDiscardedByAssociation.request.19=0,3|row|\
Select \
@@ -615,10 +580,9 @@ report.targetDiscardedByAssociation.request.19=0,3|row|\
with ct.discarded = true, \
ObservedSystemImpl os \
Where \
- m.id = :tripId \
+ m.id In :tripId \
and os.topiaId = 'fr.ird.observe.entities.referentiel.seine.ObservedSystem#1239832686428#0.9217864901728908' \
and os not in elements(a.observedSystem)
-
################################################################################
## Captures accessoires observ\u00e9es
################################################################################
@@ -631,7 +595,6 @@ report.accessoryCatch.repeatVariable.speciesId=java.lang.String|\
Select e.id From SpeciesImpl e \
Where e.speciesGroup.id = :speciesGroup \
Order By e.homeId
-
report.accessoryCatch.request.1=0,0|row|\
Select \
concat('[FAO]', (case when e.faoCode is not null then e.faoCode else '-' end), \
@@ -640,7 +603,6 @@ report.accessoryCatch.request.1=0,0|row|\
From SpeciesImpl e \
Where e.id = :speciesId
report.accessoryCatch.request.1.repeat=speciesId|column
-
report.accessoryCatch.request.2=1,0|row|\
Select \
case when Count(ca) > 0 then \
@@ -655,9 +617,8 @@ report.accessoryCatch.request.2=1,0|row|\
with c.schoolType = 2 \
Join c.nonTargetCatch ca \
with ca.species.id = :speciesId \
- Where m.id = :tripId
+ Where m.id In :tripId
report.accessoryCatch.request.2.repeat=speciesId|column
-
report.accessoryCatch.request.3=2,0|row|\
Select \
case when Count(ca) > 0 then \
@@ -672,9 +633,8 @@ report.accessoryCatch.request.3=2,0|row|\
with c.schoolType = 1 \
Join c.nonTargetCatch ca \
with ca.species.id = :speciesId \
- Where m.id = :tripId
+ Where m.id In :tripId
report.accessoryCatch.request.3.repeat=speciesId|column
-
################################################################################
## Captures accessoires par speciesGroup d'esp\u00e8ces
################################################################################
@@ -683,7 +643,6 @@ report.accessoryCatchByGroup.name=D\u00e9nombrement des captures accessoires et
report.accessoryCatchByGroup.description=Afficher les nombres de captures accessoires par groupe d'esp\u00e8ce selon le type de banc et le devenir
report.accessoryCatchByGroup.columns=Esp\u00e8ce, Total BL, Total BO, Sorti vivant/\u00e9chapp\u00e9, Sorti mort, Rejet\u00e9 vivant, Rejet\u00e9 mort, Partiellement conserv\u00e9, Cuve, Cuisine, Autre
report.accessoryCatchByGroup.variable.speciesGroup=fr.ird.observe.dto.referential.SpeciesGroupDto|From SpeciesGroupImpl ge Order By ge.code
-
report.accessoryCatchByGroup.request.1=0,0|row|\
Select \
concat(\
@@ -723,10 +682,9 @@ report.accessoryCatchByGroup.request.1=0,0|row|\
Join c.nonTargetCatch ca \
Join ca.species e \
with e.speciesGroup.id = :speciesGroup \
- Where m.id = :tripId \
+ Where m.id In :tripId \
Group by e \
Order By e.homeId
-
###########################################################
## Distribution des tailles par espèces non ciblées
###########################################################
@@ -742,7 +700,7 @@ Join t.route r \
Join r.activitySeine a \
Join a.setSeine.nonTargetSample nts \
Join nts.nonTargetLength ntl \
-Where t.id = :tripId
+Where t.id In :tripId
report.nonTargetDistributionLengths.request.1=0,0|row| \
Select ntl.length, sum(ntl.count) \
From TripSeineImpl t \
@@ -750,11 +708,10 @@ Join t.route r \
Join r.activitySeine a \
Join a.setSeine.nonTargetSample nts \
Join nts.nonTargetLength ntl \
-Where t.id = :tripId \
+Where t.id In :tripId \
And ntl.species.id = :speciesId \
Group By ntl.length \
Order By ntl.length
-
####################################################################
## Distribution des tailles des conservés par espèces ciblées (LD1)
####################################################################
@@ -770,7 +727,7 @@ Join t.route r \
Join r.activitySeine a \
Join a.setSeine.targetSample ts \
Join ts.targetLength tl \
-Where t.id = :tripId \
+Where t.id In :tripId \
And tl.sizeMeasureType = 1 \
And ts.discarded = false
report.targetStoredDistributionLengthsLD1.request.1=0,0|row| \
@@ -780,13 +737,12 @@ Join t.route r \
Join r.activitySeine a \
Join a.setSeine.targetSample ts \
Join ts.targetLength tl \
-Where t.id = :tripId \
+Where t.id In :tripId \
And tl.species.id = :speciesId \
And tl.sizeMeasureType = 1 \
And ts.discarded = false \
Group By tl.length \
Order By tl.length
-
################################################################
## Distribution des tailles des rejets par espèces ciblées (LD1)
################################################################
@@ -802,7 +758,7 @@ Join t.route r \
Join r.activitySeine a \
Join a.setSeine.targetSample ts \
Join ts.targetLength tl \
-Where t.id = :tripId \
+Where t.id In :tripId \
And tl.sizeMeasureType = 1 \
And ts.discarded = true
report.targetDiscardedDistributionLengthsLD1.request.1=0,0|row| \
@@ -812,13 +768,12 @@ Join t.route r \
Join r.activitySeine a \
Join a.setSeine.targetSample ts \
Join ts.targetLength tl \
-Where t.id = :tripId \
+Where t.id In :tripId \
And tl.species.id = :speciesId \
And tl.sizeMeasureType = 1\
And ts.discarded = true \
Group By tl.length \
Order By tl.length
-
###############################################################
## Distribution des tailles des conservés par espèces ciblées (LF)
###############################################################
@@ -834,7 +789,7 @@ Join t.route r \
Join r.activitySeine a \
Join a.setSeine.targetSample ts \
Join ts.targetLength tl \
-Where t.id = :tripId \
+Where t.id In :tripId \
And tl.sizeMeasureType = 2 \
And ts.discarded = false
report.targetStoredDistributionLengthsLF.request.1=0,0|row| \
@@ -844,13 +799,12 @@ Join t.route r \
Join r.activitySeine a \
Join a.setSeine.targetSample ts \
Join ts.targetLength tl \
-Where t.id = :tripId \
+Where t.id In :tripId \
And tl.species.id = :speciesId \
And tl.sizeMeasureType = 2 \
And ts.discarded = false \
Group By tl.length \
Order By tl.length
-
###############################################################
## Distribution des tailles des rejets par espèces ciblées (LF)
###############################################################
@@ -866,7 +820,7 @@ Join t.route r \
Join r.activitySeine a \
Join a.setSeine.targetSample ts \
Join ts.targetLength tl \
-Where t.id = :tripId \
+Where t.id In :tripId \
And tl.sizeMeasureType = 2 \
And ts.discarded = true
report.targetDiscardedDistributionLengthsLF.request.1=0,0|row| \
@@ -876,13 +830,12 @@ Join t.route r \
Join r.activitySeine a \
Join a.setSeine.targetSample ts \
Join ts.targetLength tl \
-Where t.id = :tripId \
+Where t.id In :tripId \
And tl.species.id = :speciesId \
And tl.sizeMeasureType = 2 \
And ts.discarded = true \
Group By tl.length \
Order By tl.length
-
############################################
## Répartition des calées par cuves
############################################
@@ -902,6 +855,6 @@ From TripSeineImpl t \
Join t.route r \
Join r.activitySeine a \
Join a.setSeine.targetCatch tc \
-Where t.id = :tripId \
+Where t.id In :tripId \
Group By r.date, a.time, a.latitude, a.longitude, tc.weightCategory.species, tc.weightCategory.species.faoCode, tc.well, a.setSeine.schoolType \
Order By r.date, a.time, tc.weightCategory.species, tc.well
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/b69c4c9f7fca35be0a2c76709c…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/b69c4c9f7fca35be0a2c76709c…
You're receiving this email because of your account on gitlab.com.
1
0
Tony CHEMIT deleted tag v7.0-RC-22 at ultreiaio / ird-observe
--
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop-7.x] 5 commits: optimize i18n + detect again all we can
by Tony CHEMIT 23 Sep '18
by Tony CHEMIT 23 Sep '18
23 Sep '18
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe
Commits:
3ba166c4 by Tony CHEMIT at 2018-09-23T20:08:24Z
optimize i18n + detect again all we can
- - - - -
bd699648 by Tony CHEMIT at 2018-09-23T20:08:29Z
optimize dependencies
- - - - -
e72eae33 by Tony CHEMIT at 2018-09-23T20:08:29Z
fix desactivate referential generated sql
- - - - -
e8cf278f by Tony CHEMIT at 2018-09-23T20:08:30Z
Fix validation result serializatoin on server mode
- - - - -
b69c4c9f by Tony CHEMIT at 2018-09-23T20:08:30Z
Les rapports ne fonctionnent pas très bien - Closes #1081
- - - - -
30 changed files:
- client-configuration/pom.xml
- client/pom.xml
- client/src/main/java/fr/ird/observe/client/ui/admin/config/SelectDataModel.java
- client/src/main/java/fr/ird/observe/client/ui/admin/report/ReportUI.jcss
- client/src/main/java/fr/ird/observe/client/ui/admin/report/ReportUIHandler.java
- client/src/main/java/fr/ird/observe/client/ui/admin/validate/ValidateConfigUI.jcss
- client/src/main/java/fr/ird/observe/client/ui/admin/validate/ValidateUIHandler.java
- client/src/main/resources/i18n/client_en_GB.properties
- client/src/main/resources/i18n/client_es_ES.properties
- client/src/main/resources/i18n/client_fr_FR.properties
- dto/pom.xml
- dto/src/main/resources/i18n/dto_en_GB.properties
- dto/src/main/resources/i18n/dto_es_ES.properties
- dto/src/main/resources/i18n/dto_fr_FR.properties
- services-client/src/test/java/fr/ird/observe/services/client/service/actions/report/AbstractReportServiceClientTest.java
- services-local/src/main/java/fr/ird/observe/services/local/service/actions/report/ReportServiceLocal.java
- services-local/src/main/java/fr/ird/observe/services/local/service/actions/synchro/referential/sql/DisableSqlStatementGenerator.java
- services-local/src/main/java/fr/ird/observe/services/local/service/actions/validate/ValidateServiceLocal.java
- services-local/src/main/java/fr/ird/observe/services/local/service/actions/validate/ValidationMessageDetector.java
- services-local/src/test/java/fr/ird/observe/services/local/service/actions/report/AbstractReportServiceLocalTest.java
- + services-local/src/test/java/fr/ird/observe/services/local/service/actions/report/ReportNonTargetDistributionLengthsTest.java
- services/pom.xml
- services/src/main/java/fr/ird/observe/services/gson/ObserveDtoGsonSupplier.java
- services/src/main/java/fr/ird/observe/services/gson/ReportVariableAdapter.java
- + services/src/main/java/fr/ird/observe/services/gson/ValidationResultDtoAdapter.java
- services/src/main/java/fr/ird/observe/services/service/actions/report/ReportBuilder.java
- services/src/main/java/fr/ird/observe/services/service/actions/report/ReportRequest.java
- services/src/main/java/fr/ird/observe/services/service/actions/report/ReportService.java
- + services/src/main/java/fr/ird/observe/services/service/actions/validate/DataValidationResult.java
- + services/src/main/java/fr/ird/observe/services/service/actions/validate/ReferentialValidationResult.java
The diff was not included because it is too large.
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/7f76202673b0d38b0d1eacd8bb…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/7f76202673b0d38b0d1eacd8bb…
You're receiving this email because of your account on gitlab.com.
1
0