Observe-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- 7199 discussions
[Git][ultreiaio/ird-observe][develop-7.x] [PS][LL] La synchro avancée de marées plante - Closes #1050
by Tony CHEMIT 17 Sep '18
by Tony CHEMIT 17 Sep '18
17 Sep '18
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe
Commits:
b738d07a by Tony CHEMIT at 2018-09-17T23:33:38Z
[PS][LL] La synchro avancée de marées plante - Closes #1050
- - - - -
6 changed files:
- services/src/main/java/fr/ird/observe/services/service/actions/synchro/referential/legacy/UnidirectionalReferentialSynchronizeLocalService.java
- services/src/main/java/fr/ird/observe/services/service/actions/synchro/referential/ng/ReferentialSynchronizeService.java
- services/src/main/java/fr/ird/observe/services/service/data/NavigationService.java
- services/src/main/java/fr/ird/observe/services/service/data/TripManagementService.java
- services/src/main/java/fr/ird/observe/services/service/referential/ReferentialService.java
- services/src/main/java/fr/ird/observe/services/service/sql/SqlScriptProducerService.java
Changes:
=====================================
services/src/main/java/fr/ird/observe/services/service/actions/synchro/referential/legacy/UnidirectionalReferentialSynchronizeLocalService.java
=====================================
@@ -87,7 +87,7 @@ public interface UnidirectionalReferentialSynchronizeLocalService extends Observ
//tc-20160713 On ne met pas cette permission, car il s'agit d'appliquer un script sql, sans avoir besoin des droits applicatifs
// @WriteReferentialPermission
@Write
- @Post
+ @Post(useMultiPartForm = true)
void applySqlRequests(ImmutableSet<String> sqlRequests);
@ReadReferentialPermission
=====================================
services/src/main/java/fr/ird/observe/services/service/actions/synchro/referential/ng/ReferentialSynchronizeService.java
=====================================
@@ -40,7 +40,7 @@ public interface ReferentialSynchronizeService extends ObserveService {
// Note : sur cette méthode aucun droit métier à poser, les actions sont légitimes
@Write
- @Post
+ @Post(useMultiPartForm = true)
void executeSqlsRequests(ReferentialSynchronizeSqlsRequest localSqlsRequest, ReferentialSynchronizeSqlsRequest oppositeSqlsRequest);
}
=====================================
services/src/main/java/fr/ird/observe/services/service/data/NavigationService.java
=====================================
@@ -35,7 +35,7 @@ import io.ultreia.java4all.http.spi.Get;
*/
public interface NavigationService extends ObserveService {
- @Get
+ @Get(useMultiPartForm = true)
NavigationResult getNavigation(NavigationRequest request);
@Get
=====================================
services/src/main/java/fr/ird/observe/services/service/data/TripManagementService.java
=====================================
@@ -10,12 +10,12 @@ package fr.ird.observe.services.service.data;
* 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>.
@@ -39,16 +39,16 @@ public interface TripManagementService extends ObserveService {
@ReadDataPermission
@ReadReferentialPermission
- @Post(timeOut = 120)
+ @Post(timeOut = 120, useMultiPartForm = true)
ExportTripResult exportTrip(ExportTripRequest exportRequest);
@WriteDataPermission
- @Post(timeOut = 120)
+ @Post(timeOut = 120, useMultiPartForm = true)
@Write
DeleteTripResult deleteTrip(DeleteTripRequest request);
@WriteDataPermission
- @Post(timeOut = 120)
+ @Post(timeOut = 120, useMultiPartForm = true)
@Write
ImportTripResult importTrip(ImportTripRequest request);
=====================================
services/src/main/java/fr/ird/observe/services/service/referential/ReferentialService.java
=====================================
@@ -124,12 +124,12 @@ public interface ReferentialService extends ObserveService {
@ReadReferentialPermission
@ReadDataPermission
- @Post
+ @Post(useMultiPartForm = true)
MissingReferentialResult computeMissingReferential(MissingReferentialRequest request);
@ReadReferentialPermission
@WriteDataPermission
- @Post
+ @Post(useMultiPartForm = true)
@Write
void insertMissingReferential(TopiaSqlScript sqlContent);
=====================================
services/src/main/java/fr/ird/observe/services/service/sql/SqlScriptProducerService.java
=====================================
@@ -22,9 +22,9 @@ package fr.ird.observe.services.service.sql;
* #L%
*/
-import org.nuiton.topia.persistence.script.TopiaSqlScript;
import fr.ird.observe.services.service.ObserveService;
import io.ultreia.java4all.http.spi.Get;
+import org.nuiton.topia.persistence.script.TopiaSqlScript;
/**
* Created on 31/12/15.
@@ -33,9 +33,9 @@ import io.ultreia.java4all.http.spi.Get;
*/
public interface SqlScriptProducerService extends ObserveService {
- @Get
+ @Get(useMultiPartForm = true)
TopiaSqlScript produceAddSqlScript(AddSqlScriptProducerRequest request);
- @Get
+ @Get(useMultiPartForm = true)
TopiaSqlScript produceDeleteSqlScript(DeleteSqlScriptProducerRequest request);
}
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/b738d07a2d08debdb5a659fdabe…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/b738d07a2d08debdb5a659fdabe…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop-7.x] [PS][LL] La synchro avancée de marées plante - Closes #1050
by Tony CHEMIT 17 Sep '18
by Tony CHEMIT 17 Sep '18
17 Sep '18
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe
Commits:
a0ee5cff by Tony CHEMIT at 2018-09-17T23:32:08Z
[PS][LL] La synchro avancée de marées plante - Closes #1050
- - - - -
6 changed files:
- services/src/main/java/fr/ird/observe/services/service/actions/synchro/referential/legacy/UnidirectionalReferentialSynchronizeLocalService.java
- services/src/main/java/fr/ird/observe/services/service/actions/synchro/referential/ng/ReferentialSynchronizeService.java
- services/src/main/java/fr/ird/observe/services/service/data/NavigationService.java
- services/src/main/java/fr/ird/observe/services/service/data/TripManagementService.java
- services/src/main/java/fr/ird/observe/services/service/referential/ReferentialService.java
- services/src/main/java/fr/ird/observe/services/service/sql/SqlScriptProducerService.java
Changes:
=====================================
services/src/main/java/fr/ird/observe/services/service/actions/synchro/referential/legacy/UnidirectionalReferentialSynchronizeLocalService.java
=====================================
@@ -87,7 +87,7 @@ public interface UnidirectionalReferentialSynchronizeLocalService extends Observ
//tc-20160713 On ne met pas cette permission, car il s'agit d'appliquer un script sql, sans avoir besoin des droits applicatifs
// @WriteReferentialPermission
@Write
- @Post
+ @Post(useMultiPartForm = true)
void applySqlRequests(ImmutableSet<String> sqlRequests);
@ReadReferentialPermission
=====================================
services/src/main/java/fr/ird/observe/services/service/actions/synchro/referential/ng/ReferentialSynchronizeService.java
=====================================
@@ -40,7 +40,7 @@ public interface ReferentialSynchronizeService extends ObserveService {
// Note : sur cette méthode aucun droit métier à poser, les actions sont légitimes
@Write
- @Post
+ @Post(useMultiPartForm = true)
void executeSqlsRequests(ReferentialSynchronizeSqlsRequest localSqlsRequest, ReferentialSynchronizeSqlsRequest oppositeSqlsRequest);
}
=====================================
services/src/main/java/fr/ird/observe/services/service/data/NavigationService.java
=====================================
@@ -35,7 +35,7 @@ import io.ultreia.java4all.http.spi.Get;
*/
public interface NavigationService extends ObserveService {
- @Get
+ @Get(useMultiPartForm = true)
NavigationResult getNavigation(NavigationRequest request);
@Get
=====================================
services/src/main/java/fr/ird/observe/services/service/data/TripManagementService.java
=====================================
@@ -10,12 +10,12 @@ package fr.ird.observe.services.service.data;
* 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>.
@@ -39,16 +39,16 @@ public interface TripManagementService extends ObserveService {
@ReadDataPermission
@ReadReferentialPermission
- @Post(timeOut = 120)
+ @Post(timeOut = 120, useMultiPartForm = true)
ExportTripResult exportTrip(ExportTripRequest exportRequest);
@WriteDataPermission
- @Post(timeOut = 120)
+ @Post(timeOut = 120, useMultiPartForm = true)
@Write
DeleteTripResult deleteTrip(DeleteTripRequest request);
@WriteDataPermission
- @Post(timeOut = 120)
+ @Post(timeOut = 120, useMultiPartForm = true)
@Write
ImportTripResult importTrip(ImportTripRequest request);
=====================================
services/src/main/java/fr/ird/observe/services/service/referential/ReferentialService.java
=====================================
@@ -129,7 +129,7 @@ public interface ReferentialService extends ObserveService {
@ReadReferentialPermission
@WriteDataPermission
- @Post
+ @Post(useMultiPartForm = true)
@Write
void insertMissingReferential(TopiaSqlScript sqlContent);
=====================================
services/src/main/java/fr/ird/observe/services/service/sql/SqlScriptProducerService.java
=====================================
@@ -22,9 +22,9 @@ package fr.ird.observe.services.service.sql;
* #L%
*/
-import org.nuiton.topia.persistence.script.TopiaSqlScript;
import fr.ird.observe.services.service.ObserveService;
import io.ultreia.java4all.http.spi.Get;
+import org.nuiton.topia.persistence.script.TopiaSqlScript;
/**
* Created on 31/12/15.
@@ -33,9 +33,9 @@ import io.ultreia.java4all.http.spi.Get;
*/
public interface SqlScriptProducerService extends ObserveService {
- @Get
+ @Get(useMultiPartForm = true)
TopiaSqlScript produceAddSqlScript(AddSqlScriptProducerRequest request);
- @Get
+ @Get(useMultiPartForm = true)
TopiaSqlScript produceDeleteSqlScript(DeleteSqlScriptProducerRequest request);
}
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/a0ee5cff26b8ead8157ef6c4c68…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/a0ee5cff26b8ead8157ef6c4c68…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop-7.x] [PS][LL] La synchro avancée de marées plante - Closes #1050
by Tony CHEMIT 17 Sep '18
by Tony CHEMIT 17 Sep '18
17 Sep '18
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe
Commits:
b4289782 by Tony CHEMIT at 2018-09-17T23:25:12Z
[PS][LL] La synchro avancée de marées plante - Closes #1050
- - - - -
5 changed files:
- services/src/main/java/fr/ird/observe/services/service/actions/synchro/referential/legacy/UnidirectionalReferentialSynchronizeLocalService.java
- services/src/main/java/fr/ird/observe/services/service/actions/synchro/referential/ng/ReferentialSynchronizeService.java
- services/src/main/java/fr/ird/observe/services/service/data/NavigationService.java
- services/src/main/java/fr/ird/observe/services/service/data/TripManagementService.java
- services/src/main/java/fr/ird/observe/services/service/sql/SqlScriptProducerService.java
Changes:
=====================================
services/src/main/java/fr/ird/observe/services/service/actions/synchro/referential/legacy/UnidirectionalReferentialSynchronizeLocalService.java
=====================================
@@ -87,7 +87,7 @@ public interface UnidirectionalReferentialSynchronizeLocalService extends Observ
//tc-20160713 On ne met pas cette permission, car il s'agit d'appliquer un script sql, sans avoir besoin des droits applicatifs
// @WriteReferentialPermission
@Write
- @Post
+ @Post(useMultiPartForm = true)
void applySqlRequests(ImmutableSet<String> sqlRequests);
@ReadReferentialPermission
=====================================
services/src/main/java/fr/ird/observe/services/service/actions/synchro/referential/ng/ReferentialSynchronizeService.java
=====================================
@@ -40,7 +40,7 @@ public interface ReferentialSynchronizeService extends ObserveService {
// Note : sur cette méthode aucun droit métier à poser, les actions sont légitimes
@Write
- @Post
+ @Post(useMultiPartForm = true)
void executeSqlsRequests(ReferentialSynchronizeSqlsRequest localSqlsRequest, ReferentialSynchronizeSqlsRequest oppositeSqlsRequest);
}
=====================================
services/src/main/java/fr/ird/observe/services/service/data/NavigationService.java
=====================================
@@ -35,7 +35,7 @@ import io.ultreia.java4all.http.spi.Get;
*/
public interface NavigationService extends ObserveService {
- @Get
+ @Get(useMultiPartForm = true)
NavigationResult getNavigation(NavigationRequest request);
@Get
=====================================
services/src/main/java/fr/ird/observe/services/service/data/TripManagementService.java
=====================================
@@ -10,12 +10,12 @@ package fr.ird.observe.services.service.data;
* 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>.
@@ -39,16 +39,16 @@ public interface TripManagementService extends ObserveService {
@ReadDataPermission
@ReadReferentialPermission
- @Post(timeOut = 120)
+ @Post(timeOut = 120, useMultiPartForm = true)
ExportTripResult exportTrip(ExportTripRequest exportRequest);
@WriteDataPermission
- @Post(timeOut = 120)
+ @Post(timeOut = 120, useMultiPartForm = true)
@Write
DeleteTripResult deleteTrip(DeleteTripRequest request);
@WriteDataPermission
- @Post(timeOut = 120)
+ @Post(timeOut = 120, useMultiPartForm = true)
@Write
ImportTripResult importTrip(ImportTripRequest request);
=====================================
services/src/main/java/fr/ird/observe/services/service/sql/SqlScriptProducerService.java
=====================================
@@ -22,9 +22,9 @@ package fr.ird.observe.services.service.sql;
* #L%
*/
-import org.nuiton.topia.persistence.script.TopiaSqlScript;
import fr.ird.observe.services.service.ObserveService;
import io.ultreia.java4all.http.spi.Get;
+import org.nuiton.topia.persistence.script.TopiaSqlScript;
/**
* Created on 31/12/15.
@@ -33,9 +33,9 @@ import io.ultreia.java4all.http.spi.Get;
*/
public interface SqlScriptProducerService extends ObserveService {
- @Get
+ @Get(useMultiPartForm = true)
TopiaSqlScript produceAddSqlScript(AddSqlScriptProducerRequest request);
- @Get
+ @Get(useMultiPartForm = true)
TopiaSqlScript produceDeleteSqlScript(DeleteSqlScriptProducerRequest request);
}
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/b4289782ced0954f78a1fe834f4…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/b4289782ced0954f78a1fe834f4…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop-7.x] add more log when can not get Call.ParameterTree
by Tony CHEMIT 17 Sep '18
by Tony CHEMIT 17 Sep '18
17 Sep '18
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe
Commits:
78efde62 by Tony CHEMIT at 2018-09-17T21:29:35Z
add more log when can not get Call.ParameterTree
- - - - -
1 changed file:
- server/src/main/java/fr/ird/observe/server/injector/ObserveDtoInjector.java
Changes:
=====================================
server/src/main/java/fr/ird/observe/server/injector/ObserveDtoInjector.java
=====================================
@@ -27,8 +27,8 @@ import com.google.gson.JsonParseException;
import fr.ird.observe.dto.ObserveDto;
import io.ultreia.java4all.http.HRestClientService;
import org.apache.commons.beanutils.converters.AbstractConverter;
-import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.debux.webmotion.server.call.Call;
import org.debux.webmotion.server.handler.ExecutorParametersInjectorHandler;
import org.debux.webmotion.server.mapping.Mapping;
@@ -58,7 +58,13 @@ public class ObserveDtoInjector extends AbstractConverter implements ExecutorPar
ObserveDto observeDto = null;
if (ObserveDto.class.isAssignableFrom(type)) {
- Call.ParameterTree parameterTree = call.getParameterTree().getObject().get(name);
+ Call.ParameterTree parameterTree;
+ try {
+ parameterTree = call.getParameterTree().getObject().get(name);
+ } catch (RuntimeException e) {
+ log.error(String.format("Could not get parameterTree for mapping: %s, call: %s - name: %s, type: %s", mapping, call, name, type), e);
+ throw e;
+ }
String gsonContent = ((String[]) parameterTree.getValue())[0];
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/78efde62889b4b40aa24e945045…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/78efde62889b4b40aa24e945045…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop-7.x] Suppression de lignes de référentiel : liste de ceux qui plantent avec erreur de…
by Tony CHEMIT 17 Sep '18
by Tony CHEMIT 17 Sep '18
17 Sep '18
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe
Commits:
92c5ada3 by Tony CHEMIT at 2018-09-17T17:53:40Z
Suppression de lignes de référentiel : liste de ceux qui plantent avec erreur de type Dto - Closes #1051
- - - - -
1 changed file:
- pom.xml
Changes:
=====================================
pom.xml
=====================================
@@ -152,7 +152,7 @@
<maven.build.timestamp.format>dd/MM/yyyy HH:mm z</maven.build.timestamp.format>
<buildDate>${maven.build.timestamp}</buildDate>
- <observeToolkitVersion>3.7.5</observeToolkitVersion>
+ <observeToolkitVersion>3.7.6</observeToolkitVersion>
<!--lib.version.java4all.http>1.0.12</lib.version.java4all.http-->
<lib.version.nuiton.validation>3.1</lib.version.nuiton.validation>
<!--<lib.version.java4all.config>1.0.3</lib.version.java4all.config>-->
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/92c5ada3b29df485c45bae8b36f…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/92c5ada3b29df485c45bae8b36f…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop-7.x] use last toolkit to solve gson problems... - See 1051
by Tony CHEMIT 17 Sep '18
by Tony CHEMIT 17 Sep '18
17 Sep '18
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe
Commits:
525b7b37 by Tony CHEMIT at 2018-09-17T16:21:58Z
use last toolkit to solve gson problems... - See 1051
- - - - -
1 changed file:
- pom.xml
Changes:
=====================================
pom.xml
=====================================
@@ -152,7 +152,7 @@
<maven.build.timestamp.format>dd/MM/yyyy HH:mm z</maven.build.timestamp.format>
<buildDate>${maven.build.timestamp}</buildDate>
- <observeToolkitVersion>3.7.5</observeToolkitVersion>
+ <observeToolkitVersion>3.7.6-SNAPSHOT</observeToolkitVersion>
<!--lib.version.java4all.http>1.0.12</lib.version.java4all.http-->
<lib.version.nuiton.validation>3.1</lib.version.nuiton.validation>
<!--<lib.version.java4all.config>1.0.3</lib.version.java4all.config>-->
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/525b7b37914b4715b3142999e6f…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/525b7b37914b4715b3142999e6f…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop-7.x] Suppression de lignes de référentiel : liste de ceux qui plantent avec erreurs…
by Tony CHEMIT 17 Sep '18
by Tony CHEMIT 17 Sep '18
17 Sep '18
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe
Commits:
50c96c4a by Tony CHEMIT at 2018-09-17T15:27:45Z
Suppression de lignes de référentiel : liste de ceux qui plantent avec erreurs spécifiques - Closes #1052
- - - - -
8 changed files:
- client/src/main/java/fr/ird/observe/client/ui/content/ref/ContentReferenceUIHandler.java
- client/src/main/java/fr/ird/observe/client/ui/content/ref/usage/UsageForDeleteUI.jaxx
- client/src/main/java/fr/ird/observe/client/ui/content/ref/usage/UsageForDesactivateUI.jaxx
- client/src/main/java/fr/ird/observe/client/ui/content/ref/usage/UsageForDisplayUI.jaxx
- client/src/main/java/fr/ird/observe/client/ui/content/ref/usage/UsageUIHandlerSupport.java
- pom.xml
- services-local/src/main/java/fr/ird/observe/services/local/service/referential/ReferentialServiceLocal.java
- services/src/main/java/fr/ird/observe/services/service/referential/ReferentialService.java
Changes:
=====================================
client/src/main/java/fr/ird/observe/client/ui/content/ref/ContentReferenceUIHandler.java
=====================================
@@ -38,6 +38,7 @@ import fr.ird.observe.dto.decoration.ObserveI18nDecoratorHelper;
import fr.ird.observe.dto.decoration.decorators.ReferentialReferenceDecorator;
import fr.ird.observe.dto.form.Form;
import fr.ird.observe.dto.form.FormDefinition;
+import fr.ird.observe.dto.reference.DtoReference;
import fr.ird.observe.dto.reference.ReferentialDtoReference;
import fr.ird.observe.dto.referential.I18nReferentialDto;
import fr.ird.observe.dto.referential.ProgramDto;
@@ -51,8 +52,8 @@ import fr.ird.observe.spi.DtoModelHelper;
import fr.ird.observe.spi.map.ImmutableSetDtoMap;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
-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.swing.CardLayout2Ext;
import org.nuiton.jaxx.validator.swing.SwingValidatorUtil;
@@ -166,7 +167,7 @@ public class ContentReferenceUIHandler<D extends ReferentialDto, R extends Refer
}
private static <E extends ReferentialDto, R extends ReferentialDtoReference<E, R>> Pair<Boolean, R> showUsagesForDelete(E entity,
- ImmutableSetDtoMap<ReferentialDtoReference> usages,
+ ImmutableSetDtoMap<DtoReference> usages,
List<R> referenceList) {
DecoratorService service = ObserveSwingApplicationContext.get().getDecoratorService();
@@ -205,7 +206,7 @@ public class ContentReferenceUIHandler<D extends ReferentialDto, R extends Refer
}
private static <E extends ReferentialDto, R extends ReferentialDtoReference<E, R>> Pair<Boolean, R> showUsagesForDesactivated(E entity,
- ImmutableSetDtoMap<ReferentialDtoReference> usages,
+ ImmutableSetDtoMap<DtoReference> usages,
List<R> referenceList) {
DecoratorService service = ObserveSwingApplicationContext.get().getDecoratorService();
@@ -393,7 +394,7 @@ public class ContentReferenceUIHandler<D extends ReferentialDto, R extends Refer
}
// recherche des utilisation du bean dans la base
- ImmutableSetDtoMap<ReferentialDtoReference> usages = getReferentialService().findAllUsages(bean);
+ ImmutableSetDtoMap<DtoReference> usages = getReferentialService().findAllUsages(bean);
DecoratorService dService = getDecoratorService();
Decorator<D> decorator = dService.getDecoratorByType(getBeanType());
@@ -692,7 +693,7 @@ public class ContentReferenceUIHandler<D extends ReferentialDto, R extends Refer
log.debug("entity status was desactivated, looking for usage");
}
- ImmutableSetDtoMap<ReferentialDtoReference> usages = getReferentialService().findAllUsages(bean);
+ ImmutableSetDtoMap<DtoReference> usages = getReferentialService().findAllUsages(bean);
if (usages.isEmpty()) {
if (log.isInfoEnabled()) {
@@ -766,7 +767,7 @@ public class ContentReferenceUIHandler<D extends ReferentialDto, R extends Refer
}
// recherche des utilisation du bean dans la base
- ImmutableSetDtoMap<ReferentialDtoReference> usages = getReferentialService().findAllUsages(bean);
+ ImmutableSetDtoMap<DtoReference> usages = getReferentialService().findAllUsages(bean);
R replaceReference = null;
=====================================
client/src/main/java/fr/ird/observe/client/ui/content/ref/usage/UsageForDeleteUI.jaxx
=====================================
@@ -26,6 +26,7 @@ Interface graphique pour afficher la liste des usages d'une entitee donnee.
<import>
fr.ird.observe.spi.map.ImmutableSetDtoMap
+ fr.ird.observe.dto.reference.DtoReference
fr.ird.observe.dto.reference.ReferentialDtoReference
org.nuiton.jaxx.runtime.context.JAXXInitialContext
org.nuiton.jaxx.widgets.select.BeanFilterableComboBox
@@ -36,7 +37,7 @@ Interface graphique pour afficher la liste des usages d'une entitee donnee.
<script><![CDATA[
-public static <R extends ReferentialDtoReference> UsageForDeleteUI<R> build(String message, ImmutableSetDtoMap<ReferentialDtoReference> usages, List references) {
+public static <R extends ReferentialDtoReference> UsageForDeleteUI<R> build(String message, ImmutableSetDtoMap<? extends DtoReference> usages, List references) {
return new UsageForDeleteUI<>(new JAXXInitialContext().add(message).add(usages).add(references));
}
=====================================
client/src/main/java/fr/ird/observe/client/ui/content/ref/usage/UsageForDesactivateUI.jaxx
=====================================
@@ -24,6 +24,7 @@ Interface graphique pour afficher la liste des usages d'une entitee donnee.
<JPanel layout='{new BorderLayout()}' genericType="R extends ReferentialDtoReference">
<import>
+ fr.ird.observe.dto.reference.DtoReference
fr.ird.observe.dto.reference.ReferentialDtoReference
fr.ird.observe.spi.map.ImmutableSetDtoMap
@@ -36,7 +37,7 @@ Interface graphique pour afficher la liste des usages d'une entitee donnee.
<script><![CDATA[
-public static <R extends ReferentialDtoReference> UsageForDesactivateUI<R> build(String message, ImmutableSetDtoMap<ReferentialDtoReference> usages, List references) {
+public static <R extends ReferentialDtoReference> UsageForDesactivateUI<R> build(String message, ImmutableSetDtoMap<? extends DtoReference> usages, List references) {
return new UsageForDesactivateUI<>(new JAXXInitialContext().add(message).add(usages).add(references));
}
=====================================
client/src/main/java/fr/ird/observe/client/ui/content/ref/usage/UsageForDisplayUI.jaxx
=====================================
@@ -25,6 +25,7 @@ Interface graphique pour afficher la liste des usages d'une entitee donnee.
<import>
+ fr.ird.observe.dto.reference.DtoReference
fr.ird.observe.dto.reference.ReferentialDtoReference
fr.ird.observe.spi.map.ImmutableSetDtoMap
org.nuiton.jaxx.runtime.context.JAXXInitialContext
@@ -34,7 +35,7 @@ Interface graphique pour afficher la liste des usages d'une entitee donnee.
<script><![CDATA[
-public static <R extends ReferentialDtoReference> UsageForDisplayUI<R> build(String message, ImmutableSetDtoMap<ReferentialDtoReference> usages) {
+public static <R extends ReferentialDtoReference> UsageForDisplayUI<R> build(String message, ImmutableSetDtoMap<? extends DtoReference> usages) {
return new UsageForDisplayUI<>(new JAXXInitialContext().add(message).add(usages));
}
=====================================
client/src/main/java/fr/ird/observe/client/ui/content/ref/usage/UsageUIHandlerSupport.java
=====================================
@@ -24,9 +24,11 @@ package fr.ird.observe.client.ui.content.ref.usage;
import fr.ird.observe.client.ObserveSwingApplicationContext;
import fr.ird.observe.dto.IdDto;
+import fr.ird.observe.dto.data.DataDto;
import fr.ird.observe.dto.decoration.DecoratorService;
import fr.ird.observe.dto.decoration.ObserveI18nDecoratorHelper;
import fr.ird.observe.dto.decoration.decorators.ReferentialReferenceDecorator;
+import fr.ird.observe.dto.reference.DataDtoReference;
import fr.ird.observe.dto.reference.DtoReference;
import fr.ird.observe.dto.reference.ReferentialDtoReference;
import fr.ird.observe.dto.referential.ReferentialDto;
@@ -91,9 +93,12 @@ public abstract class UsageUIHandlerSupport<R extends ReferentialDtoReference, U
Set references = usages.get(dtoType);
String typeTitle = t(ObserveI18nDecoratorHelper.getTypeI18nKey(dtoType));
addReferentialReferenceUsages(dtoType, references, typeTitle);
-
}
-
+ for (Class<? extends DataDtoReference> dtoType : usages.dataReferenceTypes()) {
+ Set references = usages.get(dtoType);
+ String typeTitle = t(ObserveI18nDecoratorHelper.getTypeI18nKey(dtoType));
+ addDataReferenceUsages(dtoType, references, typeTitle);
+ }
}
BeanFilterableComboBox<R> comboBox = getReplace();
@@ -119,18 +124,18 @@ public abstract class UsageUIHandlerSupport<R extends ReferentialDtoReference, U
});
}
-// protected <D extends DataDto, R extends DataDtoReference<D, R>> void addDataReferenceUsages(Class<R> dtoType,
-// Set<R> references,
-// String typeTitle) {
-//
-// String typetitle = n("observe.common.Dto.label.usage.data.title");
-// typetitle = t(typetitle, typeTitle, references.size());
-//
-// Decorator<?> decorator = ObserveSwingApplicationContext.get().getDecoratorService().getDataReferenceDecorator(dtoType);
-// Objects.requireNonNull(decorator, "could not find decorator for type " + dtoType);
-//
-// buildUsagePanel(decorator, references, typetitle);
-// }
+ protected <D extends DataDto, R extends DataDtoReference<D, R>> void addDataReferenceUsages(Class<R> dtoType,
+ Set<R> references,
+ String typeTitle) {
+
+ String typetitle = n("observe.common.Dto.label.usage.data.title");
+ typetitle = t(typetitle, typeTitle, references.size());
+
+ Decorator<?> decorator = ObserveSwingApplicationContext.get().getDecoratorService().getDataReferenceDecorator(dtoType);
+ Objects.requireNonNull(decorator, "could not find decorator for type " + dtoType);
+
+ buildUsagePanel(decorator, references, typetitle);
+ }
protected <D extends ReferentialDto, R extends ReferentialDtoReference<D, R>> void addReferentialReferenceUsages(Class<R> referenceType,
=====================================
pom.xml
=====================================
@@ -26,7 +26,7 @@
<parent>
<groupId>io.ultreia.maven</groupId>
<artifactId>pom</artifactId>
- <version>2018.51</version>
+ <version>2018.53</version>
</parent>
<groupId>fr.ird.observe</groupId>
@@ -152,9 +152,8 @@
<maven.build.timestamp.format>dd/MM/yyyy HH:mm z</maven.build.timestamp.format>
<buildDate>${maven.build.timestamp}</buildDate>
- <observeToolkitVersion>3.7.4</observeToolkitVersion>
- <lib.version.java4all.http>1.0.12</lib.version.java4all.http>
- <lib.version.java4all.jaxx>3.0-alpha-35</lib.version.java4all.jaxx>
+ <observeToolkitVersion>3.7.5</observeToolkitVersion>
+ <!--lib.version.java4all.http>1.0.12</lib.version.java4all.http-->
<lib.version.nuiton.validation>3.1</lib.version.nuiton.validation>
<!--<lib.version.java4all.config>1.0.3</lib.version.java4all.config>-->
<xworkVersion>2.3.35</xworkVersion>
=====================================
services-local/src/main/java/fr/ird/observe/services/local/service/referential/ReferentialServiceLocal.java
=====================================
@@ -10,12 +10,12 @@ package fr.ird.observe.services.local.service.referential;
* 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>.
@@ -25,11 +25,16 @@ package fr.ird.observe.services.local.service.referential;
import com.google.common.base.Joiner;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
+import fr.ird.observe.binder.data.DataEntityReferenceBinderSupport;
import fr.ird.observe.binder.referential.ReferentialEntityDtoBinderSupport;
import fr.ird.observe.binder.referential.ReferentialEntityReferenceBinderSupport;
import fr.ird.observe.dto.IdDto;
+import fr.ird.observe.dto.data.DataDto;
import fr.ird.observe.dto.form.Form;
import fr.ird.observe.dto.form.FormDefinition;
+import fr.ird.observe.dto.reference.DataDtoReference;
+import fr.ird.observe.dto.reference.DataDtoReferenceSet;
+import fr.ird.observe.dto.reference.DtoReference;
import fr.ird.observe.dto.reference.ReferentialDtoReference;
import fr.ird.observe.dto.reference.ReferentialDtoReferenceSet;
import fr.ird.observe.dto.referential.ReferenceStatus;
@@ -39,6 +44,7 @@ import fr.ird.observe.dto.referential.SpeciesGroupDto;
import fr.ird.observe.dto.referential.seine.ObservedSystemReference;
import fr.ird.observe.dto.result.SaveResultDto;
import fr.ird.observe.entities.EntityMap;
+import fr.ird.observe.entities.ObserveDataEntity;
import fr.ird.observe.entities.longline.TripLongline;
import fr.ird.observe.entities.referentiel.ObserveReferentialEntity;
import fr.ird.observe.entities.referentiel.Species;
@@ -59,13 +65,14 @@ import fr.ird.observe.services.service.sql.SqlScriptProducerService;
import fr.ird.observe.spi.DbModelHelper;
import fr.ird.observe.spi.DtoModelClasses;
import fr.ird.observe.spi.DtoModelHelper;
+import fr.ird.observe.spi.context.DataEntityContext;
import fr.ird.observe.spi.context.ReferentialDtoEntityContext;
import fr.ird.observe.spi.context.ReferentialEntityContext;
import fr.ird.observe.spi.context.ReferentialReferenceEntityContext;
import fr.ird.observe.spi.map.ImmutableDtoMap;
import fr.ird.observe.spi.map.ImmutableSetDtoMap;
-import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.nuiton.topia.persistence.TopiaDao;
import org.nuiton.topia.persistence.TopiaEntity;
import org.nuiton.topia.persistence.metadata.TopiaMetadataModel;
@@ -208,7 +215,7 @@ public class ReferentialServiceLocal extends ObserveServiceLocal implements Refe
}
@Override
- public <D extends ReferentialDto> ImmutableSetDtoMap<ReferentialDtoReference> findAllUsages(D bean) {
+ public <D extends ReferentialDto> ImmutableSetDtoMap<DtoReference> findAllUsages(D bean) {
ReferentialDtoEntityContext<D, ?, ?> spi = DbModelHelper.fromReferentialDto(bean);
Class<ObserveReferentialEntity> entityType = spi.toEntityType();
@@ -218,12 +225,14 @@ public class ReferentialServiceLocal extends ObserveServiceLocal implements Refe
TopiaDao<ObserveReferentialEntity> dao = getTopiaPersistenceContext().getDao(entityType);
EntityMap allUsages = new EntityMap(dao.findAllUsages(entity));
- ImmutableSetDtoMap.Builder<ReferentialDtoReference> result = ImmutableSetDtoMap.builder();
+ ImmutableSetDtoMap.Builder<DtoReference> result = ImmutableSetDtoMap.builder();
for (Class<? extends TopiaEntity> type : allUsages.keySet()) {
List<? extends TopiaEntity> entities = allUsages.get(type);
if (ObserveReferentialEntity.class.isAssignableFrom(type)) {
//noinspection unchecked
- findAllUsageReferential(DbModelHelper.fromReferentialEntity((Class) type), (List) entities, result);
+ addAllReferentialUsage(DbModelHelper.fromReferentialEntity((Class) type), (List) entities, result);
+ } else {
+ adddAllDataUsage(DbModelHelper.fromDataEntity((Class) type), (List) entities, result);
}
}
return result.build();
@@ -242,13 +251,20 @@ public class ReferentialServiceLocal extends ObserveServiceLocal implements Refe
return result;
}
- private <D extends ReferentialDto, R extends ReferentialDtoReference<D, R>, E extends ObserveReferentialEntity> void findAllUsageReferential(ReferentialEntityContext<D, R, E> spi, List<E> entities, ImmutableSetDtoMap.Builder<ReferentialDtoReference> result) {
+ private <D extends ReferentialDto, R extends ReferentialDtoReference<D, R>, E extends ObserveReferentialEntity> void addAllReferentialUsage(ReferentialEntityContext<D, R, E> spi, List<E> entities, ImmutableSetDtoMap.Builder<DtoReference> result) {
Class<R> referenceType = spi.toReferenceType();
ReferentialEntityReferenceBinderSupport<D, R, E> binder = spi.toEntityReferenceBinder();
ReferentialDtoReferenceSet<R> referenceSet = toReferentialReferenceSet(binder, entities, null);
result.put(referenceType, referenceSet.toSet());
}
+ private <D extends DataDto, R extends DataDtoReference<D, R>, E extends ObserveDataEntity> void adddAllDataUsage(DataEntityContext<D, R, E> spi, List<E> entities, ImmutableSetDtoMap.Builder<DtoReference> result) {
+ Class<R> referenceType = spi.toReferenceType();
+ DataEntityReferenceBinderSupport<D, R, E> binder = spi.toEntityReferenceBinder();
+ DataDtoReferenceSet<R> referenceSet = toDataReferenceSet(binder, entities);
+ result.put(referenceType, referenceSet.toSet());
+ }
+
@Override
public <D extends ReferentialDto> boolean exists(Class<D> type, String id) {
if (log.isTraceEnabled()) {
=====================================
services/src/main/java/fr/ird/observe/services/service/referential/ReferentialService.java
=====================================
@@ -25,6 +25,7 @@ package fr.ird.observe.services.service.referential;
import com.google.common.collect.ImmutableSet;
import fr.ird.observe.dto.IdDto;
import fr.ird.observe.dto.form.Form;
+import fr.ird.observe.dto.reference.DtoReference;
import fr.ird.observe.dto.reference.ReferentialDtoReference;
import fr.ird.observe.dto.reference.ReferentialDtoReferenceSet;
import fr.ird.observe.dto.referential.ReferentialDto;
@@ -32,7 +33,6 @@ import fr.ird.observe.dto.referential.SpeciesDto;
import fr.ird.observe.dto.referential.SpeciesGroupDto;
import fr.ird.observe.dto.referential.seine.ObservedSystemReference;
import fr.ird.observe.dto.result.SaveResultDto;
-import org.nuiton.topia.persistence.script.TopiaSqlScript;
import fr.ird.observe.services.service.ObserveService;
import fr.ird.observe.services.spi.ReadDataPermission;
import fr.ird.observe.services.spi.ReadReferentialPermission;
@@ -44,6 +44,7 @@ import io.ultreia.java4all.http.spi.Delete;
import io.ultreia.java4all.http.spi.Get;
import io.ultreia.java4all.http.spi.Nullable;
import io.ultreia.java4all.http.spi.Post;
+import org.nuiton.topia.persistence.script.TopiaSqlScript;
import java.util.Date;
import java.util.List;
@@ -109,7 +110,7 @@ public interface ReferentialService extends ObserveService {
@Get
@ReadReferentialPermission
@ReadDataPermission
- <R extends ReferentialDto> ImmutableSetDtoMap<ReferentialDtoReference> findAllUsages(R bean);
+ <R extends ReferentialDto> ImmutableSetDtoMap<DtoReference> findAllUsages(R bean);
@Get
@ReadReferentialPermission
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/50c96c4a17a8d5c8ab966a6eb17…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/50c96c4a17a8d5c8ab966a6eb17…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop-7.x] Problème de timeout en RC18 en connexion serveur directe à Tomcat (pas de HTTPD) - See #1053
by Tony CHEMIT 17 Sep '18
by Tony CHEMIT 17 Sep '18
17 Sep '18
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe
Commits:
3f157337 by Tony CHEMIT at 2018-09-17T14:17:25Z
Problème de timeout en RC18 en connexion serveur directe à Tomcat (pas de HTTPD) - See #1053
- - - - -
2 changed files:
- pom.xml
- services-client/src/main/java/fr/ird/observe/services/client/ObserveRequestBuilder.java
Changes:
=====================================
pom.xml
=====================================
@@ -153,6 +153,7 @@
<buildDate>${maven.build.timestamp}</buildDate>
<observeToolkitVersion>3.7.4</observeToolkitVersion>
+ <lib.version.java4all.http>1.0.12</lib.version.java4all.http>
<lib.version.java4all.jaxx>3.0-alpha-35</lib.version.java4all.jaxx>
<lib.version.nuiton.validation>3.1</lib.version.nuiton.validation>
<!--<lib.version.java4all.config>1.0.3</lib.version.java4all.config>-->
=====================================
services-client/src/main/java/fr/ird/observe/services/client/ObserveRequestBuilder.java
=====================================
@@ -53,6 +53,7 @@ public class ObserveRequestBuilder extends HRequestBuilder {
super.checkBeforeBuild();
setTimeout(TimeUnit.MINUTES, serviceContext.getInitializer().getHttpTimeout());
+ setSocketTimeout(TimeUnit.MINUTES, serviceContext.getInitializer().getHttpTimeout());
if (serviceContext.withApplicationLocale()) {
addHeader(REQUEST_APPLICATION_LOCALE, serviceContext.getApplicationLocale().toString());
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/3f1573374ce2cde0fa5794695ac…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/3f1573374ce2cde0fa5794695ac…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop-7.x] La synchro avancée du référentiel listes d'espèces provoque une exception - Closes #1054
by Tony CHEMIT 17 Sep '18
by Tony CHEMIT 17 Sep '18
17 Sep '18
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe
Commits:
00b3d7b6 by Tony CHEMIT at 2018-09-17T13:57:56Z
La synchro avancée du référentiel listes d'espèces provoque une exception - Closes #1054
- - - - -
2 changed files:
- services-local/src/main/java/fr/ird/observe/services/local/service/actions/synchro/referential/ng/ReferentialSynchronizeServiceLocal.java
- services/src/main/java/fr/ird/observe/services/service/actions/synchro/referential/ng/ReferentialSynchronizeSqlsRequest.java
Changes:
=====================================
services-local/src/main/java/fr/ird/observe/services/local/service/actions/synchro/referential/ng/ReferentialSynchronizeServiceLocal.java
=====================================
@@ -56,13 +56,19 @@ public class ReferentialSynchronizeServiceLocal extends ObserveServiceLocal impl
public void executeSqlsRequests(ReferentialSynchronizeSqlsRequest request, ReferentialSynchronizeSqlsRequest oppositeSqlsRequest) {
long startTime = TimeLog.getTime();
-
+ byte[] deleteAssociationSqlCode = request.getDeleteAssociationSqlCode();
byte[] insertSqlCode = oppositeSqlsRequest.getInsertSqlCode();
+ byte[] insertAssociationSqlCode = oppositeSqlsRequest.getInsertAssociationSqlCode();
byte[] updateSqlCode = oppositeSqlsRequest.getUpdateSqlCode();
byte[] deleteSqlCode = request.getDeleteSqlCode();
byte[] desactivateSqlCode = request.getDesactivateSqlCode();
- getTopiaPersistenceContext().executeSqlScripts(insertSqlCode, updateSqlCode, desactivateSqlCode, deleteSqlCode);
+ getTopiaPersistenceContext().executeSqlScripts(deleteAssociationSqlCode,
+ insertSqlCode,
+ insertAssociationSqlCode,
+ updateSqlCode,
+ desactivateSqlCode,
+ deleteSqlCode);
timeLog.log(startTime, "executeSqlsRequests");
=====================================
services/src/main/java/fr/ird/observe/services/service/actions/synchro/referential/ng/ReferentialSynchronizeSqlsRequest.java
=====================================
@@ -10,12 +10,12 @@ package fr.ird.observe.services.service.actions.synchro.referential.ng;
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/gpl-3.0.html>.
@@ -23,8 +23,8 @@ package fr.ird.observe.services.service.actions.synchro.referential.ng;
*/
import fr.ird.observe.dto.ObserveDto;
-import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
/**
* Created on 08/08/16.
@@ -37,18 +37,24 @@ public class ReferentialSynchronizeSqlsRequest implements ObserveDto {
/** Logger. */
private static final Logger log = LogManager.getLogger(ReferentialSynchronizeSqlsRequest.class);
+ private final byte[] insertAssociationSqlCode;
private final byte[] insertSqlCode;
private final byte[] updateSqlCode;
+ private final byte[] deleteAssociationSqlCode;
private final byte[] deleteSqlCode;
private final byte[] desactivateSqlCode;
private ReferentialSynchronizeSqlsRequest(String insertSqlCode,
+ String insertAssociationSqlCode,
String updateSqlCode,
String deleteSqlCode,
+ String deleteAssociationSqlCode,
String desactivateSqlCode) {
this.insertSqlCode = insertSqlCode.getBytes();
+ this.insertAssociationSqlCode = insertAssociationSqlCode.getBytes();
this.updateSqlCode = updateSqlCode.getBytes();
this.deleteSqlCode = deleteSqlCode.getBytes();
+ this.deleteAssociationSqlCode = deleteAssociationSqlCode.getBytes();
this.desactivateSqlCode = desactivateSqlCode.getBytes();
}
@@ -68,21 +74,33 @@ public class ReferentialSynchronizeSqlsRequest implements ObserveDto {
return deleteSqlCode;
}
+ public byte[] getInsertAssociationSqlCode() {
+ return insertAssociationSqlCode;
+ }
+
+ public byte[] getDeleteAssociationSqlCode() {
+ return deleteAssociationSqlCode;
+ }
+
public byte[] getDesactivateSqlCode() {
return desactivateSqlCode;
}
public static class Builder {
+ private final StringBuilder addAssociationTasksBuilder = new StringBuilder();
private final StringBuilder addTasksBuilder = new StringBuilder();
private final StringBuilder updateTasksBuilder = new StringBuilder();
private final StringBuilder deleteTasksBuilder = new StringBuilder();
+ private final StringBuilder deleteAssociationTasksBuilder = new StringBuilder();
private final StringBuilder desactivateTasksBuilder = new StringBuilder();
public ReferentialSynchronizeSqlsRequest build() {
return new ReferentialSynchronizeSqlsRequest(addTasksBuilder.toString(),
+ addAssociationTasksBuilder.toString(),
updateTasksBuilder.toString(),
deleteTasksBuilder.toString(),
+ deleteAssociationTasksBuilder.toString(),
desactivateTasksBuilder.toString());
}
@@ -90,7 +108,11 @@ public class ReferentialSynchronizeSqlsRequest implements ObserveDto {
if (log.isInfoEnabled()) {
log.info("Add add sql: " + sql);
}
- addTasksBuilder.append(sql);
+ if (sql.startsWith("$$_INSERT")) {
+ addAssociationTasksBuilder.append(sql.substring(3));
+ } else {
+ addTasksBuilder.append(sql);
+ }
return this;
}
@@ -107,7 +129,11 @@ public class ReferentialSynchronizeSqlsRequest implements ObserveDto {
if (log.isInfoEnabled()) {
log.info("Add delete sql: " + sql);
}
- deleteTasksBuilder.append(sql);
+ if (sql.startsWith("$$_DELETE")) {
+ deleteAssociationTasksBuilder.append(sql.substring(3));
+ } else {
+ deleteTasksBuilder.append(sql);
+ }
return this;
}
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/00b3d7b62d7f47778ab8b43bc16…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/00b3d7b62d7f47778ab8b43bc16…
You're receiving this email because of your account on gitlab.com.
1
0
16 Sep '18
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
ff0569e3 by Tony CHEMIT at 2018-09-16T20:43:55Z
update changelog
- - - - -
5048b896 by Tony CHEMIT at 2018-09-16T20:43:59Z
add apache doc
- - - - -
698d4026 by Tony CHEMIT at 2018-09-16T20:43:59Z
Visualisation des données du livre de bord sur la carte - Closes #902
- - - - -
30 changed files:
- .mvn/gitlab-cache/milestones/532584-issues.json
- + .mvn/gitlab-cache/milestones/644883-artifacts.json
- .mvn/gitlab-cache/milestones/644883-issues.json
- .mvn/gitlab-cache/milestones/644883.json
- + .mvn/gitlab-cache/milestones/647608-issues.json
- + .mvn/gitlab-cache/milestones/647608.json
- CHANGELOG.md
- client/src/main/java/fr/ird/observe/client/ui/ObserveKeyStrokes.java
- client/src/main/java/fr/ird/observe/client/ui/content/data/longline/TripLonglineUIHandler.java
- client/src/main/java/fr/ird/observe/client/ui/content/data/seine/TripSeineUIHandler.java
- client/src/main/java/fr/ird/observe/client/ui/util/tripMap/TripMapContentBuilder.java
- client/src/main/java/fr/ird/observe/client/ui/util/tripMap/TripMapUI.jaxx
- client/src/main/java/fr/ird/observe/client/ui/util/tripMap/TripMapUI.jcss
- client/src/main/java/fr/ird/observe/client/ui/util/tripMap/TripMapUIHandler.java
- client/src/main/map/style.xml
- 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/java/fr/ird/observe/dto/data/TripMapPoint.java
- + dto/src/main/java/fr/ird/observe/dto/data/TripMapPointType.java
- 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
- persistence/src/main/java/fr/ird/observe/entities/longline/SampleLogbooks.java
- persistence/src/main/java/fr/ird/observe/entities/longline/TripLonglineTopiaDao.java
- pom.xml
- services-local/src/main/java/fr/ird/observe/services/local/service/data/longline/TripLonglineServiceLocal.java
- services/src/main/java/fr/ird/observe/services/service/data/longline/TripLonglineService.java
- src/site/markdown/administration-web.md.vm
Changes:
=====================================
.mvn/gitlab-cache/milestones/532584-issues.json
=====================================
@@ -392,5 +392,54 @@
"state": "closed",
"updatedAt": "Sep 15, 2018 1:54:06 PM",
"createdAt": "Mar 27, 2018 1:11:48 PM"
+ },
+ {
+ "id": 9960494,
+ "iid": 902,
+ "projectId": 2722779,
+ "title": "Visualisation des données du livre de bord sur la carte",
+ "description": "En LL, La carte trace actuellement les coups de pêche de la marée d’observation. \n\nOn y ajoutera 2 cases à cocher permettant de choisir quelles données afficher :\n * Données d’observation\n * Données du logbook\n\nLa superposition des 2 traces sera donc possible.\n\nChaque case sera grisée si l’information n’est pas disponible.\n\nLa carte LL actuelle montre les aires de pêche, pas la trace du bateau.",
+ "labels": [
+ "Evolution",
+ "IRD-2018-01-V8"
+ ],
+ "milestone": {
+ "id": 532584,
+ "iid": 114,
+ "projectId": 2722779,
+ "groupId": 0,
+ "title": "8.0-alpha-3",
+ "description": "Première partie du troisième lot du contrat IRD-2018-01-V8.\r\ncontient les nouveaux écrans, mais aucune des fonctionnalités avancées.",
+ "dueDate": "Sep 15, 2018 2:00:00 AM",
+ "startDate": "May 24, 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": "opened",
+ "updatedAt": "Sep 16, 2018 10:19:42 PM",
+ "createdAt": "Mar 27, 2018 12:31:34 PM"
}
]
\ No newline at end of file
=====================================
.mvn/gitlab-cache/milestones/644883-artifacts.json
=====================================
@@ -0,0 +1,12 @@
+[
+ {
+ "name": "Application",
+ "filename": "observe-7.0-RC-19.zip",
+ "url": "https://ultreia.io/release/observe-7.0-RC-19.zip"
+ },
+ {
+ "name": "Serveur",
+ "filename": "observe-7.0-RC-19.war",
+ "url": "https://ultreia.io/release/observe-7.0-RC-19.war"
+ }
+]
\ No newline at end of file
=====================================
.mvn/gitlab-cache/milestones/644883-issues.json
=====================================
@@ -1 +1,52 @@
-[]
\ No newline at end of file
+[
+ {
+ "id": 13673624,
+ "iid": 1038,
+ "projectId": 2722779,
+ "title": "[PS] Ajout de racourcis clavier sur le formulaire des systèmes observés",
+ "description": "Idéalement, on nous demande des racourcis clavier supplémentaires sur les flêches \u003c- et -\u003e du formaulaire PS systèmes observés :\n\n\n\nEffectivement cela pourrait pas mal fluidifier l\u0027ajout d\u0027éléments.",
+ "labels": [
+ "Bas",
+ "Contrat Code Lutin-2016",
+ "Evolution"
+ ],
+ "milestone": {
+ "id": 644883,
+ "iid": 122,
+ "projectId": 2722779,
+ "groupId": 0,
+ "title": "7.0-RC-19",
+ "description": "",
+ "dueDate": "Sep 16, 2018 2:00:00 AM",
+ "startDate": "Sep 14, 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": 1111318,
+ "_username": "pcauquil",
+ "_name": "Pascal Cauquil",
+ "_state": "active",
+ "_darkScheme": false,
+ "_isAdmin": false,
+ "_canCreateGroup": false,
+ "_canCreateProject": false,
+ "_canCreateTeam": false,
+ "_avatarUrl": "https://secure.gravatar.com/avatar/b4ae117bd93e10d96298fa4d885208ea?s\u003d…"
+ },
+ "state": "closed",
+ "updatedAt": "Sep 16, 2018 5:10:02 PM",
+ "createdAt": "Aug 24, 2018 12:25:25 PM"
+ }
+]
\ No newline at end of file
=====================================
.mvn/gitlab-cache/milestones/644883.json
=====================================
@@ -4,5 +4,8 @@
"projectId": 2722779,
"groupId": 0,
"title": "7.0-RC-19",
- "state": "active"
+ "description": "",
+ "dueDate": "Sep 16, 2018 2:00:00 AM",
+ "startDate": "Sep 14, 2018 2:00:00 AM",
+ "state": "closed"
}
\ No newline at end of file
=====================================
.mvn/gitlab-cache/milestones/647608-issues.json
=====================================
@@ -0,0 +1 @@
+[]
\ No newline at end of file
=====================================
.mvn/gitlab-cache/milestones/647608.json
=====================================
@@ -0,0 +1,8 @@
+{
+ "id": 647608,
+ "iid": 123,
+ "projectId": 2722779,
+ "groupId": 0,
+ "title": "7.0-RC-20",
+ "state": "active"
+}
\ No newline at end of file
=====================================
CHANGELOG.md
=====================================
@@ -1,7 +1,7 @@
# ObServe changelog
* Author [Tony Chemit](mailto:dev@tchemit.fr)
- * Last generated at 2018-09-15 13:57.
+ * Last generated at 2018-09-16 22:22.
## 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.
@@ -14,6 +14,7 @@ Première partie du troisième lot du contrat IRD-2018-01-V8. contient
### Issues
* [[Evolution 578]](https://gitlab.com/ultreiaio/ird-observe/issues/578) **[LL] Implanter le formulaire logbook** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
+ * [[Evolution 902]](https://gitlab.com/ultreiaio/ird-observe/issues/902) **Visualisation des données du livre de bord sur la carte** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
* [[Evolution 905]](https://gitlab.com/ultreiaio/ird-observe/issues/905) **Adaptation de l'arbre de navigation** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
* [[Evolution 907]](https://gitlab.com/ultreiaio/ird-observe/issues/907) **Ajout de la donnée observe_longline.ActivityLogbook** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
* [[Evolution 909]](https://gitlab.com/ultreiaio/ird-observe/issues/909) **Ajout de la donnée observe_longline.SetLogbook** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
@@ -67,6 +68,17 @@ Premier lot du contrat IRD-2018-01-V8
* [[Evolution 922]](https://gitlab.com/ultreiaio/ird-observe/issues/922) **Ajoute le référentiel observe_common.DataQuality sur les données existantes** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
* [[Evolution 950]](https://gitlab.com/ultreiaio/ird-observe/issues/950) **Renommage de la classe seine.WeightCategory en seine.WeightCategorySeine** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
+## Version [7.0-RC-19](https://gitlab.com/ultreiaio/ird-observe/milestones/122)
+
+**Closed at 2018-09-16.**
+
+### Download
+* [Application (observe-7.0-RC-19.zip)](https://ultreia.io/release/observe-7.0-RC-19.zip)
+* [Serveur (observe-7.0-RC-19.war)](https://ultreia.io/release/observe-7.0-RC-19.war)
+
+### Issues
+ * [[Evolution 1038]](https://gitlab.com/ultreiaio/ird-observe/issues/1038) **[PS] Ajout de racourcis clavier sur le formulaire des systèmes observés** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
+
## Version [7.0-RC-18](https://gitlab.com/ultreiaio/ird-observe/milestones/121)
**Closed at 2018-09-12.**
=====================================
client/src/main/java/fr/ird/observe/client/ui/ObserveKeyStrokes.java
=====================================
@@ -64,6 +64,8 @@ public abstract class ObserveKeyStrokes {
public static final KeyStroke KEY_STROKE_NAVIGATION_CONFIGURE = KeyStroke.getKeyStroke("ctrl pressed F1");
public static final KeyStroke KEY_STROKE_SHOW_SEINE = KeyStroke.getKeyStroke("ctrl pressed F2");
public static final KeyStroke KEY_STROKE_SHOW_LONGLINE = KeyStroke.getKeyStroke("ctrl pressed F3");
+ public static final KeyStroke KEY_STROKE_SHOW_LONGLINE_OBS = KeyStroke.getKeyStroke("ctrl pressed F2");
+ public static final KeyStroke KEY_STROKE_SHOW_LONGLINE_LOGBOOK = KeyStroke.getKeyStroke("ctrl pressed F3");
public static final KeyStroke KEY_STROKE_SHOW_REFERENTIAL = KeyStroke.getKeyStroke("ctrl pressed F4");
public static final KeyStroke KEY_STROKE_SHOW_EMPTY_PROGRAM = KeyStroke.getKeyStroke("ctrl pressed F5");
public static final KeyStroke KEY_STROKE_CONFIGURE_LOCAL_SOURCE = KeyStroke.getKeyStroke("ctrl pressed L");
=====================================
client/src/main/java/fr/ird/observe/client/ui/content/data/longline/TripLonglineUIHandler.java
=====================================
@@ -119,7 +119,8 @@ class TripLonglineUIHandler extends ContentOpenableUIHandler<TripLonglineDto, Tr
tripMap.getHandler().setConfig(config);
tripMap.getHandler().init(ui.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW));
-
+ tripMap.addPropertyChangeListener(TripMapUI.PROPERTY_SHOW_OBSERVATION, e -> updateMapModel());
+ tripMap.addPropertyChangeListener(TripMapUI.PROPERTY_SHOW_LOGBOOK, e -> updateMapModel());
getUi().getMainTabbedPane().addChangeListener(e -> {
JTabbedPane tripLonglineTabPane = (JTabbedPane) e.getSource();
TripLonglineUI ui1 = getUi();
@@ -128,17 +129,7 @@ class TripLonglineUIHandler extends ContentOpenableUIHandler<TripLonglineDto, Tr
ui1.getActions().setVisible(false);
if (buildTripMap) {
- SwingUtilities.invokeLater(() -> {
- ObserveSwingApplicationContext.get().getMainUI().getModel().setBusy(true);
- try {
- TripLonglineUI ui11 = getUi();
- TripMapUI tripMap11 = ui11.getTripMap();
- TripMapDto tripLonglineMap = getTripLonglineService().getTripLonglineMap(getSelectedId());
- tripMap11.getHandler().doOpenMap(tripLonglineMap);
- } finally {
- ObserveSwingApplicationContext.get().getMainUI().getModel().setBusy(false);
- }
- });
+ buildTripMap();
buildTripMap = false;
}
@@ -156,6 +147,28 @@ class TripLonglineUIHandler extends ContentOpenableUIHandler<TripLonglineDto, Tr
ui.getErrorTableModel().addTableModelListener(computeTabValidStateListener);
}
+ private void buildTripMap() {
+ SwingUtilities.invokeLater(() -> {
+ ObserveSwingApplicationContext.get().getMainUI().getModel().setBusy(true);
+ try {
+ TripLonglineUI ui11 = getUi();
+ TripMapUI tripMap11 = ui11.getTripMap();
+ Boolean showObservation = tripMap11.isShowObservation();
+ Boolean showLogbook = tripMap11.isShowLogbook();
+ log.info(String.format("Ask to build map: show observation? %s, show logbook? %s", showObservation, showLogbook));
+ TripMapDto tripLonglineMap = getTripLonglineService().getTripLonglineMap(getSelectedId(), showObservation, showLogbook);
+ tripMap11.getHandler().doOpenMap(tripLonglineMap);
+ } finally {
+ ObserveSwingApplicationContext.get().getMainUI().getModel().setBusy(false);
+ }
+ });
+ }
+
+ private void updateMapModel() {
+ ui.getTripMap().getHandler().doCloseMap();
+ buildTripMap();
+ }
+
@Override
public void openUI() {
super.openUI();
@@ -260,7 +273,6 @@ class TripLonglineUIHandler extends ContentOpenableUIHandler<TripLonglineDto, Tr
@Override
protected int getOpenablePosition(String parentId, TripLonglineDto bean) {
-
return getTripLonglineService().getTripLonglinePositionInProgram(parentId, bean.getId());
}
=====================================
client/src/main/java/fr/ird/observe/client/ui/content/data/seine/TripSeineUIHandler.java
=====================================
@@ -89,6 +89,8 @@ class TripSeineUIHandler extends ContentOpenableUIHandler<TripSeineDto, TripSein
super.afterInit(ui);
TripMapUI tripMap = ui.getTripMap();
+ tripMap.getConfig().setVisible(false);
+ SwingUtilities.invokeLater(tripMap::validate);
ClientConfig config = ObserveSwingApplicationContext.get().getConfig();
tripMap.getHandler().setConfig(config);
=====================================
client/src/main/java/fr/ird/observe/client/ui/util/tripMap/TripMapContentBuilder.java
=====================================
@@ -10,12 +10,12 @@ package fr.ird.observe.client.ui.util.tripMap;
* 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>.
@@ -77,10 +77,12 @@ import static org.nuiton.i18n.I18n.t;
public class TripMapContentBuilder {
public static final String TRIP_LINES_LAYER_NAME = "Trip lines";
- public static final String TRIP_LONGLINE_FISHING_ZONE_LAYER_NAME = "Trip longline zone";
- public static final String TRIP_LONGLINE_LINE_LAYER_NAME = "Trip longline line";
+ public static final String TRIP_LONGLINE_OBS_FISHING_ZONE_LAYER_NAME = "Trip longline obs zone";
+ public static final String TRIP_LONGLINE_OBS_LINE_LAYER_NAME = "Trip longline obs line";
+ public static final String TRIP_LONGLINE_LOGBOOK_FISHING_ZONE_LAYER_NAME = "Trip longline logbook zone";
+ public static final String TRIP_LONGLINE_LOGBOOK_LINE_LAYER_NAME = "Trip longline logbook line";
public static final String TRIP_POINTS_LAYER_NAME = "Trip points";
-
+ public static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("dd/MM");
protected static final Set<TripMapPointType> TRIP_MAP_POINT_TYPES_IN_LEGEND = ImmutableSet.of(
TripMapPointType.seineActivityInHarbour,
TripMapPointType.seineActivityWithFreeSchoolType,
@@ -91,13 +93,18 @@ public class TripMapContentBuilder {
TripMapPointType.longlineActivityObsWithHaulingStart,
TripMapPointType.longlineActivityObsWithHaulingEnd,
TripMapPointType.longlineActivityObsWithStation,
- TripMapPointType.longlineActivityObsWithInteraction);
-
- public static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("dd/MM");
-
- protected StyledLayerDescriptor styledLayerDescriptor;
+ TripMapPointType.longlineActivityObsWithInteraction,
+ TripMapPointType.longlineActivityLogbookInHarbour,
+ TripMapPointType.longlineActivityLogbookWithSettingStart,
+ TripMapPointType.longlineActivityLogbookWithSettingEnd,
+ TripMapPointType.longlineActivityLogbookWithHaulingStart,
+ TripMapPointType.longlineActivityLogbookWithHaulingEnd,
+ TripMapPointType.longlineActivityLogbookWithStation,
+ TripMapPointType.longlineActivityLogbookWithInteraction
+ );
protected final MapContent mapContent;
protected final List<ObserveMapPaneLegendItem> legendItems;
+ protected StyledLayerDescriptor styledLayerDescriptor;
public TripMapContentBuilder() {
mapContent = new MapContent();
@@ -224,7 +231,7 @@ public class TripMapContentBuilder {
}
- public void addLonglineFishingZone(List<TripMapPoint> tripMapPoints) throws FactoryException {
+ public void addLonglineObsFishingZone(List<TripMapPoint> tripMapPoints) throws FactoryException {
GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();
SimpleFeatureTypeBuilder polygonFeatureTypeBuilder = new SimpleFeatureTypeBuilder();
@@ -266,13 +273,61 @@ public class TripMapContentBuilder {
}
if (!polygonsFeatures.isEmpty()) {
- Style styleLines = findStyle(styledLayerDescriptor, TRIP_LONGLINE_FISHING_ZONE_LAYER_NAME, null);
- Layer layerLines = new FeatureLayer(polygonsFeatures, styleLines, TRIP_LONGLINE_FISHING_ZONE_LAYER_NAME);
+ Style styleLines = findStyle(styledLayerDescriptor, TRIP_LONGLINE_OBS_FISHING_ZONE_LAYER_NAME, null);
+ Layer layerLines = new FeatureLayer(polygonsFeatures, styleLines, TRIP_LONGLINE_OBS_FISHING_ZONE_LAYER_NAME);
+ mapContent.addLayer(layerLines);
+ }
+ }
+
+ public void addLonglineLogbookFishingZone(List<TripMapPoint> tripMapPoints) throws FactoryException {
+ GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();
+
+ SimpleFeatureTypeBuilder polygonFeatureTypeBuilder = new SimpleFeatureTypeBuilder();
+ polygonFeatureTypeBuilder.setName("longlineFishingZoneBuilder");
+ polygonFeatureTypeBuilder.setCRS(CRS.decode("EPSG:4326", true));
+ polygonFeatureTypeBuilder.add("zone", Polygon.class);
+ polygonFeatureTypeBuilder.add("label", String.class);
+ polygonFeatureTypeBuilder.add("type", String.class);
+
+ SimpleFeatureType polygonFeatureType = polygonFeatureTypeBuilder.buildFeatureType();
+ SimpleFeatureBuilder polygonBuilder = new SimpleFeatureBuilder(polygonFeatureType);
+
+ DefaultFeatureCollection polygonsFeatures = new DefaultFeatureCollection();
+
+ for (int indexPoint = 3; indexPoint < tripMapPoints.size(); indexPoint++) {
+ if (tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.longlineActivityLogbookWithHaulingEnd)
+ && tripMapPoints.get(indexPoint - 1).getType().equals(TripMapPointType.longlineActivityLogbookWithHaulingStart)
+ && tripMapPoints.get(indexPoint - 2).getType().equals(TripMapPointType.longlineActivityLogbookWithSettingEnd)
+ && tripMapPoints.get(indexPoint - 3).getType().equals(TripMapPointType.longlineActivityLogbookWithSettingStart)) {
+
+ Coordinate[] coordinates = {
+ new Coordinate(tripMapPoints.get(indexPoint - 3).getLongitude(), tripMapPoints.get(indexPoint - 3).getLatitude()),
+ new Coordinate(tripMapPoints.get(indexPoint - 2).getLongitude(), tripMapPoints.get(indexPoint - 2).getLatitude()),
+ new Coordinate(tripMapPoints.get(indexPoint - 1).getLongitude(), tripMapPoints.get(indexPoint - 1).getLatitude()),
+ new Coordinate(tripMapPoints.get(indexPoint).getLongitude(), tripMapPoints.get(indexPoint).getLatitude()),
+ new Coordinate(tripMapPoints.get(indexPoint - 3).getLongitude(), tripMapPoints.get(indexPoint - 3).getLatitude())
+ };
+
+
+ Polygon polygon = geometryFactory.createPolygon(coordinates);
+ //polygon = (Polygon) polygon.convexHull(); // permet de transformer un poliqgone croisé en polygon convex
+ polygonBuilder.add(polygon);
+ polygonBuilder.add(DATE_FORMAT.format(tripMapPoints.get(indexPoint - 3).getTime()));
+ polygonBuilder.add("longlineFishingZone");
+ SimpleFeature feature = polygonBuilder.buildFeature(null);
+ polygonsFeatures.add(feature);
+
+ }
+ }
+
+ if (!polygonsFeatures.isEmpty()) {
+ Style styleLines = findStyle(styledLayerDescriptor, TRIP_LONGLINE_LOGBOOK_FISHING_ZONE_LAYER_NAME, null);
+ Layer layerLines = new FeatureLayer(polygonsFeatures, styleLines, TRIP_LONGLINE_LOGBOOK_FISHING_ZONE_LAYER_NAME);
mapContent.addLayer(layerLines);
}
}
- public void addLonglineLine(List<TripMapPoint> tripMapPoints) throws FactoryException {
+ public void addLonglineObsLine(List<TripMapPoint> tripMapPoints) throws FactoryException {
GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();
SimpleFeatureTypeBuilder lineFeatureTypeBuilder = new SimpleFeatureTypeBuilder();
@@ -287,13 +342,14 @@ public class TripMapContentBuilder {
DefaultFeatureCollection linesFeatures = new DefaultFeatureCollection();
List<Coordinate> defaultLineCoordinates = Lists.newLinkedList();
-
+ boolean found = false;
for (int indexPoint = 0; indexPoint < tripMapPoints.size(); indexPoint++) {
if (indexPoint > 1 && tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.longlineActivityObsWithSettingEnd)
&& tripMapPoints.get(indexPoint - 1).getType().equals(TripMapPointType.longlineActivityObsWithSettingStart)
|| tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.longlineActivityObsWithHaulingEnd)
&& tripMapPoints.get(indexPoint - 1).getType().equals(TripMapPointType.longlineActivityObsWithHaulingStart)) {
+ found = true;
Coordinate[] coordinates = {
new Coordinate(tripMapPoints.get(indexPoint - 1).getLongitude(), tripMapPoints.get(indexPoint - 1).getLatitude()),
new Coordinate(tripMapPoints.get(indexPoint).getLongitude(), tripMapPoints.get(indexPoint).getLatitude()),
@@ -332,34 +388,124 @@ public class TripMapContentBuilder {
}
- Style styleLines = findStyle(styledLayerDescriptor, TRIP_LONGLINE_LINE_LAYER_NAME, null);
+ Style styleLines = findStyle(styledLayerDescriptor, TRIP_LONGLINE_OBS_LINE_LAYER_NAME, null);
if (!linesFeatures.isEmpty()) {
- Layer layerLines = new FeatureLayer(linesFeatures, styleLines, TRIP_LONGLINE_LINE_LAYER_NAME);
+ Layer layerLines = new FeatureLayer(linesFeatures, styleLines, TRIP_LONGLINE_OBS_LINE_LAYER_NAME);
mapContent.addLayer(layerLines);
}
- // add line in legend
- LineString line = geometryFactory.createLineString(ObserveMapPaneLegendItem.lineCoordinates());
- lineBuilder.add(line);
- lineBuilder.add("setting");
+ if (found) {
+ // add line in legend
+ LineString line = geometryFactory.createLineString(ObserveMapPaneLegendItem.lineCoordinates());
+ lineBuilder.add(line);
+ lineBuilder.add("setting");
- ObserveMapPaneLegendItem legendTripDay = new ObserveMapPaneLegendItem(
- lineBuilder.buildFeature(null),
- styleLines,
- t("observe.content.map.legend.setting"));
- legendItems.add(legendTripDay);
+ ObserveMapPaneLegendItem legendTripDay = new ObserveMapPaneLegendItem(
+ lineBuilder.buildFeature(null),
+ styleLines,
+ t("observe.content.map.legend.obs.setting"));
+ legendItems.add(legendTripDay);
- line = geometryFactory.createLineString(ObserveMapPaneLegendItem.lineCoordinates());
- lineBuilder.add(line);
- lineBuilder.add("hauling");
+ line = geometryFactory.createLineString(ObserveMapPaneLegendItem.lineCoordinates());
+ lineBuilder.add(line);
+ lineBuilder.add("hauling");
- legendTripDay = new ObserveMapPaneLegendItem(
- lineBuilder.buildFeature(null),
- styleLines,
- t("observe.content.map.legend.hauling"));
- legendItems.add(legendTripDay);
+ legendTripDay = new ObserveMapPaneLegendItem(
+ lineBuilder.buildFeature(null),
+ styleLines,
+ t("observe.content.map.legend.obs.hauling"));
+ legendItems.add(legendTripDay);
+ }
+
+ }
+
+ public void addLonglineLogbookLine(List<TripMapPoint> tripMapPoints) throws FactoryException {
+ GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();
+
+ SimpleFeatureTypeBuilder lineFeatureTypeBuilder = new SimpleFeatureTypeBuilder();
+ lineFeatureTypeBuilder.setName("longlineSettingBuilder");
+ lineFeatureTypeBuilder.setCRS(CRS.decode("EPSG:4326", true));
+ lineFeatureTypeBuilder.add("line", LineString.class);
+ lineFeatureTypeBuilder.add("type", String.class);
+
+ SimpleFeatureType lineFeatureType = lineFeatureTypeBuilder.buildFeatureType();
+ SimpleFeatureBuilder lineBuilder = new SimpleFeatureBuilder(lineFeatureType);
+
+ DefaultFeatureCollection linesFeatures = new DefaultFeatureCollection();
+
+ List<Coordinate> defaultLineCoordinates = Lists.newLinkedList();
+ boolean found = false;
+ for (int indexPoint = 0; indexPoint < tripMapPoints.size(); indexPoint++) {
+ if (indexPoint > 1 && tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.longlineActivityLogbookWithSettingEnd)
+ && tripMapPoints.get(indexPoint - 1).getType().equals(TripMapPointType.longlineActivityLogbookWithSettingStart)
+ || tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.longlineActivityLogbookWithHaulingEnd)
+ && tripMapPoints.get(indexPoint - 1).getType().equals(TripMapPointType.longlineActivityLogbookWithHaulingStart)) {
+ found = true;
+ Coordinate[] coordinates = {
+ new Coordinate(tripMapPoints.get(indexPoint - 1).getLongitude(), tripMapPoints.get(indexPoint - 1).getLatitude()),
+ new Coordinate(tripMapPoints.get(indexPoint).getLongitude(), tripMapPoints.get(indexPoint).getLatitude()),
+ };
+
+ boolean setting = tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.longlineActivityLogbookWithSettingEnd);
+ LineString lineString = geometryFactory.createLineString(coordinates);
+ lineBuilder.add(lineString);
+ lineBuilder.add(setting ? "setting" : "hauling");
+ SimpleFeature feature = lineBuilder.buildFeature(null);
+ linesFeatures.add(feature);
+
+ defaultLineCoordinates.clear();
+ }
+
+ if (!(tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.longlineActivityLogbookWithSettingEnd)
+ || tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.longlineActivityLogbookWithHaulingStart))) {
+
+ defaultLineCoordinates.add(new Coordinate(tripMapPoints.get(indexPoint).getLongitude(), tripMapPoints.get(indexPoint).getLatitude()));
+
+ }
+
+ if ((tripMapPoints.get(indexPoint).getType().equals(TripMapPointType.longlineActivityLogbookWithSettingStart)
+ || indexPoint == tripMapPoints.size() - 1) && defaultLineCoordinates.size() > 1) {
+
+ LineString lineString = geometryFactory.createLineString(defaultLineCoordinates.toArray(new Coordinate[0]));
+ lineBuilder.add(lineString);
+ lineBuilder.add("trip");
+ SimpleFeature feature = lineBuilder.buildFeature(null);
+ linesFeatures.add(feature);
+
+ defaultLineCoordinates.clear();
+
+ }
+ }
+ if (found) {
+ Style styleLines = findStyle(styledLayerDescriptor, TRIP_LONGLINE_LOGBOOK_LINE_LAYER_NAME, null);
+ if (!linesFeatures.isEmpty()) {
+ Layer layerLines = new FeatureLayer(linesFeatures, styleLines, TRIP_LONGLINE_LOGBOOK_LINE_LAYER_NAME);
+ mapContent.addLayer(layerLines);
+ }
+
+ // add line in legend
+ LineString line = geometryFactory.createLineString(ObserveMapPaneLegendItem.lineCoordinates());
+ lineBuilder.add(line);
+ lineBuilder.add("setting");
+
+ ObserveMapPaneLegendItem legendTripDay = new ObserveMapPaneLegendItem(
+ lineBuilder.buildFeature(null),
+ styleLines,
+ t("observe.content.map.legend.logbook.setting"));
+ legendItems.add(legendTripDay);
+
+ line = geometryFactory.createLineString(ObserveMapPaneLegendItem.lineCoordinates());
+ lineBuilder.add(line);
+ lineBuilder.add("hauling");
+
+ legendTripDay = new ObserveMapPaneLegendItem(
+ lineBuilder.buildFeature(null),
+ styleLines,
+ t("observe.content.map.legend.logbook.hauling"));
+ legendItems.add(legendTripDay);
+ }
}
=====================================
client/src/main/java/fr/ird/observe/client/ui/util/tripMap/TripMapUI.jaxx
=====================================
@@ -30,12 +30,20 @@
</import>
<CardLayout id="contentLayout"/>
- <JToolBar constraints="BorderLayout.NORTH">
- <JButton id='zoomIt'/>
- <JButton id='zoomPlus'/>
- <JButton id='zoomMoins'/>
- <JButton id='exportPng'/>
- </JToolBar>
+ <Boolean id="showObservation" javaBean="true"/>
+ <Boolean id="showLogbook" javaBean="true"/>
+ <JPanel constraints="BorderLayout.NORTH" layout="{new BorderLayout()}">
+ <JToolBar constraints="BorderLayout.CENTER">
+ <JButton id='zoomIt'/>
+ <JButton id='zoomPlus'/>
+ <JButton id='zoomMoins'/>
+ <JButton id='exportPng'/>
+ </JToolBar>
+ <JPanel id="config" constraints="BorderLayout.SOUTH" layout="{new GridLayout(1,0)}">
+ <JCheckBox id="showObservationEditor" onItemStateChanged='setShowObservation(showObservationEditor.isSelected())'/>
+ <JCheckBox id="showLogbookEditor" onItemStateChanged='setShowLogbook(showLogbookEditor.isSelected())'/>
+ </JPanel>
+ </JPanel>
<JPanel id="content" layout="{contentLayout}" constraints="BorderLayout.CENTER">
<JLabel id="waitLoadingLabel"/>
=====================================
client/src/main/java/fr/ird/observe/client/ui/util/tripMap/TripMapUI.jcss
=====================================
@@ -42,3 +42,13 @@
#exportPng {
_observeAction:{ExportPngUIAction.ACTION_NAME};
}
+
+#showObservationEditor {
+ text: "observe.content.map.showObservation";
+ selected:{isShowObservation()};
+}
+
+#showLogbookEditor {
+ text: "observe.content.map.showLogbook";
+ selected:{isShowLogbook()};
+}
\ No newline at end of file
=====================================
client/src/main/java/fr/ird/observe/client/ui/util/tripMap/TripMapUIHandler.java
=====================================
@@ -10,12 +10,12 @@ package fr.ird.observe.client.ui.util.tripMap;
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/gpl-3.0.html>.
@@ -26,13 +26,14 @@ import com.google.common.collect.Lists;
import fr.ird.observe.client.ObserveSwingApplicationContext;
import fr.ird.observe.client.ObserveSwingTechnicalException;
import fr.ird.observe.client.configuration.ClientConfig;
+import fr.ird.observe.client.ui.ObserveKeyStrokes;
import fr.ird.observe.client.ui.actions.tripMap.TripMapActionSupport;
import fr.ird.observe.client.ui.content.ObserveActionMap;
import fr.ird.observe.dto.data.TripMapDto;
import fr.ird.observe.dto.data.TripMapPoint;
import fr.ird.observe.spi.DtoModelClasses;
-import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.geotools.geometry.DirectPosition2D;
import org.geotools.geometry.jts.ReferencedEnvelope;
import org.geotools.swing.JMapPane;
@@ -40,9 +41,12 @@ import org.geotools.swing.event.MapPaneEvent;
import org.geotools.swing.event.MapPaneListener;
import org.nuiton.jaxx.runtime.spi.UIHandler;
+import javax.swing.AbstractAction;
import javax.swing.AbstractButton;
+import javax.swing.Action;
import javax.swing.InputMap;
import java.awt.Point;
+import java.awt.event.ActionEvent;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
@@ -112,8 +116,10 @@ public class TripMapUIHandler implements UIHandler<TripMapUI> {
} else if (DtoModelClasses.isLonglineId(tripMapDto.getId())) {
- mapContentBuilder.addLonglineFishingZone(tripMapPoints);
- mapContentBuilder.addLonglineLine(tripMapPoints);
+ mapContentBuilder.addLonglineObsFishingZone(tripMapPoints);
+ mapContentBuilder.addLonglineObsLine(tripMapPoints);
+ mapContentBuilder.addLonglineLogbookFishingZone(tripMapPoints);
+ mapContentBuilder.addLonglineLogbookLine(tripMapPoints);
}
@@ -205,6 +211,12 @@ public class TripMapUIHandler implements UIHandler<TripMapUI> {
mapPane.addMouseListener(mouseMapListener);
mapPane.addMapPaneListener(new TripMapListener());
+ ui.addPropertyChangeListener("showObservation", e -> {
+
+ });
+ ui.addPropertyChangeListener("showLogbook", e -> {
+
+ });
rendererRunning = false;
}
@@ -217,6 +229,27 @@ public class TripMapUIHandler implements UIHandler<TripMapUI> {
init(actionMap, inputMap, ui.zoomPlus);
init(actionMap, inputMap, ui.exportPng);
+ ui.getShowLogbookEditor().setText(ObserveKeyStrokes.suffixTextWithKeyStroke(ui.getShowLogbookEditor().getText(), ObserveKeyStrokes.KEY_STROKE_SHOW_LONGLINE_LOGBOOK));
+ ui.getShowObservationEditor().setText(ObserveKeyStrokes.suffixTextWithKeyStroke(ui.getShowObservationEditor().getText(), ObserveKeyStrokes.KEY_STROKE_SHOW_LONGLINE_OBS));
+
+ AbstractAction observationAction = new AbstractAction() {
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ ui.setShowObservation(!ui.isShowObservation());
+ }
+ };
+ Action logbookAction = new AbstractAction() {
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ ui.setShowLogbook(!ui.isShowLogbook());
+ }
+ };
+ inputMap.put(ObserveKeyStrokes.KEY_STROKE_SHOW_LONGLINE_OBS, "toggleObservation");
+ actionMap.put("toggleObservation", observationAction);
+ inputMap.put(ObserveKeyStrokes.KEY_STROKE_SHOW_LONGLINE_LOGBOOK, "toggleLogbook");
+ actionMap.put("toggleLogbook", logbookAction);
}
public ReferencedEnvelope getTripArea() {
@@ -235,8 +268,28 @@ public class TripMapUIHandler implements UIHandler<TripMapUI> {
this.zoomCenter = zoomCenter;
}
+ protected void init(ObserveActionMap actionMap, InputMap inputMap, AbstractButton editor) {
+ String actionId = (String) editor.getClientProperty(OBSERVE_ACTION);
+
+ // on a trouve une action commune
+ TripMapActionSupport action = (TripMapActionSupport) actionMap.get(actionId);
+ Objects.requireNonNull(action, "action [" + actionId + "] not found for ui " + ui.getClass().getName());
+
+ if (log.isDebugEnabled()) {
+ log.debug("init common action " + actionId);
+ }
+
+ action.setUi(ui);
+ action.initForMainUi(editor, inputMap, actionMap);
+
+ }
+
private class MouseMapListener implements MouseWheelListener, MouseListener, MouseMotionListener {
+ Point2D startPointInWorld;
+ AffineTransform startScreenToWorldTransform;
+ ReferencedEnvelope startDisplayArea;
+
@Override
public void mouseWheelMoved(MouseWheelEvent e) {
int notches = e.getWheelRotation();
@@ -250,10 +303,6 @@ public class TripMapUIHandler implements UIHandler<TripMapUI> {
}
- Point2D startPointInWorld;
- AffineTransform startScreenToWorldTransform;
- ReferencedEnvelope startDisplayArea;
-
@Override
public void mousePressed(MouseEvent e) {
if (e.getButton() == MouseEvent.BUTTON1) {
@@ -360,20 +409,4 @@ public class TripMapUIHandler implements UIHandler<TripMapUI> {
}
}
- protected void init(ObserveActionMap actionMap, InputMap inputMap, AbstractButton editor) {
- String actionId = (String) editor.getClientProperty(OBSERVE_ACTION);
-
- // on a trouve une action commune
- TripMapActionSupport action = (TripMapActionSupport) actionMap.get(actionId);
- Objects.requireNonNull(action, "action [" + actionId + "] not found for ui " + ui.getClass().getName());
-
- if (log.isDebugEnabled()) {
- log.debug("init common action " + actionId);
- }
-
- action.setUi(ui);
- action.initForMainUi(editor, inputMap, actionMap);
-
- }
-
}
=====================================
client/src/main/map/style.xml
=====================================
@@ -88,7 +88,7 @@
</NamedLayer>
<NamedLayer>
- <Name>Trip longline zone</Name>
+ <Name>Trip longline obs zone</Name>
<UserStyle>
<IsDefault>true</IsDefault>
<Title>SLD Cook Book: Simple Line</Title>
@@ -128,7 +128,47 @@
</NamedLayer>
<NamedLayer>
- <Name>Trip longline line</Name>
+ <Name>Trip longline logbook zone</Name>
+ <UserStyle>
+ <IsDefault>true</IsDefault>
+ <Title>SLD Cook Book: Simple Line</Title>
+ <FeatureTypeStyle>
+ <Rule>
+ <Name>Trip day</Name>
+ <PolygonSymbolizer>
+ <Fill>
+ <CssParameter name="fill">#220080</CssParameter>
+ <CssParameter name="fill-opacity">0.5</CssParameter>
+ </Fill>
+ </PolygonSymbolizer>
+ <TextSymbolizer>
+ <Label>
+ <ogc:PropertyName>label</ogc:PropertyName>
+ </Label>
+ <Font>
+ <CssParameter name="font-size">16</CssParameter>
+ <CssParameter name="font-style">normal</CssParameter>
+ <CssParameter name="font-weight">bold</CssParameter>
+ </Font>
+ <LabelPlacement>
+ <PointPlacement>
+ <AnchorPoint>
+ <AnchorPointX>0.5</AnchorPointX>
+ <AnchorPointY>0.5</AnchorPointY>
+ </AnchorPoint>
+ </PointPlacement>
+ </LabelPlacement>
+ <Fill>
+ <CssParameter name="fill">#220000</CssParameter>
+ </Fill>
+ </TextSymbolizer>
+ </Rule>
+ </FeatureTypeStyle>
+ </UserStyle>
+ </NamedLayer>
+
+ <NamedLayer>
+ <Name>Trip longline obs line</Name>
<UserStyle>
<IsDefault>true</IsDefault>
<Title>SLD Cook Book: Simple Line</Title>
@@ -187,6 +227,66 @@
</UserStyle>
</NamedLayer>
+ <NamedLayer>
+ <Name>Trip longline logbook line</Name>
+ <UserStyle>
+ <IsDefault>true</IsDefault>
+ <Title>SLD Cook Book: Simple Line</Title>
+ <FeatureTypeStyle>
+ <Rule>
+ <Name>Trip</Name>
+ <ogc:Filter>
+ <ogc:PropertyIsEqualTo>
+ <ogc:PropertyName>type</ogc:PropertyName>
+ <ogc:Literal>trip</ogc:Literal>
+ </ogc:PropertyIsEqualTo>
+ </ogc:Filter>
+ <LineSymbolizer>
+ <Stroke>
+ <CssParameter name="stroke">#222222</CssParameter>
+ <CssParameter name="stroke-width">3</CssParameter>
+ <CssParameter name="stroke-dasharray">5 7</CssParameter>
+ </Stroke>
+ </LineSymbolizer>
+ </Rule>
+ </FeatureTypeStyle>
+ <FeatureTypeStyle>
+ <Rule>
+ <Name>setting</Name>
+ <ogc:Filter>
+ <ogc:PropertyIsEqualTo>
+ <ogc:PropertyName>type</ogc:PropertyName>
+ <ogc:Literal>setting</ogc:Literal>
+ </ogc:PropertyIsEqualTo>
+ </ogc:Filter>
+ <LineSymbolizer>
+ <Stroke>
+ <CssParameter name="stroke">#00ff00</CssParameter>
+ <CssParameter name="stroke-width">4</CssParameter>
+ </Stroke>
+ </LineSymbolizer>
+ </Rule>
+ </FeatureTypeStyle>
+ <FeatureTypeStyle>
+ <Rule>
+ <Name>hauling</Name>
+ <ogc:Filter>
+ <ogc:PropertyIsEqualTo>
+ <ogc:PropertyName>type</ogc:PropertyName>
+ <ogc:Literal>hauling</ogc:Literal>
+ </ogc:PropertyIsEqualTo>
+ </ogc:Filter>
+ <LineSymbolizer>
+ <Stroke>
+ <CssParameter name="stroke">#ff0000</CssParameter>
+ <CssParameter name="stroke-width">4</CssParameter>
+ </Stroke>
+ </LineSymbolizer>
+ </Rule>
+ </FeatureTypeStyle>
+ </UserStyle>
+ </NamedLayer>
+
<NamedLayer>
<Name>Trip points</Name>
@@ -527,6 +627,259 @@
</TextSymbolizer>
</Rule>
</FeatureTypeStyle>
+ <FeatureTypeStyle>
+ <Rule>
+ <Name>Point longline activity Logbook with setting start</Name>
+ <ogc:Filter>
+ <ogc:PropertyIsEqualTo>
+ <ogc:PropertyName>pointType</ogc:PropertyName>
+ <ogc:Literal>longlineActivityLogbookWithSettingStart</ogc:Literal>
+ </ogc:PropertyIsEqualTo>
+ </ogc:Filter>
+ <PointSymbolizer>
+ <Graphic>
+ <Mark>
+ <WellKnownName>Triangle</WellKnownName>
+ <Fill>
+ <CssParameter name="fill">#00FF00</CssParameter>
+ </Fill>
+ <Stroke>
+ <CssParameter name="stroke">#000000</CssParameter>
+ <CssParameter name="stroke-width">3</CssParameter>
+ </Stroke>
+ </Mark>
+ <Size>16</Size>
+ </Graphic>
+ </PointSymbolizer>
+ </Rule>
+ </FeatureTypeStyle>
+
+
+ <FeatureTypeStyle>
+ <Rule>
+ <Name>Point longline activity Logbook with setting end</Name>
+ <ogc:Filter>
+ <ogc:PropertyIsEqualTo>
+ <ogc:PropertyName>pointType</ogc:PropertyName>
+ <ogc:Literal>longlineActivityLogbookWithSettingEnd</ogc:Literal>
+ </ogc:PropertyIsEqualTo>
+ </ogc:Filter>
+ <PointSymbolizer>
+ <Graphic>
+ <Mark>
+ <WellKnownName>X</WellKnownName>
+ <Fill>
+ <CssParameter name="fill">#00FF00</CssParameter>
+ </Fill>
+ <Stroke>
+ <CssParameter name="stroke">#000000</CssParameter>
+ <CssParameter name="stroke-width">3</CssParameter>
+ </Stroke>
+ </Mark>
+ <Size>14</Size>
+ </Graphic>
+ </PointSymbolizer>
+ </Rule>
+ </FeatureTypeStyle>
+
+
+ <FeatureTypeStyle>
+ <Rule>
+ <Name>Point longline activity Logbook with hauling start</Name>
+ <ogc:Filter>
+ <ogc:PropertyIsEqualTo>
+ <ogc:PropertyName>pointType</ogc:PropertyName>
+ <ogc:Literal>longlineActivityLogbookWithHaulingStart</ogc:Literal>
+ </ogc:PropertyIsEqualTo>
+ </ogc:Filter>
+ <PointSymbolizer>
+ <Graphic>
+ <Mark>
+ <WellKnownName>Triangle</WellKnownName>
+ <Fill>
+ <CssParameter name="fill">#FF0000</CssParameter>
+ </Fill>
+ <Stroke>
+ <CssParameter name="stroke">#000000</CssParameter>
+ <CssParameter name="stroke-width">3</CssParameter>
+ </Stroke>
+ </Mark>
+ <Size>16</Size>
+ </Graphic>
+ </PointSymbolizer>
+ </Rule>
+ </FeatureTypeStyle>
+
+ <FeatureTypeStyle>
+ <Rule>
+ <Name>Point longline activity Logbook with hauling end</Name>
+ <ogc:Filter>
+ <ogc:PropertyIsEqualTo>
+ <ogc:PropertyName>pointType</ogc:PropertyName>
+ <ogc:Literal>longlineActivityLogbookWithHaulingEnd</ogc:Literal>
+ </ogc:PropertyIsEqualTo>
+ </ogc:Filter>
+ <PointSymbolizer>
+ <Graphic>
+ <Mark>
+ <WellKnownName>X</WellKnownName>
+ <Fill>
+ <CssParameter name="fill">#FF0000</CssParameter>
+ </Fill>
+ <Stroke>
+ <CssParameter name="stroke">#000000</CssParameter>
+ <CssParameter name="stroke-width">3</CssParameter>
+ </Stroke>
+ </Mark>
+ <Size>14</Size>
+ </Graphic>
+ </PointSymbolizer>
+ </Rule>
+ </FeatureTypeStyle>
+
+ <FeatureTypeStyle>
+ <Rule>
+ <Name>Point longline activity Logbook in harbour</Name>
+ <ogc:Filter>
+ <ogc:PropertyIsEqualTo>
+ <ogc:PropertyName>pointType</ogc:PropertyName>
+ <ogc:Literal>longlineActivityLogbookInHarbour</ogc:Literal>
+ </ogc:PropertyIsEqualTo>
+ </ogc:Filter>
+ <PointSymbolizer>
+ <Graphic>
+ <Mark>
+ <WellKnownName>Circle</WellKnownName>
+ <Fill>
+ <CssParameter name="fill">#7800f6</CssParameter>
+ </Fill>
+ <Stroke>
+ <CssParameter name="stroke">#000000</CssParameter>
+ <CssParameter name="stroke-width">3</CssParameter>
+ </Stroke>
+ </Mark>
+ <Size>12</Size>
+ </Graphic>
+ </PointSymbolizer>
+ <TextSymbolizer>
+ <Label>
+ <ogc:PropertyName>label</ogc:PropertyName>
+ </Label>
+ <Font>
+ <CssParameter name="font-size">14</CssParameter>
+ <CssParameter name="font-style">normal</CssParameter>
+ <CssParameter name="font-weight">bold</CssParameter>
+ </Font>
+ <LabelPlacement>
+ <PointPlacement>
+ <Displacement>
+ <DisplacementX>5</DisplacementX>
+ <DisplacementY>5</DisplacementY>
+ </Displacement>
+ </PointPlacement>
+ </LabelPlacement>
+ <Fill>
+ <CssParameter name="fill">#000000</CssParameter>
+ </Fill>
+ </TextSymbolizer>
+ </Rule>
+ </FeatureTypeStyle>
+
+ <FeatureTypeStyle>
+ <Rule>
+ <Name>Point longline activity Logbook with interaction</Name>
+ <ogc:Filter>
+ <ogc:PropertyIsEqualTo>
+ <ogc:PropertyName>pointType</ogc:PropertyName>
+ <ogc:Literal>longlineActivityLogbookWithInteraction</ogc:Literal>
+ </ogc:PropertyIsEqualTo>
+ </ogc:Filter>
+ <PointSymbolizer>
+ <Graphic>
+ <Mark>
+ <WellKnownName>Circle</WellKnownName>
+ <Fill>
+ <CssParameter name="fill">#FFFF00</CssParameter>
+ </Fill>
+ <Stroke>
+ <CssParameter name="stroke">#000000</CssParameter>
+ <CssParameter name="stroke-width">3</CssParameter>
+ </Stroke>
+ </Mark>
+ <Size>12</Size>
+ </Graphic>
+ </PointSymbolizer>
+ <TextSymbolizer>
+ <Label>
+ <ogc:PropertyName>label</ogc:PropertyName>
+ </Label>
+ <Font>
+ <CssParameter name="font-size">14</CssParameter>
+ <CssParameter name="font-style">normal</CssParameter>
+ <CssParameter name="font-weight">bold</CssParameter>
+ </Font>
+ <LabelPlacement>
+ <PointPlacement>
+ <Displacement>
+ <DisplacementX>5</DisplacementX>
+ <DisplacementY>5</DisplacementY>
+ </Displacement>
+ </PointPlacement>
+ </LabelPlacement>
+ <Fill>
+ <CssParameter name="fill">#000000</CssParameter>
+ </Fill>
+ </TextSymbolizer>
+ </Rule>
+ </FeatureTypeStyle>
+
+ <FeatureTypeStyle>
+ <Rule>
+ <Name>Point longline activity Logbook with station</Name>
+ <ogc:Filter>
+ <ogc:PropertyIsEqualTo>
+ <ogc:PropertyName>pointType</ogc:PropertyName>
+ <ogc:Literal>longlineActivityLogbookWithStation</ogc:Literal>
+ </ogc:PropertyIsEqualTo>
+ </ogc:Filter>
+ <PointSymbolizer>
+ <Graphic>
+ <Mark>
+ <WellKnownName>star</WellKnownName>
+ <Fill>
+ <CssParameter name="fill">#FFFF00</CssParameter>
+ </Fill>
+ <Stroke>
+ <CssParameter name="stroke">#000000</CssParameter>
+ <CssParameter name="stroke-width">3</CssParameter>
+ </Stroke>
+ </Mark>
+ <Size>16</Size>
+ </Graphic>
+ </PointSymbolizer>
+ <TextSymbolizer>
+ <Label>
+ <ogc:PropertyName>label</ogc:PropertyName>
+ </Label>
+ <Font>
+ <CssParameter name="font-size">14</CssParameter>
+ <CssParameter name="font-style">normal</CssParameter>
+ <CssParameter name="font-weight">bold</CssParameter>
+ </Font>
+ <LabelPlacement>
+ <PointPlacement>
+ <Displacement>
+ <DisplacementX>5</DisplacementX>
+ <DisplacementY>5</DisplacementY>
+ </Displacement>
+ </PointPlacement>
+ </LabelPlacement>
+ <Fill>
+ <CssParameter name="fill">#000000</CssParameter>
+ </Fill>
+ </TextSymbolizer>
+ </Rule>
+ </FeatureTypeStyle>
</UserStyle>
</NamedLayer>
=====================================
client/src/main/resources/i18n/client_en_GB.properties
=====================================
@@ -1497,7 +1497,7 @@ observe.constant.StorageStep.CONFIG_REFERENTIEL.description=Configurer referenti
observe.constant.StorageStep.CONFIRM=Summary
observe.constant.StorageStep.CONFIRM.description=Summary of operations to perform
observe.constant.StorageStep.ROLES=Security
-observe.constant.StorageStep.ROLES.description=Applya security on database roles
+observe.constant.StorageStep.ROLES.description=Apply security on database roles
observe.constant.StorageStep.SELECT_DATA=Data selection
observe.constant.StorageStep.SELECT_DATA.description=Select data to export in backup
observe.content.map.action.exportPng=Export
@@ -1513,12 +1513,16 @@ observe.content.map.export.chooseFile.ok=Exporter
observe.content.map.export.chooseFile.png=PNG image
observe.content.map.export.chooseFile.title=Export map
observe.content.map.export.success=Map exported (%s)
-observe.content.map.legend.hauling=Hauling
-observe.content.map.legend.setting=setting
+observe.content.map.legend.logbook.hauling=Logbook - Hauling
+observe.content.map.legend.logbook.setting=Logbook - setting
+observe.content.map.legend.obs.hauling=Observation - Hauling
+observe.content.map.legend.obs.setting=Observation - setting
observe.content.map.legend.tripBetweenTwoDays=Trip between two days
observe.content.map.legend.tripDay=Day trip
observe.content.map.miles=miles
observe.content.map.north=North
+observe.content.map.showLogbook=Show Logbook data
+observe.content.map.showObservation=Show Observation data
observe.content.map.south=South
observe.content.map.waitLoading=< Please wait while loading the map >
observe.content.map.west=West
=====================================
client/src/main/resources/i18n/client_es_ES.properties
=====================================
@@ -1513,12 +1513,16 @@ observe.content.map.export.chooseFile.ok=Exportar
observe.content.map.export.chooseFile.png=imagen PNG
observe.content.map.export.chooseFile.title=Exportar el mapa
observe.content.map.export.success=Mapa exportada (%s)
-observe.content.map.legend.hauling=Arrastre
-observe.content.map.legend.setting=Calada
+observe.content.map.legend.logbook.hauling=Logbook - Arrastre
+observe.content.map.legend.logbook.setting=Logbook - Calada
+observe.content.map.legend.obs.hauling=Observation - Arrastre
+observe.content.map.legend.obs.setting=Observation - Calada
observe.content.map.legend.tripBetweenTwoDays=Trayecto entre dos días
observe.content.map.legend.tripDay=Trayecto del día
observe.content.map.miles=milles
observe.content.map.north=Norte
+observe.content.map.showLogbook=Show Logbook data \#TODO
+observe.content.map.showObservation=Show Observation data \#TODO
observe.content.map.south=Sur
observe.content.map.waitLoading=< Espere mientras que el mapa se está cargando >
observe.content.map.west=Oeste
=====================================
client/src/main/resources/i18n/client_fr_FR.properties
=====================================
@@ -1513,12 +1513,16 @@ observe.content.map.export.chooseFile.ok=Exporter
observe.content.map.export.chooseFile.png=image PNG
observe.content.map.export.chooseFile.title=Exporter la carte
observe.content.map.export.success=Carte exportée (%s)
-observe.content.map.legend.hauling=Virage
-observe.content.map.legend.setting=Filage
+observe.content.map.legend.logbook.hauling=Livre de bord - Virage
+observe.content.map.legend.logbook.setting=Livre de bord - Filage
+observe.content.map.legend.obs.hauling=Observation - Virage
+observe.content.map.legend.obs.setting=Observation - Filage
observe.content.map.legend.tripBetweenTwoDays=Trajet entre deux jours
observe.content.map.legend.tripDay=Trajet d'une journée
observe.content.map.miles=milles
observe.content.map.north=Nord
+observe.content.map.showLogbook=Voir les données Livre de bord
+observe.content.map.showObservation=Voir les données Observation
observe.content.map.south=Sud
observe.content.map.waitLoading=< Veuillez patienter pendant le chargement de la carte >
observe.content.map.west=Ouest
=====================================
dto/pom.xml
=====================================
@@ -188,6 +188,7 @@
<pattern>observe.constant.@CLASS_SIMPLE_NAME@.@NAME@</pattern>
<enums>
<enum>fr.ird.observe.dto.referential.GearType</enum>
+ <enum>fr.ird.observe.dto.data.TripMapPointType</enum>
<enum>fr.ird.observe.dto.data.seine.DcpComputedValue</enum>
<enum>fr.ird.observe.dto.data.seine.Ownership</enum>
<enum>fr.ird.observe.dto.data.seine.NonTargetCatchComputedValueSource</enum>
=====================================
dto/src/main/java/fr/ird/observe/dto/data/TripMapPoint.java
=====================================
@@ -0,0 +1,79 @@
+package fr.ird.observe.dto.data;
+
+/*-
+ * #%L
+ * ObServe :: Dto
+ * %%
+ * 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%
+ */
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class TripMapPoint implements Serializable {
+
+ public static final String PROPERTY_TIME = "time";
+
+ public static final String PROPERTY_LATITUDE = "latitude";
+
+ public static final String PROPERTY_LONGITUDE = "longitude";
+
+ public static final String PROPERTY_TYPE = "type";
+
+ private static final long serialVersionUID = 1L;
+
+ protected Date time;
+
+ protected float latitude;
+
+ protected float longitude;
+
+ protected TripMapPointType type;
+
+ public Date getTime() {
+ return time;
+ }
+
+ public void setTime(Date time) {
+ this.time = time;
+ }
+
+ public float getLatitude() {
+ return latitude;
+ }
+
+ public void setLatitude(float latitude) {
+ this.latitude = latitude;
+ }
+
+ public float getLongitude() {
+ return longitude;
+ }
+
+ public void setLongitude(float longitude) {
+ this.longitude = longitude;
+ }
+
+ public TripMapPointType getType() {
+ return type;
+ }
+
+ public void setType(TripMapPointType type) {
+ this.type = type;
+ }
+}
=====================================
dto/src/main/java/fr/ird/observe/dto/data/TripMapPointType.java
=====================================
@@ -0,0 +1,61 @@
+package fr.ird.observe.dto.data;
+
+/*-
+ * #%L
+ * ObServe :: Dto
+ * %%
+ * 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%
+ */
+
+/**
+ * <b>Attention : les noms des constantes sont utilisées dans la feuille de style de rendu. Si on change les noms ici,
+ * il faut réimpacter dans le fichier style.xml</b>
+ *
+ * @author Tony Chemit - dev(a)tchemit.fr
+ */
+public enum TripMapPointType {
+
+ seineDepartureHarbour,
+ seineLandingHarbour,
+ seineActivity,
+ seineActivityInHarbour,
+ seineActivityWithFreeSchoolType,
+ seineActivityWithObjectSchoolType,
+
+ longlineDepartureHarbour,
+ longlineLandingHarbour,
+
+ longlineActivityObs,
+ longlineActivityObsInHarbour,
+ longlineActivityObsWithSettingStart,
+ longlineActivityObsWithSettingEnd,
+ longlineActivityObsWithHaulingStart,
+ longlineActivityObsWithHaulingEnd,
+ longlineActivityObsWithInteraction,
+ longlineActivityObsWithStation,
+
+ longlineActivityLogbook,
+ longlineActivityLogbookInHarbour,
+ longlineActivityLogbookWithSettingStart,
+ longlineActivityLogbookWithSettingEnd,
+ longlineActivityLogbookWithHaulingStart,
+ longlineActivityLogbookWithHaulingEnd,
+ longlineActivityLogbookWithInteraction,
+ longlineActivityLogbookWithStation
+
+}
=====================================
dto/src/main/resources/i18n/dto_en_GB.properties
=====================================
@@ -323,6 +323,30 @@ observe.constant.Ownership.unknown=Unknown
observe.constant.SchoolType.libre=Free school type
observe.constant.SchoolType.objet=Object school type
observe.constant.SchoolType.undefined=Undefined school type
+observe.constant.TripMapPointType.longlineActivityLogbook=Logbook - Activity
+observe.constant.TripMapPointType.longlineActivityLogbookInHarbour=Logbook - At Harbour
+observe.constant.TripMapPointType.longlineActivityLogbookWithHaulingEnd=Logbook - Hauling end
+observe.constant.TripMapPointType.longlineActivityLogbookWithHaulingStart=Logbook - Hauling start
+observe.constant.TripMapPointType.longlineActivityLogbookWithInteraction=Logbook - Encounter
+observe.constant.TripMapPointType.longlineActivityLogbookWithSettingEnd=Logbook - Setting end
+observe.constant.TripMapPointType.longlineActivityLogbookWithSettingStart=Logbook - Setting start
+observe.constant.TripMapPointType.longlineActivityLogbookWithStation=Logbook - Station
+observe.constant.TripMapPointType.longlineActivityObs=Observation - Activity
+observe.constant.TripMapPointType.longlineActivityObsInHarbour=Observation - At Harbour
+observe.constant.TripMapPointType.longlineActivityObsWithHaulingEnd=Observation - Hauling end
+observe.constant.TripMapPointType.longlineActivityObsWithHaulingStart=Observation - Hauling start
+observe.constant.TripMapPointType.longlineActivityObsWithInteraction=Observation - Encounter
+observe.constant.TripMapPointType.longlineActivityObsWithSettingEnd=Observation - Setting end
+observe.constant.TripMapPointType.longlineActivityObsWithSettingStart=Observation - Setting start
+observe.constant.TripMapPointType.longlineActivityObsWithStation=Observation - Station
+observe.constant.TripMapPointType.longlineDepartureHarbour=Harbour departure
+observe.constant.TripMapPointType.longlineLandingHarbour=Harbour landing
+observe.constant.TripMapPointType.seineActivity=Activity
+observe.constant.TripMapPointType.seineActivityInHarbour=In harbour
+observe.constant.TripMapPointType.seineActivityWithFreeSchoolType=Free School type
+observe.constant.TripMapPointType.seineActivityWithObjectSchoolType=Object School type
+observe.constant.TripMapPointType.seineDepartureHarbour=Harbour departure
+observe.constant.TripMapPointType.seineLandingHarbour=Harbour landing
observe.constant.TypeTransmittingBuoyOperation.pasDeBalise=No Beacon
observe.constant.TypeTransmittingBuoyOperation.pose=Posing
observe.constant.TypeTransmittingBuoyOperation.recuperation=Grab
=====================================
dto/src/main/resources/i18n/dto_es_ES.properties
=====================================
@@ -321,6 +321,30 @@ observe.constant.Ownership.unknown=Desconocido
observe.constant.SchoolType.libre=Banco libre
observe.constant.SchoolType.objet=Banco a objeto
observe.constant.SchoolType.undefined=Banco indeterminado
+observe.constant.TripMapPointType.longlineActivityLogbook=Logbook - Actividad
+observe.constant.TripMapPointType.longlineActivityLogbookInHarbour=Logbook - En el puerto
+observe.constant.TripMapPointType.longlineActivityLogbookWithHaulingEnd=Logbook - Fin de arrastre
+observe.constant.TripMapPointType.longlineActivityLogbookWithHaulingStart=Logbook - Inicio de arrastre
+observe.constant.TripMapPointType.longlineActivityLogbookWithInteraction=Logbook - Encuentro
+observe.constant.TripMapPointType.longlineActivityLogbookWithSettingEnd=Logbook - Fin de calada
+observe.constant.TripMapPointType.longlineActivityLogbookWithSettingStart=Logbook - Inicio de calada
+observe.constant.TripMapPointType.longlineActivityLogbookWithStation=Logbook - Station
+observe.constant.TripMapPointType.longlineActivityObs=Observation - Actividad
+observe.constant.TripMapPointType.longlineActivityObsInHarbour=Observation - En el puerto
+observe.constant.TripMapPointType.longlineActivityObsWithHaulingEnd=Observation - Fin de arrastre
+observe.constant.TripMapPointType.longlineActivityObsWithHaulingStart=Observation - Inicio de arrastre
+observe.constant.TripMapPointType.longlineActivityObsWithInteraction=Observation - Encuentro
+observe.constant.TripMapPointType.longlineActivityObsWithSettingEnd=Observation - Fin de calada
+observe.constant.TripMapPointType.longlineActivityObsWithSettingStart=Observation - Inicio de calada
+observe.constant.TripMapPointType.longlineActivityObsWithStation=Observation - Station
+observe.constant.TripMapPointType.longlineDepartureHarbour=Puerto de salida
+observe.constant.TripMapPointType.longlineLandingHarbour=Puerto de llegada
+observe.constant.TripMapPointType.seineActivity=Actividad
+observe.constant.TripMapPointType.seineActivityInHarbour=En el puerto
+observe.constant.TripMapPointType.seineActivityWithFreeSchoolType=Banco libre
+observe.constant.TripMapPointType.seineActivityWithObjectSchoolType=Banco a objeto
+observe.constant.TripMapPointType.seineDepartureHarbour=Puerto de salida
+observe.constant.TripMapPointType.seineLandingHarbour=Puerto de llegada
observe.constant.TypeTransmittingBuoyOperation.pasDeBalise=DCP sin baliza
observe.constant.TypeTransmittingBuoyOperation.pose=Colocación de nueva baliza
observe.constant.TypeTransmittingBuoyOperation.recuperation=Recogida de baliza sin regreso al agua
=====================================
dto/src/main/resources/i18n/dto_fr_FR.properties
=====================================
@@ -323,6 +323,30 @@ observe.constant.Ownership.unknown=Inconnue
observe.constant.SchoolType.libre=Banc libre
observe.constant.SchoolType.objet=Banc objet
observe.constant.SchoolType.undefined=Banc indéterminé
+observe.constant.TripMapPointType.longlineActivityLogbook=Livre de bord - point d'activité
+observe.constant.TripMapPointType.longlineActivityLogbookInHarbour=Livre de bord - Au port
+observe.constant.TripMapPointType.longlineActivityLogbookWithHaulingEnd=Livre de bord - Fin de virage
+observe.constant.TripMapPointType.longlineActivityLogbookWithHaulingStart=Livre de bord - Début de virage
+observe.constant.TripMapPointType.longlineActivityLogbookWithInteraction=Livre de bord - Rencontre
+observe.constant.TripMapPointType.longlineActivityLogbookWithSettingEnd=Livre de bord - Fin de filage
+observe.constant.TripMapPointType.longlineActivityLogbookWithSettingStart=Livre de bord - Début de filage
+observe.constant.TripMapPointType.longlineActivityLogbookWithStation=Livre de bord - Station océanographique
+observe.constant.TripMapPointType.longlineActivityObs=Observation - point d'activité
+observe.constant.TripMapPointType.longlineActivityObsInHarbour=Observation - Au port
+observe.constant.TripMapPointType.longlineActivityObsWithHaulingEnd=Observation - Fin de virage
+observe.constant.TripMapPointType.longlineActivityObsWithHaulingStart=Observation - Début de virage
+observe.constant.TripMapPointType.longlineActivityObsWithInteraction=Observation - Rencontre
+observe.constant.TripMapPointType.longlineActivityObsWithSettingEnd=Observation - Fin de filage
+observe.constant.TripMapPointType.longlineActivityObsWithSettingStart=Observation - Début de filage
+observe.constant.TripMapPointType.longlineActivityObsWithStation=Observation - Station océanographique
+observe.constant.TripMapPointType.longlineDepartureHarbour=Port de départ
+observe.constant.TripMapPointType.longlineLandingHarbour=Port d'arrivée
+observe.constant.TripMapPointType.seineActivity=point d'activité
+observe.constant.TripMapPointType.seineActivityInHarbour=Au port
+observe.constant.TripMapPointType.seineActivityWithFreeSchoolType=Banc libre
+observe.constant.TripMapPointType.seineActivityWithObjectSchoolType=Banc objet
+observe.constant.TripMapPointType.seineDepartureHarbour=Port de départ
+observe.constant.TripMapPointType.seineLandingHarbour=Port d'arrivée
observe.constant.TypeTransmittingBuoyOperation.pasDeBalise=Pas de balise liée au DCP
observe.constant.TypeTransmittingBuoyOperation.pose=Pose d'une nouvelle balise
observe.constant.TypeTransmittingBuoyOperation.recuperation=Récupération d'une balise sans remise à l'eau
=====================================
persistence/src/main/java/fr/ird/observe/entities/longline/SampleLogbooks.java
=====================================
@@ -1,5 +1,27 @@
package fr.ird.observe.entities.longline;
+/*-
+ * #%L
+ * ObServe :: Persistence
+ * %%
+ * 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%
+ */
+
import java.util.Comparator;
import java.util.Date;
import java.util.List;
=====================================
persistence/src/main/java/fr/ird/observe/entities/longline/TripLonglineTopiaDao.java
=====================================
@@ -10,12 +10,12 @@ package fr.ird.observe.entities.longline;
* 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>.
@@ -42,9 +42,11 @@ import java.util.List;
public class TripLonglineTopiaDao extends AbstractTripLonglineTopiaDao<TripLongline> {
- public static final String ACTIVITY_INTERACTION_ID = "fr.ird.observe.entities.referentiel.longline.VesselActivityLongline#1239832686138#0.4";
+ public static final String ACTIVITY_OBS_INTERACTION_ID = "fr.ird.observe.entities.referentiel.longline.VesselActivityLongline#1239832686138#0.4";
+ public static final String ACTIVITY_LOGBOOK_INTERACTION_ID = "fr.ird.observe.entities.referentiel.longline.VesselActivityLongline#1239832686138#0.4";
- public static final String ACTIVITY_STATION_ID = "fr.ird.observe.entities.referentiel.longline.VesselActivityLongline#1239832686138#0.3";
+ public static final String ACTIVITY_OBS_STATION_ID = "fr.ird.observe.entities.referentiel.longline.VesselActivityLongline#1239832686138#0.3";
+ public static final String ACTIVITY_LOGBOOK_STATION_ID = "fr.ird.observe.entities.referentiel.longline.VesselActivityLongline#1239832686138#0.3";
public int findPositionByProgramId(String programId, String tripId) {
int result = 0;
@@ -61,7 +63,7 @@ public class TripLonglineTopiaDao extends AbstractTripLonglineTopiaDao<TripLongl
return -1;
}
- public LinkedHashSet<TripMapPoint> extractTripMapActivityPoints(String tripId) {
+ public LinkedHashSet<TripMapPoint> extractTripMapActivityPoints(String tripId, boolean addObservation, boolean addLogbook) {
TripLongline tripLongline = forTopiaIdEquals(tripId).findUnique();
@@ -80,11 +82,17 @@ public class TripLonglineTopiaDao extends AbstractTripLonglineTopiaDao<TripLongl
tripMapPoints.add(departurePoint);
}
- // Add Activities
- TripMapActivityPointQuery tripMapActivityPointQuery = new TripMapActivityPointQuery(tripId);
- List<List<TripMapPoint>> results = topiaSqlSupport.findMultipleResult(tripMapActivityPointQuery);
- for (List<TripMapPoint> result : results) {
- tripMapPoints.addAll(result);
+ if (addObservation) {
+ // Add Activities Observation
+ TripMapActivityObsPointQuery tripMapActivityObsPointQuery = new TripMapActivityObsPointQuery(tripId);
+ List<List<TripMapPoint>> results = topiaSqlSupport.findMultipleResult(tripMapActivityObsPointQuery);
+ results.forEach(tripMapPoints::addAll);
+ }
+ if (addLogbook) {
+ // Add Activities Logbook
+ TripMapActivityLogbookPointQuery tripMapActivityLogbookPointQuery = new TripMapActivityLogbookPointQuery(tripId);
+ List<List<TripMapPoint>> results = topiaSqlSupport.findMultipleResult(tripMapActivityLogbookPointQuery);
+ results.forEach(tripMapPoints::addAll);
}
// add landing harbours
@@ -103,7 +111,53 @@ public class TripLonglineTopiaDao extends AbstractTripLonglineTopiaDao<TripLongl
return tripMapPoints;
}
- private static class TripMapActivityPointQuery extends TopiaSqlQuery<List<TripMapPoint>> {
+ public boolean updateEndDate(TripLongline trip) {
+
+ boolean wasUpdated = false;
+
+ // la date de fin theorique (date de la dernière activité de la marée)
+ Date theoricalEndDate = getTheoricalEndDate(trip);
+
+ // la date de fin actuelle
+ Date realEndDate = trip.getEndDate();
+
+ if (realEndDate == null || theoricalEndDate.after(realEndDate)) {
+
+ // on utilise la nouvelle date theorique car l'ancienne n'existe pas
+ // ou est antérieure à la date de fin théoriquue
+ trip.setEndDate(theoricalEndDate);
+ wasUpdated = true;
+ }
+
+ return wasUpdated;
+
+ }
+
+ public Date getTheoricalEndDate(TripLongline trip) {
+
+ Date d;
+
+ Timestamp lastActivityDate = TheoricalEndOfDateSqlQuery.find(topiaSqlSupport, trip.getTopiaId());
+
+ if (lastActivityDate == null) {
+
+ // pas d'activité, donc la date de fin est la date de debut
+ d = trip.getStartDate();
+
+ } else {
+
+ // date de la dernière activité de la marée
+ d = lastActivityDate;
+
+ }
+
+ // on conserve la date epuree (pas de notion de temps dans la date)
+ d = DateUtil.getEndOfDay(d);
+ return d;
+
+ }
+
+ private static class TripMapActivityObsPointQuery extends TopiaSqlQuery<List<TripMapPoint>> {
private static final String SQL = "SELECT" +
" a.timestamp, " +
@@ -130,7 +184,7 @@ public class TripLonglineTopiaDao extends AbstractTripLonglineTopiaDao<TripLongl
protected final String tripId;
- public TripMapActivityPointQuery(String tripId) {
+ public TripMapActivityObsPointQuery(String tripId) {
this.tripId = tripId;
}
@@ -157,9 +211,9 @@ public class TripLonglineTopiaDao extends AbstractTripLonglineTopiaDao<TripLongl
String vesselActivityId = resultSet.getString(4);
if (vesselActivityId == null) {
activity.setType(TripMapPointType.longlineActivityObs);
- } else if (ACTIVITY_INTERACTION_ID.equals(vesselActivityId)) {
+ } else if (ACTIVITY_OBS_INTERACTION_ID.equals(vesselActivityId)) {
activity.setType(TripMapPointType.longlineActivityObsWithInteraction);
- } else if (ACTIVITY_STATION_ID.equals(vesselActivityId)) {
+ } else if (ACTIVITY_OBS_STATION_ID.equals(vesselActivityId)) {
activity.setType(TripMapPointType.longlineActivityObsWithStation);
} else {
activity.setType(TripMapPointType.longlineActivityObs);
@@ -212,50 +266,113 @@ public class TripLonglineTopiaDao extends AbstractTripLonglineTopiaDao<TripLongl
}
}
- public boolean updateEndDate(TripLongline trip) {
+ private static class TripMapActivityLogbookPointQuery extends TopiaSqlQuery<List<TripMapPoint>> {
- boolean wasUpdated = false;
-
- // la date de fin theorique (date de la dernière activité de la marée)
- Date theoricalEndDate = getTheoricalEndDate(trip);
-
- // la date de fin actuelle
- Date realEndDate = trip.getEndDate();
+ private static final String SQL = "SELECT" +
+ " a.timestamp, " +
+ " a.latitude," +
+ " a.longitude," +
+ " a.vesselActivity," +
+ " s.settingStartTimestamp," +
+ " s.settingStartLatitude," +
+ " s.settingStartLongitude," +
+ " s.settingEndTimestamp," +
+ " s.settingEndLatitude," +
+ " s.settingEndLongitude," +
+ " s.haulingStartTimestamp," +
+ " s.haulingStartLatitude," +
+ " s.haulingStartLongitude," +
+ " s.haulingEndTimestamp," +
+ " s.haulingEndLatitude," +
+ " s.haulingEndLongitude" +
+ " FROM observe_longLine.activityLogbook a" +
+ " LEFT OUTER JOIN observe_longLine.setLogbook s" +
+ " ON s.topiaId = a.set" +
+ " WHERE a.trip = ?" +
+ " ORDER BY a.timestamp";
- if (realEndDate == null || theoricalEndDate.after(realEndDate)) {
+ protected final String tripId;
- // on utilise la nouvelle date theorique car l'ancienne n'existe pas
- // ou est antérieure à la date de fin théoriquue
- trip.setEndDate(theoricalEndDate);
- wasUpdated = true;
+ public TripMapActivityLogbookPointQuery(String tripId) {
+ this.tripId = tripId;
}
- return wasUpdated;
+ @Override
+ public PreparedStatement prepareQuery(Connection connection) throws SQLException {
+ PreparedStatement preparedStatement = connection.prepareStatement(SQL);
+ preparedStatement.setString(1, tripId);
+ return preparedStatement;
+ }
- }
+ @Override
+ public List<TripMapPoint> prepareResult(ResultSet resultSet) throws SQLException {
- public Date getTheoricalEndDate(TripLongline trip) {
+ List<TripMapPoint> result = Lists.newLinkedList();
- Date d;
+ if (resultSet.getString(5) == null) {
- Timestamp lastActivityDate = TheoricalEndOfDateSqlQuery.find(topiaSqlSupport, trip.getTopiaId());
+ // activity
+ TripMapPoint activity = new TripMapPoint();
+ activity.setTime(resultSet.getDate(1));
+ activity.setLatitude(resultSet.getFloat(2));
+ activity.setLongitude(resultSet.getFloat(3));
- if (lastActivityDate == null) {
+ String vesselActivityId = resultSet.getString(4);
+ if (vesselActivityId == null) {
+ activity.setType(TripMapPointType.longlineActivityLogbook);
+ } else if (ACTIVITY_LOGBOOK_INTERACTION_ID.equals(vesselActivityId)) {
+ activity.setType(TripMapPointType.longlineActivityLogbookWithInteraction);
+ } else if (ACTIVITY_LOGBOOK_STATION_ID.equals(vesselActivityId)) {
+ activity.setType(TripMapPointType.longlineActivityLogbookWithStation);
+ } else {
+ activity.setType(TripMapPointType.longlineActivityLogbook);
+ }
- // pas d'activité, donc la date de fin est la date de debut
- d = trip.getStartDate();
+ result.add(activity);
+ }
- } else {
+ // settingStart
+ if (resultSet.getString(5) != null) {
+ TripMapPoint settingStart = new TripMapPoint();
+ settingStart.setTime(resultSet.getDate(5));
+ settingStart.setLatitude(resultSet.getFloat(6));
+ settingStart.setLongitude(resultSet.getFloat(7));
+ settingStart.setType(TripMapPointType.longlineActivityLogbookWithSettingStart);
+ result.add(settingStart);
+ }
- // date de la dernière activité de la marée
- d = lastActivityDate;
+ // settingEnd
+ if (resultSet.getString(8) != null) {
+ TripMapPoint settingEnd = new TripMapPoint();
+ settingEnd.setTime(resultSet.getDate(8));
+ settingEnd.setLatitude(resultSet.getFloat(9));
+ settingEnd.setLongitude(resultSet.getFloat(10));
+ settingEnd.setType(TripMapPointType.longlineActivityLogbookWithSettingEnd);
+ result.add(settingEnd);
+ }
- }
+ // haulingStart
+ if (resultSet.getString(11) != null) {
+ TripMapPoint haulingStart = new TripMapPoint();
+ haulingStart.setTime(resultSet.getDate(11));
+ haulingStart.setLatitude(resultSet.getFloat(12));
+ haulingStart.setLongitude(resultSet.getFloat(13));
+ haulingStart.setType(TripMapPointType.longlineActivityLogbookWithHaulingStart);
+ result.add(haulingStart);
+ }
- // on conserve la date epuree (pas de notion de temps dans la date)
- d = DateUtil.getEndOfDay(d);
- return d;
+ // haulingEnd
+ if (resultSet.getString(14) != null) {
+ TripMapPoint haulingEnd = new TripMapPoint();
+ haulingEnd.setTime(resultSet.getDate(14));
+ haulingEnd.setLatitude(resultSet.getFloat(15));
+ haulingEnd.setLongitude(resultSet.getFloat(16));
+ haulingEnd.setType(TripMapPointType.longlineActivityLogbookWithHaulingEnd);
+ result.add(haulingEnd);
+ }
+ return result;
+ }
}
private static class TheoricalEndOfDateSqlQuery extends TopiaSqlQuery<Timestamp> {
=====================================
pom.xml
=====================================
@@ -26,7 +26,7 @@
<parent>
<groupId>io.ultreia.maven</groupId>
<artifactId>pom</artifactId>
- <version>2018.51</version>
+ <version>2018.52</version>
</parent>
<groupId>fr.ird.observe</groupId>
@@ -152,10 +152,10 @@
<maven.build.timestamp.format>dd/MM/yyyy HH:mm z</maven.build.timestamp.format>
<buildDate>${maven.build.timestamp}</buildDate>
- <observeToolkitVersion>4.2</observeToolkitVersion>
+ <observeToolkitVersion>4.3</observeToolkitVersion>
<!--<lib.version.java4all.topia>1.1.1</lib.version.java4all.topia>-->
<!--<lib.version.java4all.eugene>3.0-alpha-22</lib.version.java4all.eugene>-->
- <lib.version.java4all.jaxx>3.0-alpha-35</lib.version.java4all.jaxx>
+ <!--<lib.version.java4all.jaxx>3.0-alpha-35</lib.version.java4all.jaxx>-->
<!--<lib.version.nuiton.topia>3.4.2-SNAPSHOT</lib.version.nuiton.topia>-->
<lib.version.nuiton.validation>3.1</lib.version.nuiton.validation>
<lib.version.java4all.topia>1.1.3</lib.version.java4all.topia>
=====================================
services-local/src/main/java/fr/ird/observe/services/local/service/data/longline/TripLonglineServiceLocal.java
=====================================
@@ -92,8 +92,8 @@ public class TripLonglineServiceLocal extends ObserveServiceLocal implements Tri
}
@Override
- public TripMapDto getTripLonglineMap(String tripLonglineId) {
- LinkedHashSet<TripMapPoint> points = TRIP_LONGLINE_SPI.getDao(getTopiaPersistenceContext()).extractTripMapActivityPoints(tripLonglineId);
+ public TripMapDto getTripLonglineMap(String tripLonglineId, boolean addObservation, boolean addLogbook) {
+ LinkedHashSet<TripMapPoint> points = TRIP_LONGLINE_SPI.getDao(getTopiaPersistenceContext()).extractTripMapActivityPoints(tripLonglineId, addObservation, addLogbook);
return TripMapDtoFactory.of(tripLonglineId, points);
}
=====================================
services/src/main/java/fr/ird/observe/services/service/data/longline/TripLonglineService.java
=====================================
@@ -55,7 +55,7 @@ public interface TripLonglineService extends ObserveService {
@Get
@ReadDataPermission
- TripMapDto getTripLonglineMap(String tripLonglineId);
+ TripMapDto getTripLonglineMap(String tripLonglineId, boolean addObservation, boolean addLogbook);
@Get
@ReadDataPermission
=====================================
src/site/markdown/administration-web.md.vm
=====================================
@@ -135,3 +135,13 @@ Vous pouvez supprimer toutes les sessions utilisateurs via l'adresse suivante :
```
http://localhost:8080/observeweb/admin/resetAuthenticationTokens?adminApiKe… (ou la clef que vous avez configuré)
```
+
+## Configuration Apache
+
+Par défaut le proxy_ajp a un timeout de 5 minutes, il faut augmenter cette valeur sinon les appels dépassant ce temps
+seront rejettés.
+
+Dans le fichier de configuration ``httpd.conf`` ajouter la ligne : (timeout de 1200 secondes = 20 minutes)
+```
+ProxyTimeout 1200
+```
\ No newline at end of file
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/8c6a87a55abf04e2287fe65940…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/8c6a87a55abf04e2287fe65940…
You're receiving this email because of your account on gitlab.com.
1
0