mailman.cloud.codelutin.com
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

Observe-commits

Thread Start a new thread
Download
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
observe-commits@list.forge.codelutin.com

July 2019

  • 1 participants
  • 106 discussions
[Git][ultreiaio/ird-observe][develop-7.x] [PS] Une espèce sans catégorie apparaît à tord dans le formulaire thons capturés - Closes #1367
by Tony CHEMIT 24 Jul '19

24 Jul '19
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe Commits: aaae338b by tchemit at 2019-07-24T16:38:15Z [PS] Une espèce sans catégorie apparaît à tord dans le formulaire thons capturés - Closes #1367 - - - - - 2 changed files: - client-core/src/main/java/fr/ird/observe/client/ui/content/data/seine/TargetCatchUIHandler.java - client-core/src/main/java/fr/ird/observe/client/ui/content/data/seine/TargetDiscardCatchUIHandler.java Changes: ===================================== client-core/src/main/java/fr/ird/observe/client/ui/content/data/seine/TargetCatchUIHandler.java ===================================== @@ -41,19 +41,22 @@ import fr.ird.observe.dto.referential.SpeciesReference; import fr.ird.observe.dto.referential.seine.WeightCategoryHelper; import fr.ird.observe.dto.referential.seine.WeightCategoryReference; import fr.ird.observe.dto.result.SaveResultDto; -import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.nuiton.decorator.Decorator; import org.nuiton.jaxx.runtime.spi.UIHandler; import org.nuiton.jaxx.widgets.select.BeanFilterableComboBox; -import javax.swing.*; +import javax.swing.JComponent; +import javax.swing.JOptionPane; +import javax.swing.JTable; import javax.swing.table.DefaultTableCellRenderer; import java.awt.Component; import java.awt.Container; import java.util.Collections; import java.util.List; import java.util.Set; +import java.util.stream.Collectors; import static io.ultreia.java4all.i18n.I18n.n; import static io.ultreia.java4all.i18n.I18n.t; @@ -72,9 +75,11 @@ public class TargetCatchUIHandler extends ContentTableUIHandler<SetSeineTargetCa addReferentialFilter(TargetCatchDto.PROPERTY_SPECIES, (ReferentialReferencesFilter<SpeciesDto, SpeciesReference>) incomingReferences -> { String speciesListId = ObserveSwingApplicationContext.get().getConfig().getSpeciesListSeineTargetCatchId(); + Set<String> usedSpeciesId = getDataSource().getReferentialReferenceSet(WeightCategoryReference.class).toSet().stream().map(WeightCategoryReference::getSpeciesId).collect(Collectors.toSet()); String tripSeineId = getDataContext().getSelectedTripSeineId(); - List<SpeciesReference> result = getTripSeineService().getSpeciesByListAndTrip(tripSeineId, speciesListId).toList(); - return DtoReferenceCollection.filterEnabled(result); + List<SpeciesReference> allSpecies = getTripSeineService().getSpeciesByListAndTrip(tripSeineId, speciesListId).toList(); + List<SpeciesReference> speciesWithCategory = allSpecies.stream().filter(s -> usedSpeciesId.contains(s.getId())).collect(Collectors.toList()); + return DtoReferenceCollection.filterEnabled(speciesWithCategory); }); } ===================================== client-core/src/main/java/fr/ird/observe/client/ui/content/data/seine/TargetDiscardCatchUIHandler.java ===================================== @@ -58,6 +58,7 @@ import java.util.Collections; import java.util.List; import java.util.Optional; import java.util.Set; +import java.util.stream.Collectors; import static io.ultreia.java4all.i18n.I18n.n; import static io.ultreia.java4all.i18n.I18n.t; @@ -78,9 +79,11 @@ public class TargetDiscardCatchUIHandler extends ContentTableUIHandler<SetSeineT addReferentialFilter(TargetCatchDto.PROPERTY_SPECIES, (ReferentialReferencesFilter<SpeciesDto, SpeciesReference>) incomingReferences -> { String speciesListId = ObserveSwingApplicationContext.get().getConfig().getSpeciesListSeineTargetCatchId(); + Set<String> usedSpeciesId = getDataSource().getReferentialReferenceSet(WeightCategoryReference.class).toSet().stream().map(WeightCategoryReference::getSpeciesId).collect(Collectors.toSet()); String tripSeineId = getDataContext().getSelectedTripSeineId(); - List<SpeciesReference> result = getTripSeineService().getSpeciesByListAndTrip(tripSeineId, speciesListId).toList(); - return DtoReferenceCollection.filterEnabled(result); + List<SpeciesReference> allSpecies = getTripSeineService().getSpeciesByListAndTrip(tripSeineId, speciesListId).toList(); + List<SpeciesReference> speciesWithCategory = allSpecies.stream().filter(s -> usedSpeciesId.contains(s.getId())).collect(Collectors.toList()); + return DtoReferenceCollection.filterEnabled(speciesWithCategory); }); } View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/aaae338b321966ca63197700767… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/aaae338b321966ca63197700767… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop-7.x] Impossible de modifier le champs Species.wormsId - Closes #1357
by Tony CHEMIT 24 Jul '19

24 Jul '19
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe Commits: 4357232a by tchemit at 2019-07-17T15:33:36Z Impossible de modifier le champs Species.wormsId - Closes #1357 - - - - - 2 changed files: - client-core/src/main/java/fr/ird/observe/client/ui/content/ref/common/SpeciesUI.jaxx - client-core/src/main/java/fr/ird/observe/client/ui/content/ref/common/SpeciesUI.jcss Changes: ===================================== client-core/src/main/java/fr/ird/observe/client/ui/content/ref/common/SpeciesUI.jaxx ===================================== @@ -97,7 +97,7 @@ <JPanel layout='{new GridLayout()}'> <JTextField id='homeId'/> <JTextField id='faoCode'/> - <JTextField id='wormsId' onKeyReleased='getBean().setWormsId(Long.valueOf(wormsId.getText()))'/> + <NumberEditor id='wormsId' constructorParams='this' styleClass="long10"/> </JPanel> </cell> </row> ===================================== client-core/src/main/java/fr/ird/observe/client/ui/content/ref/common/SpeciesUI.jcss ===================================== @@ -43,7 +43,8 @@ } #wormsId { - text:{getStringValue(bean.getWormsId())}; + property:{SpeciesDto.PROPERTY_WORMS_ID}; + numberValue:{bean.getWormsId()}; } #scientificLabel { View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/4357232ab8f901bcebc27009748… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/4357232ab8f901bcebc27009748… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop-9] 17 commits: Fix Tdr screen loading
by Tony CHEMIT 24 Jul '19

24 Jul '19
Tony CHEMIT pushed to branch develop-9 at ultreiaio / ird-observe Commits: e27a2789 by tchemit at 2019-07-24T15:42:13Z Fix Tdr screen loading - - - - - 45743b68 by tchemit at 2019-07-24T15:51:13Z fix NonTargetLengthDto decorator - - - - - fbb4e5df by tchemit at 2019-07-24T15:51:27Z [CARTE] Symboles de cartes pour V8 et V9 - Refactor code - See #1343 - - - - - 761fbc11 by tchemit at 2019-07-24T15:54:04Z Réorganisation des données d’observation PS - Réorganisation des captures et échantillons de cible et bycatch observés - See #1254 - - - - - 08165585 by tchemit at 2019-07-24T15:54:04Z Move to new version 9.0-alpha-1 - - - - - 6b76b42c by tchemit at 2019-07-24T15:54:04Z Réorganisation des données d’observation PS - Re localisation dans la hiérarchie - Closes #1252 - - - - - 2b80777c by tchemit at 2019-07-24T15:54:05Z Module 2 (first flush) - - - - - 1d17d493 by tchemit at 2019-07-24T15:54:05Z [PS] Contenu des onglets spécifiques observations et logbooks et le formulaire marée - See #1300 - - - - - ce9795e6 by tchemit at 2019-07-24T15:54:06Z Module 2 - second flush - - - - - cb13336b by tchemit at 2019-07-24T15:54:06Z Report from v8 for ps logbook model - - - - - da107b81 by tchemit at 2019-07-24T15:54:06Z Choix de nouvelles couleurs pour les symboles de la carte LL - Closes #1293 - - - - - 31a514e3 by tchemit at 2019-07-24T15:54:06Z [CARTE] Symboles de cartes pour V8 et V9 - Realign for Ps model - See #1343 - - - - - 8e80132a by tchemit at 2019-07-24T15:54:06Z Consolidation des champs techniques en base - Realing on v9 - See #1353 - - - - - 4af9a9f5 by tchemit at 2019-07-24T15:54:07Z Insertion des lots de débarquements - See #1259 - - - - - 04374e3c by tchemit at 2019-07-24T15:54:07Z Insertion du plan de cuves - See #1260 - - - - - f8defe03 by tchemit at 2019-07-24T15:54:08Z Insertion de l’échantillonnage au port - See #1261 - - - - - 1464aaf4 by tchemit at 2019-07-24T15:54:08Z Création de nouvelles icônes de navigation - Pass for v9 - See #1358 - - - - - 30 changed files: - .mvn/pom.gitflow.develop - .mvn/pom.gitflow.master - client-configuration/.mvn/pom.gitflow.develop - client-configuration/.mvn/pom.gitflow.master - client-configuration/pom.xml - client-configuration/src/main/config/Client.ini - client-configuration/src/main/i18n/getters/config.getter - client-configuration/src/main/i18n/getters/java-enumeration.getter - client-configuration/src/main/i18n/getters/java.getter - client-core/.mvn/pom.gitflow.develop - client-core/.mvn/pom.gitflow.master - client-core/pom.xml - client-core/src/license/THIRD-PARTY.properties - client-core/src/main/dcp-presets/ps/logbook/01-deployment-preset.yml - client-core/src/main/dcp-presets/ps/logbook/02-removal-preset.yml - client-core/src/main/dcp-presets/ps/logbook/03-update-preset.yml - client-core/src/main/dcp-presets/ps/logbook/04-abandonned-preset.yml - client-core/src/main/i18n/getters/java.getter - client-core/src/main/i18n/getters/jaxx.getter - client-core/src/main/java/fr/ird/observe/client/db/ObserveSwingDataSource.java - client-core/src/main/java/fr/ird/observe/client/navigation/RouteCloseCallback.java - client-core/src/main/java/fr/ird/observe/client/ui/ObserveKeyStrokes.java - client-core/src/main/java/fr/ird/observe/client/ui/ObserveMainUI.jaxx - client-core/src/main/java/fr/ird/observe/client/ui/ObserveMainUI.jcss - client-core/src/main/java/fr/ird/observe/client/ui/ObserveMainUIInitializer.java - + client-core/src/main/java/fr/ird/observe/client/ui/actions/content/data/ps/ChooseRelatedObservedActivityUIAction.java - client-core/src/main/java/fr/ird/observe/client/ui/actions/content/data/ps/add/AddActivitySeineFloatingObjectUIAction.java - + client-core/src/main/java/fr/ird/observe/client/ui/actions/content/data/ps/add/AddSampleSpeciesSeineUIAction.java - + client-core/src/main/java/fr/ird/observe/client/ui/actions/content/data/ps/delete/DeleteSampleSeineUIAction.java - + client-core/src/main/java/fr/ird/observe/client/ui/actions/content/data/ps/delete/DeleteSampleSpeciesSeineUIAction.java The diff was not included because it is too large. View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/b950c3b53de65fe120eafc57c4… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/b950c3b53de65fe120eafc57c4… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop] 2 commits: Fix Tdr screen loading
by Tony CHEMIT 24 Jul '19

24 Jul '19
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: e27a2789 by tchemit at 2019-07-24T15:42:13Z Fix Tdr screen loading - - - - - 45743b68 by tchemit at 2019-07-24T15:51:13Z fix NonTargetLengthDto decorator - - - - - 4 changed files: - client-core/src/main/java/fr/ird/observe/client/ui/content/data/ll/observation/TdrObsUI.jcss - dto/src/main/java/fr/ird/observe/dto/decoration/DecoratorService.java - dto/src/main/java/fr/ird/observe/dto/decoration/decorators/NonTargetLengthDecorator.java - dto/src/main/models/Observe-20-data-ps-observation.model Changes: ===================================== client-core/src/main/java/fr/ird/observe/client/ui/content/data/ll/observation/TdrObsUI.jcss ===================================== @@ -75,6 +75,7 @@ #enableTimestamp { toolTipText:"observe.common.TdrObsDto.enableTimestamp.tip"; _skipBindingToBean:true; + _skipBindingFromBean:true; } #timestampPanel { ===================================== dto/src/main/java/fr/ird/observe/dto/decoration/DecoratorService.java ===================================== @@ -1062,7 +1062,7 @@ public class DecoratorService extends DecoratorProvider { public void initPsObservationNonTargetLengthDto() { registerDecorator(new NonTargetLengthDecorator()); - registerDataReferenceDecorator(NonTargetLengthReference.class, "${speciesLabel}$s##${length}$f##${gender}$s"); + registerDataReferenceDecorator(NonTargetLengthReference.class, "${speciesLabel}$s##${length}$f##${sexLabel}$s"); } @Override ===================================== dto/src/main/java/fr/ird/observe/dto/decoration/decorators/NonTargetLengthDecorator.java ===================================== @@ -36,7 +36,7 @@ public class NonTargetLengthDecorator extends ObserveDecorator<NonTargetLengthDt public NonTargetLengthDecorator() throws IllegalArgumentException, NullPointerException { super(NonTargetLengthDto.class, - "${species/scientificLabel}$s##${length}$f##${gender}$s" + "${species/scientificLabel}$s##${length}$f##${sex}$s" ); } ===================================== dto/src/main/models/Observe-20-data-ps-observation.model ===================================== @@ -84,7 +84,7 @@ conformity {*:1} fr.ird.observe.dto.referential.ps.observation.NonTargetCatchRel releasingTime {*:1} fr.ird.observe.dto.referential.ps.observation.NonTargetCatchReleasingTimeReference lengthMeasureMethod {*:0..1} fr.ird.observe.dto.referential.common.LengthMeasureMethodReference -data.ps.observation.NonTargetLength > data.Data | references=speciesLabel,length +data.ps.observation.NonTargetLength > data.Data | references=speciesLabel,length,sexLabel length + {*:1} Float isLengthComputed + {*:1} boolean picturesReferences + {*:1} String View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/5e98fbc50afeb8da47daf47927… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/5e98fbc50afeb8da47daf47927… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop-9] 25 commits: Assouplir un contrôle de saisie - Closes #1360
by Tony CHEMIT 24 Jul '19

24 Jul '19
Tony CHEMIT pushed to branch develop-9 at ultreiaio / ird-observe Commits: cea7ccc1 by tchemit at 2019-07-19T13:00:30Z Assouplir un contrôle de saisie - Closes #1360 - - - - - 0281d0dc by tchemit at 2019-07-21T14:19:57Z Création de nouvelles icônes de navigation (Refactor and extract navigation icons to a separate file )- See #1358 - - - - - 7d78f295 by tchemit at 2019-07-23T11:34:29Z Création de nouvelles icônes de navigation (Refactor and extract navigation icons to a separate file )- See #1358 - - - - - 6ac3a215 by tchemit at 2019-07-23T12:04:47Z Impossible de supprimer une activité LL - Closes #1361 - - - - - a464dde5 by tchemit at 2019-07-23T12:29:14Z [LL] Activité logbook : petits ajustements - Closes #1362 - - - - - 5c906f6b by tchemit at 2019-07-23T14:15:49Z [LL][LOGBOOKS] Echantillons, ajouter l&#39;unité ° - Closes #1366 - - - - - 55df1b79 by tchemit at 2019-07-23T14:15:50Z [LL][LOGBOOKS] Plage de taille d&#39;un échantillon - Closes #1365 - - - - - c351b54d by tchemit at 2019-07-23T14:15:50Z [LL][LOGBOOKS] Source d&#39;information d&#39;un débarquement - Closes #1364 - - - - - 285711c2 by tchemit at 2019-07-23T14:16:10Z [LL] Fenêtre d&#39;appariement d&#39;activités - Closes #1363 - - - - - 5e98fbc5 by tchemit at 2019-07-23T14:32:59Z update changelog [skip ci] - - - - - 25bd173d by tchemit at 2019-07-24T10:12:47Z [CARTE] Symboles de cartes pour V8 et V9 - Refactor code - See #1343 - - - - - feb86add by tchemit at 2019-07-24T10:19:04Z Réorganisation des données d’observation PS - Réorganisation des captures et échantillons de cible et bycatch observés - See #1254 - - - - - bf9f90a8 by tchemit at 2019-07-24T10:19:04Z Move to new version 9.0-alpha-1 - - - - - 43a1b704 by tchemit at 2019-07-24T10:19:04Z Réorganisation des données d’observation PS - Re localisation dans la hiérarchie - Closes #1252 - - - - - eaa8f739 by tchemit at 2019-07-24T10:37:44Z Module 2 (first flush) - - - - - e8bc1fe8 by tchemit at 2019-07-24T10:37:45Z [PS] Contenu des onglets spécifiques observations et logbooks et le formulaire marée - See #1300 - - - - - 67796da2 by tchemit at 2019-07-24T10:38:12Z Module 2 - second flush - - - - - 65c5e3b9 by tchemit at 2019-07-24T10:38:12Z Report from v8 for ps logbook model - - - - - 46a04ce2 by tchemit at 2019-07-24T10:38:12Z Choix de nouvelles couleurs pour les symboles de la carte LL - Closes #1293 - - - - - 1c1afe38 by tchemit at 2019-07-24T10:38:12Z [CARTE] Symboles de cartes pour V8 et V9 - Realign for Ps model - See #1343 - - - - - 2b60b8a0 by tchemit at 2019-07-24T10:38:13Z Consolidation des champs techniques en base - Realing on v9 - See #1353 - - - - - 077e43be by tchemit at 2019-07-24T10:39:06Z Insertion des lots de débarquements - See #1259 - - - - - 472c05de by tchemit at 2019-07-24T10:39:35Z Insertion du plan de cuves - See #1260 - - - - - f1f0f796 by tchemit at 2019-07-24T10:40:17Z Insertion de l’échantillonnage au port - See #1261 - - - - - b950c3b5 by tchemit at 2019-07-24T15:33:45Z Création de nouvelles icônes de navigation - Pass for v9 - See #1358 - - - - - 10 changed files: - .mvn/gitlab-cache/milestones/268612-issues.json - .mvn/gitlab-cache/milestones/268617-issues.json - .mvn/gitlab-cache/milestones/268621-issues.json - .mvn/gitlab-cache/milestones/268622-issues.json - .mvn/gitlab-cache/milestones/268623-issues.json - .mvn/gitlab-cache/milestones/268624-issues.json - .mvn/gitlab-cache/milestones/268625-issues.json - .mvn/gitlab-cache/milestones/268626-issues.json - .mvn/gitlab-cache/milestones/268627-issues.json - .mvn/gitlab-cache/milestones/268628-issues.json The diff was not included because it is too large. View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/a33bc21b158de0cf273377b384… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/a33bc21b158de0cf273377b384… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop] update changelog [skip ci]
by Tony CHEMIT 23 Jul '19

23 Jul '19
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 5e98fbc5 by tchemit at 2019-07-23T14:32:59Z update changelog [skip ci] - - - - - 10 changed files: - .mvn/gitlab-cache/milestones/268612-issues.json - .mvn/gitlab-cache/milestones/268617-issues.json - .mvn/gitlab-cache/milestones/268621-issues.json - .mvn/gitlab-cache/milestones/268622-issues.json - .mvn/gitlab-cache/milestones/268623-issues.json - .mvn/gitlab-cache/milestones/268624-issues.json - .mvn/gitlab-cache/milestones/268625-issues.json - .mvn/gitlab-cache/milestones/268626-issues.json - .mvn/gitlab-cache/milestones/268627-issues.json - .mvn/gitlab-cache/milestones/268628-issues.json The diff was not included because it is too large. View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/5e98fbc50afeb8da47daf479273… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/5e98fbc50afeb8da47daf479273… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop] 4 commits: [LL][LOGBOOKS] Echantillons, ajouter l'unité ° - Closes #1366
by Tony CHEMIT 23 Jul '19

23 Jul '19
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 5c906f6b by tchemit at 2019-07-23T14:15:49Z [LL][LOGBOOKS] Echantillons, ajouter l&#39;unité ° - Closes #1366 - - - - - 55df1b79 by tchemit at 2019-07-23T14:15:50Z [LL][LOGBOOKS] Plage de taille d&#39;un échantillon - Closes #1365 - - - - - c351b54d by tchemit at 2019-07-23T14:15:50Z [LL][LOGBOOKS] Source d&#39;information d&#39;un débarquement - Closes #1364 - - - - - 285711c2 by tchemit at 2019-07-23T14:16:10Z [LL] Fenêtre d&#39;appariement d&#39;activités - Closes #1363 - - - - - 16 changed files: - client-core/src/main/java/fr/ird/observe/client/ui/content/data/ll/landing/TripLonglineLandingUIHandler.java - dto/src/main/java/fr/ird/observe/dto/data/ll/logbook/SampleLogbookDto.java - + dto/src/main/java/fr/ird/observe/dto/data/ll/logbook/SampleLogbookReference.java - dto/src/main/java/fr/ird/observe/dto/decoration/DecoratorService.java - dto/src/main/java/fr/ird/observe/dto/decoration/ObserveI18nLabelsBuilder.java - dto/src/main/java/fr/ird/observe/dto/decoration/decorators/ObserveDecorator.java - dto/src/main/java/fr/ird/observe/dto/referential/common/PersonReference.java - observe-i18n/src/main/i18n/translations/observe_en_GB.properties - observe-i18n/src/main/i18n/translations/observe_es_ES.properties - observe-i18n/src/main/i18n/translations/observe_fr_FR.properties - services/src/main/i18n/getters/java.getter - services/src/main/java/fr/ird/observe/services/service/data/ll/pairing/ActivityLonglinePairingEngine.java - services/src/main/java/fr/ird/observe/services/service/data/ll/pairing/ActivityLonglinePairingResultItem.java - services/src/main/java/fr/ird/observe/services/service/data/ll/pairing/ActivityLonglinePairingResultItemDecorator.java - validation/src/main/resources/fr/ird/observe/dto/data/ll/logbook/SamplePartLogbookDto-update-error-validation.xml - validation/src/main/resources/fr/ird/observe/dto/data/ll/logbook/SamplePartLogbookDto-update-warning-validation.xml Changes: ===================================== client-core/src/main/java/fr/ird/observe/client/ui/content/data/ll/landing/TripLonglineLandingUIHandler.java ===================================== @@ -32,6 +32,8 @@ import fr.ird.observe.client.ui.content.api.ui.ObserveLayoutFocusTraversalPolicy import fr.ird.observe.dto.data.ll.landing.LandingLonglineDto; import fr.ird.observe.dto.data.ll.landing.LandingLonglineReference; import fr.ird.observe.dto.form.Form; +import fr.ird.observe.dto.referential.common.PersonDto; +import fr.ird.observe.dto.referential.common.PersonReference; import fr.ird.observe.dto.referential.common.VesselDto; import fr.ird.observe.dto.referential.common.VesselReference; import fr.ird.observe.dto.referential.ll.landing.DataSourceReference; @@ -119,6 +121,7 @@ class TripLonglineLandingUIHandler extends ContentOpenableUIHandler<LandingLongl @Override protected void onAfterInitAddReferentialFilters(ContentUIReferenceCache referenceCache) { + referenceCache.addReferentialFilter(LandingLonglineDto.PROPERTY_PERSON, (ReferentialReferencesFilter<PersonDto, PersonReference>) PersonReference::filterDataSourceReferences); referenceCache.addReferentialFilter(LandingLonglineDto.PROPERTY_VESSEL, (ReferentialReferencesFilter<VesselDto, VesselReference>) incomingReferences -> incomingReferences.stream().filter(e -> LANDING_VESSEL_TYPE_IDS.contains(e.getVesselTypeId())).collect(Collectors.toList())); } ===================================== dto/src/main/java/fr/ird/observe/dto/data/ll/logbook/SampleLogbookDto.java ===================================== @@ -22,11 +22,13 @@ package fr.ird.observe.dto.data.ll.logbook; * #L% */ +import io.ultreia.java4all.bean.spi.GenerateJavaBeanDefinition; import org.nuiton.util.DateUtil; import java.util.Date; import java.util.List; +@GenerateJavaBeanDefinition(types = {"fr.ird.observe.dto.data.ll.logbook.SampleLogbookDto"}) public class SampleLogbookDto extends GeneratedSampleLogbookDto { public static final String PROPERTY_DATE = "date"; @@ -55,6 +57,10 @@ public class SampleLogbookDto extends GeneratedSampleLogbookDto { } } + public String getCoordinateStr() { + return String.format("(%s°;%s°)", latitude, longitude); + } + public void setTimeStamp(Date timeStamp) { Date oldDate = getDate(); Date oldTime = getTime(); ===================================== dto/src/main/java/fr/ird/observe/dto/data/ll/logbook/SampleLogbookReference.java ===================================== @@ -0,0 +1,36 @@ +package fr.ird.observe.dto.data.ll.logbook; + +import io.ultreia.java4all.bean.spi.GenerateJavaBeanDefinition; + +/*- + * #%L + * ObServe :: Dto + * %% + * Copyright (C) 2008 - 2019 IRD, Code Lutin, Ultreia.io + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ +@GenerateJavaBeanDefinition(types = {"fr.ird.observe.dto.data.ll.logbook.SampleLogbookReference"}) +public class SampleLogbookReference extends GeneratedSampleLogbookReference { + + public SampleLogbookReference(fr.ird.observe.dto.reference.DtoReferenceAware dto, java.util.Date timeStamp, java.lang.Float latitude, java.lang.Float longitude) { + super(dto, timeStamp, latitude, longitude); + } + + public String getCoordinateStr() { + return String.format("(%s°;%s°)", getLatitude(), getLongitude()); + } +} ===================================== dto/src/main/java/fr/ird/observe/dto/decoration/DecoratorService.java ===================================== @@ -386,8 +386,8 @@ public class DecoratorService extends DecoratorProvider { @Override public void initLlLogbookSampleLogbookDto() { registerDataAndDataReferenceDecorator(SampleLogbookDto.class, SampleLogbookReference.class, - "${timeStamp}$td/%1$tm/%1$tY %1$tH:%1$tM##${latitude}$s##${longitude}$s", - "${timeStamp}$td/%1$tm/%1$tY %1$tH:%1$tM##${latitude}$s##${longitude}$s", + "${timeStamp}$td/%1$tm/%1$tY %1$tH:%1$tM##${coordinateStr}$s", + "${timeStamp}$td/%1$tm/%1$tY %1$tH:%1$tM##${coordinateStr}$s", " - "); } ===================================== dto/src/main/java/fr/ird/observe/dto/decoration/ObserveI18nLabelsBuilder.java ===================================== @@ -114,6 +114,8 @@ public class ObserveI18nLabelsBuilder extends BeanPropertyI18nKeyProducerSupport .put("sizeMeasureTypeCode", "sizeMeasureType") .put("inputSizeMeasureTypeCode", "inputSizeMeasureType") .put("outputSizeMeasureTypeCode", "outputSizeMeasureType") + .put("computedTimeStr", "computedTime") + .put("coordinateStr", "coordinate") .build(); } ===================================== dto/src/main/java/fr/ird/observe/dto/decoration/decorators/ObserveDecorator.java ===================================== @@ -24,8 +24,8 @@ package fr.ird.observe.dto.decoration.decorators; import fr.ird.observe.dto.reference.DtoReference; import org.apache.commons.jxpath.JXPathContext; import org.apache.commons.lang3.StringUtils; -import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.nuiton.decorator.MultiJXPathDecorator; import java.io.Serializable; @@ -115,6 +115,8 @@ public class ObserveDecorator<E> extends MultiJXPathDecorator<E> implements Clon String lastToken = tokens[tokens.length - 1]; if (referenceBean.getPropertyNames().contains(lastToken)) { value = referenceBean.getPropertyValue(lastToken); + } else { + value = referenceBean.get(lastToken); } return value; ===================================== dto/src/main/java/fr/ird/observe/dto/referential/common/PersonReference.java ===================================== @@ -46,6 +46,10 @@ public class PersonReference extends GeneratedPersonReference { return incoming.stream().filter(PersonReference::isDataEntryOperator).collect(Collectors.toList()); } +public static List<PersonReference> filterDataSourceReferences(Collection<PersonReference> incoming) { + return incoming.stream().filter(PersonReference::isDataSource).collect(Collectors.toList()); + } + public String getLabel() { return getFirstName() + " " + getLastName(); } ===================================== observe-i18n/src/main/i18n/translations/observe_en_GB.properties ===================================== @@ -468,8 +468,11 @@ observe.common.ActivityLonglineObsEncounterDto.comment=Comment observe.common.ActivityLonglineObsSensorUsedDto.comment=Comment observe.common.ActivityLonglinePairingResultItemDto.computedDistance=Distance (km) observe.common.ActivityLonglinePairingResultItemDto.computedDistanceValue=Distance (%s kms) -observe.common.ActivityLonglinePairingResultItemDto.computedTime=Time (minutes) -observe.common.ActivityLonglinePairingResultItemDto.computedTimeValue=Time (%s minutes) +observe.common.ActivityLonglinePairingResultItemDto.computedTime=Time shift (days\:hours\:minutes) +observe.common.ActivityLonglinePairingResultItemDto.computedTimeAfter=after +observe.common.ActivityLonglinePairingResultItemDto.computedTimeBefore=before +observe.common.ActivityLonglinePairingResultItemDto.computedTimeEquals=Same date - time +observe.common.ActivityLonglinePairingResultItemDto.computedTimeValue=Time shift (%s) observe.common.ActivityLonglinePairingResultItemDto.observationActivity=Observed activity observe.common.ActivityLonglinePairingResultItemDto.type=Observed activity observe.common.ActivityObsDto.action.goToOpen.short=Observations - Open activity ===================================== observe-i18n/src/main/i18n/translations/observe_es_ES.properties ===================================== @@ -468,8 +468,11 @@ observe.common.ActivityLonglineObsEncounterDto.comment=Comentarios observe.common.ActivityLonglineObsSensorUsedDto.comment=Comentarios observe.common.ActivityLonglinePairingResultItemDto.computedDistance=Distance (km) \#TODO observe.common.ActivityLonglinePairingResultItemDto.computedDistanceValue=Distance (%s kms) \#TODO -observe.common.ActivityLonglinePairingResultItemDto.computedTime=Time (minutes) \#TODO -observe.common.ActivityLonglinePairingResultItemDto.computedTimeValue=Time (%s minutes) \#TODO +observe.common.ActivityLonglinePairingResultItemDto.computedTime=Time shift (days\:hours\:minutes) \#TODO +observe.common.ActivityLonglinePairingResultItemDto.computedTimeAfter=after \#TODO +observe.common.ActivityLonglinePairingResultItemDto.computedTimeBefore=before \#TODO +observe.common.ActivityLonglinePairingResultItemDto.computedTimeEquals=Same date - time \#TODO +observe.common.ActivityLonglinePairingResultItemDto.computedTimeValue=Time shift (%s) \#TODO observe.common.ActivityLonglinePairingResultItemDto.observationActivity=Observed activity \#TODO observe.common.ActivityLonglinePairingResultItemDto.type=Observed activity \#TODO observe.common.ActivityObsDto.action.goToOpen.short=Observations - Open activity \#TODO ===================================== observe-i18n/src/main/i18n/translations/observe_fr_FR.properties ===================================== @@ -468,8 +468,11 @@ observe.common.ActivityLonglineObsEncounterDto.comment=Commentaire observe.common.ActivityLonglineObsSensorUsedDto.comment=Commentaire observe.common.ActivityLonglinePairingResultItemDto.computedDistance=Distance (km) observe.common.ActivityLonglinePairingResultItemDto.computedDistanceValue=Distance (%s kms) -observe.common.ActivityLonglinePairingResultItemDto.computedTime=Temps (minutes) -observe.common.ActivityLonglinePairingResultItemDto.computedTimeValue=Temps (%s minutes) +observe.common.ActivityLonglinePairingResultItemDto.computedTime=Écart de temps (jours\:heures\:minutes) +observe.common.ActivityLonglinePairingResultItemDto.computedTimeAfter=après +observe.common.ActivityLonglinePairingResultItemDto.computedTimeBefore=avant +observe.common.ActivityLonglinePairingResultItemDto.computedTimeEquals=Même date - heure +observe.common.ActivityLonglinePairingResultItemDto.computedTimeValue=Écart de temps (%s) observe.common.ActivityLonglinePairingResultItemDto.observationActivity=Activité observée observe.common.ActivityLonglinePairingResultItemDto.type=Activité observée observe.common.ActivityObsDto.action.goToOpen.short=Observations - Activité ouverte ===================================== services/src/main/i18n/getters/java.getter ===================================== @@ -1,6 +1,9 @@ observe.common.ActivityLonglinePairingResultItemDto.computedDistance observe.common.ActivityLonglinePairingResultItemDto.computedDistanceValue observe.common.ActivityLonglinePairingResultItemDto.computedTime +observe.common.ActivityLonglinePairingResultItemDto.computedTimeAfter +observe.common.ActivityLonglinePairingResultItemDto.computedTimeBefore +observe.common.ActivityLonglinePairingResultItemDto.computedTimeEquals observe.common.ActivityLonglinePairingResultItemDto.computedTimeValue observe.common.ActivityLonglinePairingResultItemDto.observationActivity observe.common.ActivityLonglinePairingResultItemDto.type ===================================== services/src/main/java/fr/ird/observe/services/service/data/ll/pairing/ActivityLonglinePairingEngine.java ===================================== @@ -96,9 +96,9 @@ public class ActivityLonglinePairingEngine { private ActivityLonglinePairingResultItem toActivityResultItem(ActivityLonglineAware activityLonglineLogbook, ActivityLonglineObsReference activityLonglineObsReference, double maxTime, double maxDistance) { Date logbookTimeStamp = activityLonglineLogbook.getTimeStamp(); Date obsTimeStamp = activityLonglineObsReference.getTimeStamp(); - long computedTime = Math.abs(TimeUnit.MINUTES.convert(logbookTimeStamp.getTime() - obsTimeStamp.getTime(), TimeUnit.MILLISECONDS)); + long computedTime = TimeUnit.MINUTES.convert(logbookTimeStamp.getTime() - obsTimeStamp.getTime(), TimeUnit.MILLISECONDS); double computedDistance = activityLonglineLogbook.getGPSPoint().getDistanceInKm(activityLonglineObsReference.getGPSPoint()); - return new ActivityLonglinePairingResultItem(activityLonglineObsReference, computedTime, computedDistance, computedTime < maxTime, computedDistance < maxDistance); + return new ActivityLonglinePairingResultItem(activityLonglineObsReference, computedTime, computedDistance, Math.abs(computedTime) < maxTime, computedDistance < maxDistance); } } ===================================== services/src/main/java/fr/ird/observe/services/service/data/ll/pairing/ActivityLonglinePairingResultItem.java ===================================== @@ -10,12 +10,12 @@ package fr.ird.observe.services.service.data.ll.pairing; * 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>. @@ -27,6 +27,9 @@ import fr.ird.observe.dto.data.ll.observation.ActivityLonglineObsReference; import io.ultreia.java4all.lang.Numbers; import java.util.Objects; +import java.util.concurrent.TimeUnit; + +import static io.ultreia.java4all.i18n.I18n.t; /** * Created by tchemit on 15/10/2018. @@ -37,14 +40,15 @@ public class ActivityLonglinePairingResultItem implements ObserveDto { private final ActivityLonglineObsReference observationActivity; private final long computedTime; - private final double computedDistance; + private final float computedDistance; private final boolean timeValid; private final boolean distanceValid; + private String computedTimeStr; public ActivityLonglinePairingResultItem(ActivityLonglineObsReference observationActivity, long computedTime, double computedDistance, boolean timeValid, boolean distanceValid) { this.observationActivity = observationActivity; this.computedTime = computedTime; - this.computedDistance = Numbers.roundOneDigit((float) computedDistance); + this.computedDistance = Numbers.roundTwoDigits((float) computedDistance); this.timeValid = timeValid; this.distanceValid = distanceValid; } @@ -57,7 +61,7 @@ public class ActivityLonglinePairingResultItem implements ObserveDto { return computedTime; } - public double getComputedDistance() { + public float getComputedDistance() { return computedDistance; } @@ -69,6 +73,24 @@ public class ActivityLonglinePairingResultItem implements ObserveDto { return distanceValid; } + public String getComputedTimeStr() { + if (computedTimeStr == null) { + if (computedTime == 0) { + return computedTimeStr = t("observe.common.ActivityLonglinePairingResultItemDto.computedTimeEquals"); + } + if (computedTime < 0) { + computedTimeStr = t("observe.common.ActivityLonglinePairingResultItemDto.computedTimeAfter") + " - "; + } else { + computedTimeStr = t("observe.common.ActivityLonglinePairingResultItemDto.computedTimeBefore") +" - "; + } + long days = TimeUnit.MINUTES.toDays(computedTime); + long hours = TimeUnit.MINUTES.toHours(computedTime) % 24; + long minutes = TimeUnit.MINUTES.toMinutes(computedTime) % 60; + computedTimeStr += String.format("%s:%s:%s", days, hours, minutes); + } + return computedTimeStr; + } + @Override public boolean equals(Object o) { if (this == o) return true; ===================================== services/src/main/java/fr/ird/observe/services/service/data/ll/pairing/ActivityLonglinePairingResultItemDecorator.java ===================================== @@ -44,6 +44,8 @@ public class ActivityLonglinePairingResultItemDecorator extends ObserveDecorator n("observe.common.ActivityLonglinePairingResultItemDto.type"); n("observe.common.ActivityLonglinePairingResultItemDto.observationActivity"); n("observe.common.ActivityLonglinePairingResultItemDto.computedTime"); + n("observe.common.ActivityLonglinePairingResultItemDto.computedTimeBefore"); + n("observe.common.ActivityLonglinePairingResultItemDto.computedTimeAfter"); n("observe.common.ActivityLonglinePairingResultItemDto.computedDistance"); } @@ -51,7 +53,7 @@ public class ActivityLonglinePairingResultItemDecorator extends ObserveDecorator private final DataReferenceDecorator<ActivityLonglineObsReference> activityDecorator; public ActivityLonglinePairingResultItemDecorator(DecoratorService decoratorService, Locale locale) { - super(ActivityLonglinePairingResultItem.class, "${observationActivity}$s##${computedTime}$s##${computedDistance}$s"); + super(ActivityLonglinePairingResultItem.class, "${observationActivity}$s##${computedTimeStr}$s##${computedDistance}$s"); this.locale = locale; activityDecorator = decoratorService.getDataReferenceDecorator(ActivityLonglineObsReference.class); } @@ -61,7 +63,7 @@ public class ActivityLonglinePairingResultItemDecorator extends ObserveDecorator protected Comparable<Comparable<?>> getTokenValue(JXPathContext jxcontext, String token) { Object value0 = jxcontext.getValue(token); switch (token) { - case "computedTime": + case "computedTimeStr": return (Comparable) l(locale, "observe.common.ActivityLonglinePairingResultItemDto.computedTimeValue", value0); case "computedDistance": return (Comparable) l(locale, "observe.common.ActivityLonglinePairingResultItemDto.computedDistanceValue", value0); ===================================== validation/src/main/resources/fr/ird/observe/dto/data/ll/logbook/SamplePartLogbookDto-update-error-validation.xml ===================================== @@ -74,6 +74,16 @@ <message>observe.validation.targetLength.positive.length</message> </field-validator> + <!-- validation de la taille par borne --> + <field-validator type="species_lengthDto"> + <param name="ratio">1.0</param> + <param name="enable">true</param> + <param name="expression"> + <![CDATA[ species != null && length != null ]]> + </param> + <message>observe.validation.targetLength.bound.length##${min}##${max}</message> + </field-validator> + </field> <field name="weight"> ===================================== validation/src/main/resources/fr/ird/observe/dto/data/ll/logbook/SamplePartLogbookDto-update-warning-validation.xml ===================================== @@ -23,22 +23,7 @@ "-//Apache Struts//XWork Validator 1.0.3//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> <validators> - - <field name="length"> - - <!-- validation de la taille par borne --> - <field-validator type="species_lengthDto"> - <param name="ratio">1.0</param> - <param name="enable">true</param> - <param name="expression"> - <![CDATA[ species != null && length != null ]]> - </param> - <message>observe.validation.targetLength.bound.length##${min}##${max}</message> - </field-validator> - - </field> - - + <field name="weight"> <!-- validation du weight par borne (uniquement pour mode saisie par individus) --> View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/de4d9d6869a1fc57338a18588d… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/de4d9d6869a1fc57338a18588d… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop] [LL][LOGBOOKS] Source d'information d'un débarquement - Closes #1364
by Tony CHEMIT 23 Jul '19

23 Jul '19
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: de4d9d68 by tchemit at 2019-07-23T13:13:57Z [LL][LOGBOOKS] Source d&#39;information d&#39;un débarquement - Closes #1364 - - - - - 2 changed files: - client-core/src/main/java/fr/ird/observe/client/ui/content/data/ll/landing/TripLonglineLandingUIHandler.java - dto/src/main/java/fr/ird/observe/dto/referential/common/PersonReference.java Changes: ===================================== client-core/src/main/java/fr/ird/observe/client/ui/content/data/ll/landing/TripLonglineLandingUIHandler.java ===================================== @@ -32,6 +32,8 @@ import fr.ird.observe.client.ui.content.api.ui.ObserveLayoutFocusTraversalPolicy import fr.ird.observe.dto.data.ll.landing.LandingLonglineDto; import fr.ird.observe.dto.data.ll.landing.LandingLonglineReference; import fr.ird.observe.dto.form.Form; +import fr.ird.observe.dto.referential.common.PersonDto; +import fr.ird.observe.dto.referential.common.PersonReference; import fr.ird.observe.dto.referential.common.VesselDto; import fr.ird.observe.dto.referential.common.VesselReference; import fr.ird.observe.dto.referential.ll.landing.DataSourceReference; @@ -119,6 +121,7 @@ class TripLonglineLandingUIHandler extends ContentOpenableUIHandler<LandingLongl @Override protected void onAfterInitAddReferentialFilters(ContentUIReferenceCache referenceCache) { + referenceCache.addReferentialFilter(LandingLonglineDto.PROPERTY_PERSON, (ReferentialReferencesFilter<PersonDto, PersonReference>) PersonReference::filterDataSourceReferences); referenceCache.addReferentialFilter(LandingLonglineDto.PROPERTY_VESSEL, (ReferentialReferencesFilter<VesselDto, VesselReference>) incomingReferences -> incomingReferences.stream().filter(e -> LANDING_VESSEL_TYPE_IDS.contains(e.getVesselTypeId())).collect(Collectors.toList())); } ===================================== dto/src/main/java/fr/ird/observe/dto/referential/common/PersonReference.java ===================================== @@ -46,6 +46,10 @@ public class PersonReference extends GeneratedPersonReference { return incoming.stream().filter(PersonReference::isDataEntryOperator).collect(Collectors.toList()); } +public static List<PersonReference> filterDataSourceReferences(Collection<PersonReference> incoming) { + return incoming.stream().filter(PersonReference::isDataSource).collect(Collectors.toList()); + } + public String getLabel() { return getFirstName() + " " + getLastName(); } View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/de4d9d6869a1fc57338a18588d1… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/de4d9d6869a1fc57338a18588d1… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop] [LL][LOGBOOKS] Plage de taille d'un échantillon - Closes #1365
by Tony CHEMIT 23 Jul '19

23 Jul '19
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: fc84cb80 by tchemit at 2019-07-23T13:08:19Z [LL][LOGBOOKS] Plage de taille d&#39;un échantillon - Closes #1365 - - - - - 2 changed files: - validation/src/main/resources/fr/ird/observe/dto/data/ll/logbook/SamplePartLogbookDto-update-error-validation.xml - validation/src/main/resources/fr/ird/observe/dto/data/ll/logbook/SamplePartLogbookDto-update-warning-validation.xml Changes: ===================================== validation/src/main/resources/fr/ird/observe/dto/data/ll/logbook/SamplePartLogbookDto-update-error-validation.xml ===================================== @@ -74,6 +74,16 @@ <message>observe.validation.targetLength.positive.length</message> </field-validator> + <!-- validation de la taille par borne --> + <field-validator type="species_lengthDto"> + <param name="ratio">1.0</param> + <param name="enable">true</param> + <param name="expression"> + <![CDATA[ species != null && length != null ]]> + </param> + <message>observe.validation.targetLength.bound.length##${min}##${max}</message> + </field-validator> + </field> <field name="weight"> ===================================== validation/src/main/resources/fr/ird/observe/dto/data/ll/logbook/SamplePartLogbookDto-update-warning-validation.xml ===================================== @@ -23,22 +23,7 @@ "-//Apache Struts//XWork Validator 1.0.3//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> <validators> - - <field name="length"> - - <!-- validation de la taille par borne --> - <field-validator type="species_lengthDto"> - <param name="ratio">1.0</param> - <param name="enable">true</param> - <param name="expression"> - <![CDATA[ species != null && length != null ]]> - </param> - <message>observe.validation.targetLength.bound.length##${min}##${max}</message> - </field-validator> - - </field> - - + <field name="weight"> <!-- validation du weight par borne (uniquement pour mode saisie par individus) --> View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/fc84cb804ccf4aeba63ebfe4515… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/fc84cb804ccf4aeba63ebfe4515… You're receiving this email because of your account on gitlab.com.
1 0
0 0
[Git][ultreiaio/ird-observe][develop] [LL][LOGBOOKS] Echantillons, ajouter l'unité ° - Closes #1366
by Tony CHEMIT 23 Jul '19

23 Jul '19
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 1161d56f by tchemit at 2019-07-23T12:56:26Z [LL][LOGBOOKS] Echantillons, ajouter l&#39;unité ° - Closes #1366 - - - - - 4 changed files: - dto/src/main/java/fr/ird/observe/dto/data/ll/logbook/SampleLogbookDto.java - + dto/src/main/java/fr/ird/observe/dto/data/ll/logbook/SampleLogbookReference.java - dto/src/main/java/fr/ird/observe/dto/decoration/DecoratorService.java - dto/src/main/java/fr/ird/observe/dto/decoration/decorators/ObserveDecorator.java Changes: ===================================== dto/src/main/java/fr/ird/observe/dto/data/ll/logbook/SampleLogbookDto.java ===================================== @@ -22,11 +22,13 @@ package fr.ird.observe.dto.data.ll.logbook; * #L% */ +import io.ultreia.java4all.bean.spi.GenerateJavaBeanDefinition; import org.nuiton.util.DateUtil; import java.util.Date; import java.util.List; +@GenerateJavaBeanDefinition(types = {"fr.ird.observe.dto.data.ll.logbook.SampleLogbookDto"}) public class SampleLogbookDto extends GeneratedSampleLogbookDto { public static final String PROPERTY_DATE = "date"; @@ -55,6 +57,10 @@ public class SampleLogbookDto extends GeneratedSampleLogbookDto { } } + public String getCoordinateStr() { + return String.format("(%s°;%s°)", latitude, longitude); + } + public void setTimeStamp(Date timeStamp) { Date oldDate = getDate(); Date oldTime = getTime(); ===================================== dto/src/main/java/fr/ird/observe/dto/data/ll/logbook/SampleLogbookReference.java ===================================== @@ -0,0 +1,36 @@ +package fr.ird.observe.dto.data.ll.logbook; + +import io.ultreia.java4all.bean.spi.GenerateJavaBeanDefinition; + +/*- + * #%L + * ObServe :: Dto + * %% + * Copyright (C) 2008 - 2019 IRD, Code Lutin, Ultreia.io + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ +@GenerateJavaBeanDefinition(types = {"fr.ird.observe.dto.data.ll.logbook.SampleLogbookReference"}) +public class SampleLogbookReference extends GeneratedSampleLogbookReference { + + public SampleLogbookReference(fr.ird.observe.dto.reference.DtoReferenceAware dto, java.util.Date timeStamp, java.lang.Float latitude, java.lang.Float longitude) { + super(dto, timeStamp, latitude, longitude); + } + + public String getCoordinateStr() { + return String.format("(%s°;%s°)", getLatitude(), getLongitude()); + } +} ===================================== dto/src/main/java/fr/ird/observe/dto/decoration/DecoratorService.java ===================================== @@ -386,8 +386,8 @@ public class DecoratorService extends DecoratorProvider { @Override public void initLlLogbookSampleLogbookDto() { registerDataAndDataReferenceDecorator(SampleLogbookDto.class, SampleLogbookReference.class, - "${timeStamp}$td/%1$tm/%1$tY %1$tH:%1$tM##${latitude}$s##${longitude}$s", - "${timeStamp}$td/%1$tm/%1$tY %1$tH:%1$tM##${latitude}$s##${longitude}$s", + "${timeStamp}$td/%1$tm/%1$tY %1$tH:%1$tM##${coordinateStr}$s", + "${timeStamp}$td/%1$tm/%1$tY %1$tH:%1$tM##${coordinateStr}$s", " - "); } ===================================== dto/src/main/java/fr/ird/observe/dto/decoration/decorators/ObserveDecorator.java ===================================== @@ -24,8 +24,8 @@ package fr.ird.observe.dto.decoration.decorators; import fr.ird.observe.dto.reference.DtoReference; import org.apache.commons.jxpath.JXPathContext; import org.apache.commons.lang3.StringUtils; -import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.nuiton.decorator.MultiJXPathDecorator; import java.io.Serializable; @@ -115,6 +115,8 @@ public class ObserveDecorator<E> extends MultiJXPathDecorator<E> implements Clon String lastToken = tokens[tokens.length - 1]; if (referenceBean.getPropertyNames().contains(lastToken)) { value = referenceBean.getPropertyValue(lastToken); + } else { + value = referenceBean.get(lastToken); } return value; View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/1161d56fd676ff1c8b49422cb0b… -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/1161d56fd676ff1c8b49422cb0b… You're receiving this email because of your account on gitlab.com.
1 0
0 0
  • ← Newer
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • ...
  • 11
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.