changeset 9690:870d4585cab7

S-Info: collision single year themes initially inactive when epoch selection
author mschaefer
date Thu, 14 Jan 2021 14:58:55 +0100
parents fabf92342ee5
children 4311db5dacc8
files artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/SINFOArtifact.java
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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;
             }
         });

http://dive4elements.wald.intevation.org