Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
-
36317436
by Tony Chemit at 2023-05-19T12:40:24+02:00
-
6fe294dd
by Tony Chemit at 2023-05-19T12:53:28+02:00
-
24113b74
by Tony Chemit at 2023-05-19T13:19:25+02:00
-
50b70dcd
by Tony Chemit at 2023-05-19T13:19:25+02:00
18 changed files:
- client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/synchronize/referential/ng/tree/node/ReferentialSynchroNodeSupport.java
- client/runner/pom.xml
- core/api/dto-decoration/src/main/java/fr/ird/observe/dto/data/ll/logbook/CatchDtoDecoratorDefinition.java
- core/api/dto-decoration/src/main/java/fr/ird/observe/dto/data/ll/logbook/CatchReferenceDecoratorDefinition.java
- core/api/dto-decoration/src/main/java/fr/ird/observe/dto/data/ll/observation/CatchDtoDecoratorDefinition.java
- core/api/dto-decoration/src/main/java/fr/ird/observe/dto/data/ll/observation/CatchReferenceDecoratorDefinition.java
- core/api/dto-decoration/src/main/java/fr/ird/observe/dto/data/ll/observation/TdrDtoDecoratorDefinition.java
- core/api/dto-decoration/src/main/java/fr/ird/observe/dto/data/ll/observation/TdrReferenceDecoratorDefinition.java
- core/persistence/decoration/src/main/java/fr/ird/observe/entities/data/ll/logbook/CatchDecoratorDefinition.java
- core/persistence/decoration/src/main/java/fr/ird/observe/entities/data/ll/observation/CatchDecoratorDefinition.java
- core/persistence/decoration/src/main/java/fr/ird/observe/entities/data/ll/observation/TdrDecoratorDefinition.java
- model/src/main/models/Observe/dto/class/decorator.properties
- pom.xml
- toolkit/api-decoration/src/main/i18n/getters/java.getter
- toolkit/api-decoration/src/main/java/fr/ird/observe/decoration/DefaultDecoratorRenderer.java
- toolkit/api-i18n/src/main/i18n/translations/toolkit-api-i18n_en_GB.properties
- toolkit/api-i18n/src/main/i18n/translations/toolkit-api-i18n_es_ES.properties
- toolkit/api-i18n/src/main/i18n/translations/toolkit-api-i18n_fr_FR.properties
Changes:
| ... | ... | @@ -98,7 +98,7 @@ public abstract class ReferentialSynchroNodeSupport extends SynchroNodeSupport { |
| 98 | 98 | String text = "<html><body>" + dto.toString();
|
| 99 | 99 | text += " <i>(" + dto.getTopiaVersion() + " - " + DATE_FORMAT.format(dto.getLastUpdateDate()) + ")</i>";
|
| 100 | 100 | if (!isLeaf()) {
|
| 101 | - text += "( " + getChildCount() + ")";
|
|
| 101 | + text += "(" + getChildCount() + ")";
|
|
| 102 | 102 | }
|
| 103 | 103 | return text;
|
| 104 | 104 | }
|
| ... | ... | @@ -109,6 +109,18 @@ |
| 109 | 109 | <version>${project.version}</version>
|
| 110 | 110 | <scope>runtime</scope>
|
| 111 | 111 | </dependency>
|
| 112 | + <dependency>
|
|
| 113 | + <groupId>${project.groupId}</groupId>
|
|
| 114 | + <artifactId>core-services-i18n</artifactId>
|
|
| 115 | + <version>${project.version}</version>
|
|
| 116 | + <scope>runtime</scope>
|
|
| 117 | + </dependency>
|
|
| 118 | + <dependency>
|
|
| 119 | + <groupId>${project.groupId}</groupId>
|
|
| 120 | + <artifactId>toolkit-api-i18n</artifactId>
|
|
| 121 | + <version>${project.version}</version>
|
|
| 122 | + <scope>runtime</scope>
|
|
| 123 | + </dependency>
|
|
| 112 | 124 | <dependency>
|
| 113 | 125 | <groupId>org.apache.logging.log4j</groupId>
|
| 114 | 126 | <artifactId>log4j-jcl</artifactId>
|
| ... | ... | @@ -42,7 +42,7 @@ public final class CatchDtoDecoratorDefinition extends DecoratorDefinition<Catch |
| 42 | 42 | public final String decorateContext(Locale locale, ObserveDtoDecoratorRenderer<CatchDto> renderer, CatchDto source, int index) {
|
| 43 | 43 | switch (index) {
|
| 44 | 44 | case 0:
|
| 45 | - return renderer.onNullValue("homeId", locale, source.getHomeId());
|
|
| 45 | + return renderer.onHomeId(locale, source.getHomeId());
|
|
| 46 | 46 | default:
|
| 47 | 47 | throw new IllegalStateException("No index with value: " + index);
|
| 48 | 48 | }
|
| ... | ... | @@ -42,7 +42,7 @@ public final class CatchReferenceDecoratorDefinition extends DecoratorDefinition |
| 42 | 42 | public final String decorateContext(Locale locale, ObserveDtoReferenceDecoratorRenderer<CatchReference> renderer, CatchReference source, int index) {
|
| 43 | 43 | switch (index) {
|
| 44 | 44 | case 0:
|
| 45 | - return renderer.onNullValue("homeId", locale, source.getHomeId());
|
|
| 45 | + return renderer.onHomeId(locale, source.getHomeId());
|
|
| 46 | 46 | default:
|
| 47 | 47 | throw new IllegalStateException("No index with value: " + index);
|
| 48 | 48 | }
|
| ... | ... | @@ -42,7 +42,7 @@ public final class CatchDtoDecoratorDefinition extends DecoratorDefinition<Catch |
| 42 | 42 | public final String decorateContext(Locale locale, ObserveDtoDecoratorRenderer<CatchDto> renderer, CatchDto source, int index) {
|
| 43 | 43 | switch (index) {
|
| 44 | 44 | case 0:
|
| 45 | - return renderer.onNullValue("homeId", locale, source.getHomeId());
|
|
| 45 | + return renderer.onHomeId(locale, source.getHomeId());
|
|
| 46 | 46 | default:
|
| 47 | 47 | throw new IllegalStateException("No index with value: " + index);
|
| 48 | 48 | }
|
| ... | ... | @@ -42,7 +42,7 @@ public final class CatchReferenceDecoratorDefinition extends DecoratorDefinition |
| 42 | 42 | public final String decorateContext(Locale locale, ObserveDtoReferenceDecoratorRenderer<CatchReference> renderer, CatchReference source, int index) {
|
| 43 | 43 | switch (index) {
|
| 44 | 44 | case 0:
|
| 45 | - return renderer.onNullValue("homeId", locale, source.getHomeId());
|
|
| 45 | + return renderer.onHomeId(locale, source.getHomeId());
|
|
| 46 | 46 | default:
|
| 47 | 47 | throw new IllegalStateException("No index with value: " + index);
|
| 48 | 48 | }
|
| ... | ... | @@ -42,7 +42,7 @@ public final class TdrDtoDecoratorDefinition extends DecoratorDefinition<TdrDto, |
| 42 | 42 | public final String decorateContext(Locale locale, ObserveDtoDecoratorRenderer<TdrDto> renderer, TdrDto source, int index) {
|
| 43 | 43 | switch (index) {
|
| 44 | 44 | case 0:
|
| 45 | - return renderer.onNullValue("homeId", locale, source.getHomeId());
|
|
| 45 | + return renderer.onHomeId(locale, source.getHomeId());
|
|
| 46 | 46 | default:
|
| 47 | 47 | throw new IllegalStateException("No index with value: " + index);
|
| 48 | 48 | }
|
| ... | ... | @@ -42,7 +42,7 @@ public final class TdrReferenceDecoratorDefinition extends DecoratorDefinition<T |
| 42 | 42 | public final String decorateContext(Locale locale, ObserveDtoReferenceDecoratorRenderer<TdrReference> renderer, TdrReference source, int index) {
|
| 43 | 43 | switch (index) {
|
| 44 | 44 | case 0:
|
| 45 | - return renderer.onNullValue("homeId", locale, source.getHomeId());
|
|
| 45 | + return renderer.onHomeId(locale, source.getHomeId());
|
|
| 46 | 46 | default:
|
| 47 | 47 | throw new IllegalStateException("No index with value: " + index);
|
| 48 | 48 | }
|
| ... | ... | @@ -42,7 +42,7 @@ public final class CatchDecoratorDefinition extends DecoratorDefinition<Catch, O |
| 42 | 42 | public final String decorateContext(Locale locale, ObserveEntityDecoratorRenderer<Catch> renderer, Catch source, int index) {
|
| 43 | 43 | switch (index) {
|
| 44 | 44 | case 0:
|
| 45 | - return renderer.onNullValue("homeId", locale, source.getHomeId());
|
|
| 45 | + return renderer.onHomeId(locale, source.getHomeId());
|
|
| 46 | 46 | default:
|
| 47 | 47 | throw new IllegalStateException("No index with value: " + index);
|
| 48 | 48 | }
|
| ... | ... | @@ -42,7 +42,7 @@ public final class CatchDecoratorDefinition extends DecoratorDefinition<Catch, O |
| 42 | 42 | public final String decorateContext(Locale locale, ObserveEntityDecoratorRenderer<Catch> renderer, Catch source, int index) {
|
| 43 | 43 | switch (index) {
|
| 44 | 44 | case 0:
|
| 45 | - return renderer.onNullValue("homeId", locale, source.getHomeId());
|
|
| 45 | + return renderer.onHomeId(locale, source.getHomeId());
|
|
| 46 | 46 | default:
|
| 47 | 47 | throw new IllegalStateException("No index with value: " + index);
|
| 48 | 48 | }
|
| ... | ... | @@ -42,7 +42,7 @@ public final class TdrDecoratorDefinition extends DecoratorDefinition<Tdr, Obser |
| 42 | 42 | public final String decorateContext(Locale locale, ObserveEntityDecoratorRenderer<Tdr> renderer, Tdr source, int index) {
|
| 43 | 43 | switch (index) {
|
| 44 | 44 | case 0:
|
| 45 | - return renderer.onNullValue("homeId", locale, source.getHomeId());
|
|
| 45 | + return renderer.onHomeId(locale, source.getHomeId());
|
|
| 46 | 46 | default:
|
| 47 | 47 | throw new IllegalStateException("No index with value: " + index);
|
| 48 | 48 | }
|
| ... | ... | @@ -29,7 +29,7 @@ data.ll.logbook.Activity=${startTimeStamp::timestamp}##${vesselActivity::label} |
| 29 | 29 | data.ll.logbook.ActivitySample=${timeStamp::timestamp}##${coordinateStr}
|
| 30 | 30 | data.ll.logbook.BaitsComposition=${baitType::label}##${proportion}
|
| 31 | 31 | data.ll.logbook.BranchlinesComposition=${length}##${proportion}
|
| 32 | -data.ll.logbook.Catch=${homeId}
|
|
| 32 | +data.ll.logbook.Catch=${homeId::onHomeId}
|
|
| 33 | 33 | data.ll.logbook.FloatlinesComposition=${lineType::label}##${proportion}
|
| 34 | 34 | data.ll.logbook.HooksComposition=${hookType::label}##${proportion}
|
| 35 | 35 | data.ll.logbook.Sample=${timeStamp::timestamp}##${coordinateStr}
|
| ... | ... | @@ -40,7 +40,7 @@ data.ll.observation.BaitsComposition=${baitType::label}##${proportion} |
| 40 | 40 | data.ll.observation.Basket=${settingIdentifier} ( $(observe.Common.settingIdentifier) )##${haulingIdentifier} ( $(observe.Common.haulingIdentifier) )
|
| 41 | 41 | data.ll.observation.Branchline=${settingIdentifier} ( $(observe.Common.settingIdentifier) )##${haulingIdentifier} ( $(observe.Common.haulingIdentifier) )
|
| 42 | 42 | data.ll.observation.BranchlinesComposition=${length}##${proportion}
|
| 43 | -data.ll.observation.Catch=${homeId}
|
|
| 43 | +data.ll.observation.Catch=${homeId::onHomeId}
|
|
| 44 | 44 | data.ll.observation.Encounter=${encounterType::label}##${species::speciesLabel}
|
| 45 | 45 | data.ll.observation.FloatlinesComposition=${lineType::label}##${proportion}
|
| 46 | 46 | data.ll.observation.HooksComposition=${hookType::label}##${proportion}
|
| ... | ... | @@ -49,7 +49,7 @@ data.ll.observation.SectionTemplate=${id}##${floatlineLengths} |
| 49 | 49 | data.ll.observation.SensorUsed=${sensorType::label}$
|
| 50 | 50 | data.ll.observation.Set=$(observe.data.ll.observation.Set.type)
|
| 51 | 51 | data.ll.observation.SizeMeasure=${sizeMeasureType::label}##${size}
|
| 52 | -data.ll.observation.Tdr=${homeId}
|
|
| 52 | +data.ll.observation.Tdr=${homeId::onHomeId}
|
|
| 53 | 53 | data.ll.observation.TripActivityStub=${timeStamp::timestamp}
|
| 54 | 54 | data.ll.observation.WeightMeasure=${weightMeasureType::label}##${weight}
|
| 55 | 55 | data.ll.pairing.ActivityPairingResultItem=${observationActivity}##$(observe.data.ll.pairing.ActivityPairingResultItem.computedDistance) ${computedDistance}##$(observe.data.ll.pairing.ActivityPairingResultItem.computedTime) ${computedTimeStr}
|
| ... | ... | @@ -23,7 +23,7 @@ |
| 23 | 23 | <parent>
|
| 24 | 24 | <groupId>io.ultreia.maven</groupId>
|
| 25 | 25 | <artifactId>pom</artifactId>
|
| 26 | - <version>2023.22</version>
|
|
| 26 | + <version>2023.23</version>
|
|
| 27 | 27 | </parent>
|
| 28 | 28 | <groupId>fr.ird.observe</groupId>
|
| 29 | 29 | <artifactId>ird-observe</artifactId>
|
| 1 | 1 | observe.Common.dataGroupBy.count
|
| 2 | 2 | observe.Common.dataGroupBy.count.null
|
| 3 | 3 | observe.Common.no.date
|
| 4 | +observe.Common.no.homeId
|
|
| 4 | 5 | observe.Common.no.time
|
| 5 | 6 | observe.Common.no.unit
|
| 6 | 7 | observe.Common.nocode
|
| ... | ... | @@ -63,6 +63,13 @@ public class DefaultDecoratorRenderer<O> extends DecoratorRenderer<O> { |
| 63 | 63 | return value;
|
| 64 | 64 | }
|
| 65 | 65 | |
| 66 | + public String onHomeId(Locale locale, String value) {
|
|
| 67 | + if (value == null || value.isEmpty()) {
|
|
| 68 | + return I18n.l(locale, "observe.Common.no.homeId");
|
|
| 69 | + }
|
|
| 70 | + return value;
|
|
| 71 | + }
|
|
| 72 | + |
|
| 66 | 73 | @Override
|
| 67 | 74 | public String onNullValue(Locale locale, Object value) {
|
| 68 | 75 | if (value == null) return I18n.l(locale, "observe.Common.none");
|
| ... | ... | @@ -41,6 +41,7 @@ observe.Common.navigation.config.moduleName=Business domain |
| 41 | 41 | observe.Common.navigation.config.moduleName.description=Business domain to use
|
| 42 | 42 | observe.Common.no.coordinate=Unknown coordinate
|
| 43 | 43 | observe.Common.no.date=No date
|
| 44 | +observe.Common.no.homeId=No homeId
|
|
| 44 | 45 | observe.Common.no.time=No time
|
| 45 | 46 | observe.Common.no.unit=No unit
|
| 46 | 47 | observe.Common.no.value=No value
|
| ... | ... | @@ -41,6 +41,7 @@ observe.Common.navigation.config.moduleName=Module |
| 41 | 41 | observe.Common.navigation.config.moduleName.description=Module to use
|
| 42 | 42 | observe.Common.no.coordinate=Unknown coordinate \#TODO
|
| 43 | 43 | observe.Common.no.date=No date
|
| 44 | +observe.Common.no.homeId=No homeId \#TODO
|
|
| 44 | 45 | observe.Common.no.time=No time
|
| 45 | 46 | observe.Common.no.unit=No unit \#TODO
|
| 46 | 47 | observe.Common.no.value=No value
|
| ... | ... | @@ -41,6 +41,7 @@ observe.Common.navigation.config.moduleName=Domaine métier |
| 41 | 41 | observe.Common.navigation.config.moduleName.description=Domaine métier à utiliser
|
| 42 | 42 | observe.Common.no.coordinate=Position inconnue
|
| 43 | 43 | observe.Common.no.date=Date non définie
|
| 44 | +observe.Common.no.homeId=Pas d'identifiant
|
|
| 44 | 45 | observe.Common.no.time=Heure non définie
|
| 45 | 46 | observe.Common.no.unit=Pas d'unité
|
| 46 | 47 | observe.Common.no.value=Valeur non définie
|