Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
5 changed files:
- client-core/src/main/java/fr/ird/observe/client/ui/tree/navigation/NavigationTreeCellRenderer.java
- persistence/src/main/java/fr/ird/observe/entities/data/ps/observation/ActivitySeineImpl.java
- persistence/src/main/java/fr/ird/observe/entities/data/ps/observation/ActivitySeines.java
- persistence/src/main/models/Observe-20-data-ps-observation.model
- services-local/src/main/java/fr/ird/observe/services/local/service/actions/consolidate/ConsolidateDataServiceLocal.java
Changes:
| ... | ... | @@ -26,6 +26,7 @@ import fr.ird.observe.client.ui.tree.navigation.nodes.NavigationTreeNodeSupport; |
| 26 | 26 |
import org.apache.logging.log4j.LogManager;
|
| 27 | 27 |
import org.apache.logging.log4j.Logger;
|
| 28 | 28 |
import org.jdesktop.swingx.renderer.StringValue;
|
| 29 |
+import org.jdesktop.swingx.tree.DefaultXTreeCellRenderer;
|
|
| 29 | 30 |
|
| 30 | 31 |
import javax.swing.Icon;
|
| 31 | 32 |
import javax.swing.JLabel;
|
| ... | ... | @@ -41,7 +42,7 @@ import java.awt.Dimension; |
| 41 | 42 |
* @author Tony Chemit - dev@tchemit.fr
|
| 42 | 43 |
* @since 6.0
|
| 43 | 44 |
*/
|
| 44 |
-public class NavigationTreeCellRenderer extends DefaultTreeCellRenderer implements StringValue {
|
|
| 45 |
+public class NavigationTreeCellRenderer extends DefaultXTreeCellRenderer implements StringValue {
|
|
| 45 | 46 |
|
| 46 | 47 |
/** Logger */
|
| 47 | 48 |
private static final Logger log = LogManager.getLogger(NavigationTreeCellRenderer.class);
|
| ... | ... | @@ -37,11 +37,6 @@ public class ActivitySeineImpl extends ActivitySeineAbstract { |
| 37 | 37 |
|
| 38 | 38 |
private static final String PROPERTY_CHANGED_ZONE_OPERATION = "changedZoneOperation";
|
| 39 | 39 |
|
| 40 |
- @Override
|
|
| 41 |
- public boolean isDCPOperation() {
|
|
| 42 |
- return vesselActivitySeine != null && ActivitySeines.DCP_OPERATIONS.contains(vesselActivitySeine.getCode());
|
|
| 43 |
- }
|
|
| 44 |
- |
|
| 45 | 40 |
@Override
|
| 46 | 41 |
public boolean isSetOperation() {
|
| 47 | 42 |
return vesselActivitySeine != null && ActivitySeines.CALEE_OPERATIONS.contains(vesselActivitySeine.getCode());
|
| ... | ... | @@ -57,8 +57,6 @@ public class ActivitySeines { |
| 57 | 57 |
public static final String ACTIVITY_FIN_DE_PECHE = "6";
|
| 58 | 58 |
public static final List<String> CALEE_OPERATIONS = Collections.singletonList(ACTIVITY_FIN_DE_PECHE);
|
| 59 | 59 |
public static final String ACTIVITY_CHANGED_ZONE = "21";
|
| 60 |
- public static final List<String> DCP_OPERATIONS = Arrays.asList("13", "14", "15");
|
|
| 61 |
- |
|
| 62 | 60 |
|
| 63 | 61 |
/** Logger. */
|
| 64 | 62 |
private static final Logger log = LogManager.getLogger(ActivitySeines.class);
|
| ... | ... | @@ -31,7 +31,6 @@ currentFpaZone {*:0..1} referential.common.FpaZone |
| 31 | 31 |
previousFpaZone {*:0..1} referential.common.FpaZone
|
| 32 | 32 |
nextFpaZone {*:0..1} referential.common.FpaZone
|
| 33 | 33 |
dataQuality {*:0..1} referential.common.DataQuality
|
| 34 |
-isDCPOperation() boolean
|
|
| 35 | 34 |
isSetOperation() boolean
|
| 36 | 35 |
isObservedSystemOperation() boolean
|
| 37 | 36 |
getSchoolType() !fr.ird.observe.dto.data.ps.SchoolType
|
| ... | ... | @@ -227,9 +227,10 @@ public class ConsolidateDataServiceLocal extends ObserveServiceLocal implements |
| 227 | 227 |
|
| 228 | 228 |
String activityPrefix = String.format("%s - Activity [%s/%s] ", routePrefix, ++activityIndex, activityMax);
|
| 229 | 229 |
|
| 230 |
- if (!activitySeine.isSetOperation() && !activitySeine.isDCPOperation()) {
|
|
| 231 |
- log.info(String.format("%s Skip activity (No set nor dcp): %s", activityPrefix, activitySeine.getTopiaId()));
|
|
| 232 |
- continue;
|
|
| 230 |
+ boolean floatingObjectEmpty = activitySeine.isFloatingObjectEmpty();
|
|
| 231 |
+ if (!activitySeine.isSetOperation() && floatingObjectEmpty) {
|
|
| 232 |
+ log.info(String.format("%s Skip activity (No set nor dcp found): %s", activityPrefix, activitySeine.getTopiaId()));
|
|
| 233 |
+ continue;
|
|
| 233 | 234 |
}
|
| 234 | 235 |
|
| 235 | 236 |
ConsolidateActivitySeineDataResultBuilder resultBuilder = new ConsolidateActivitySeineDataResultBuilder(applicationLocale, referenceLocale, activitySeine.getTopiaId(), ActivitySeines.decorate(referenceLocale.ordinal(), activitySeine));
|