[PATCH] S-Info: collision single year themes initially inactive when epoch selection

Wald Commits scm-commit at wald.intevation.org
Thu Jan 14 14:59:18 CET 2021


# HG changeset patch
# User mschaefer
# Date 1610632735 -3600
#      Thu Jan 14 14:58:55 2021 +0100
# Node ID 870d4585cab7bc9de625d74e43e6cd51e0bd9374
# Parent  fabf92342ee5def98b8849c1a1731307089bced9
S-Info: collision single year themes initially inactive when epoch selection

diff -r fabf92342ee5 -r 870d4585cab7 artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/SINFOArtifact.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/SINFOArtifact.java	Thu Aug 13 17:28:20 2020 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/SINFOArtifact.java	Thu Jan 14 14:58:55 2021 +0100
@@ -14,6 +14,7 @@
 import org.dive4elements.artifactdatabase.state.FacetActivity;
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.river.artifacts.D4EArtifact;
+import org.dive4elements.river.artifacts.sinfo.collision.CollisionAccess;
 import org.dive4elements.river.artifacts.sinfo.common.D50Processor;
 import org.dive4elements.river.artifacts.sinfo.common.FlowDepthDevelopmentPerYearProcessor;
 import org.dive4elements.river.artifacts.sinfo.common.FlowDepthDevelopmentProcessor;
@@ -119,6 +120,15 @@
                 if (FloodQProcessor.FACET_MAIN_VALUE_Q.equals(name))
                     return Boolean.FALSE;
 
+                // Einzeljahr-Themen bei Epochenwahl der Grundberuehrungen initial inaktiv setzen.
+                if ("sinfo_collision".equals(output)) {
+                    final CollisionAccess access = new CollisionAccess((SINFOArtifact) artifact);
+                    if (access.getYears() == null) {
+                        if (!facet.getDescription().contains("-"))
+                            return Boolean.FALSE;
+                    }
+                }
+
                 return null;
             }
         });


More information about the Dive4Elements-commits mailing list