Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/SINFOArtifact.java @ 8980:b194fa64506a
SINFO - show results themes according to spec, either raw data or floating mean values.
Some improvements to error handling and handling of empty results.
author | gernotbelger |
---|---|
date | Thu, 05 Apr 2018 18:30:34 +0200 |
parents | ee5ce13016ed |
children | 45bbd2c232f8 |
comparison
equal
deleted
inserted
replaced
8979:951a4af24a09 | 8980:b194fa64506a |
---|---|
13 import org.dive4elements.artifactdatabase.state.Facet; | 13 import org.dive4elements.artifactdatabase.state.Facet; |
14 import org.dive4elements.artifactdatabase.state.FacetActivity; | 14 import org.dive4elements.artifactdatabase.state.FacetActivity; |
15 import org.dive4elements.artifacts.Artifact; | 15 import org.dive4elements.artifacts.Artifact; |
16 import org.dive4elements.river.artifacts.D4EArtifact; | 16 import org.dive4elements.river.artifacts.D4EArtifact; |
17 import org.dive4elements.river.artifacts.sinfo.common.D50Processor; | 17 import org.dive4elements.river.artifacts.sinfo.common.D50Processor; |
18 import org.dive4elements.river.artifacts.sinfo.common.FlowDepthDevelopmentPerYearProcessor; | |
18 import org.dive4elements.river.artifacts.sinfo.common.FlowDepthDevelopmentProcessor; | 19 import org.dive4elements.river.artifacts.sinfo.common.FlowDepthDevelopmentProcessor; |
19 import org.dive4elements.river.artifacts.sinfo.common.FlowDepthProcessor; | 20 import org.dive4elements.river.artifacts.sinfo.common.FlowDepthProcessor; |
20 import org.dive4elements.river.artifacts.sinfo.common.TauProcessor; | 21 import org.dive4elements.river.artifacts.sinfo.common.TauProcessor; |
21 import org.dive4elements.river.artifacts.sinfo.common.VelocityProcessor; | 22 import org.dive4elements.river.artifacts.sinfo.common.VelocityProcessor; |
22 | 23 |
50 // BEWARE: we can only define one activity for "sinfo", so we use the artifact as place for this | 51 // BEWARE: we can only define one activity for "sinfo", so we use the artifact as place for this |
51 FacetActivity.Registry.getInstance().register("sinfo", new FacetActivity() { | 52 FacetActivity.Registry.getInstance().register("sinfo", new FacetActivity() { |
52 @Override | 53 @Override |
53 public Boolean isInitialActive(final Artifact artifact, final Facet facet, final String output) { | 54 public Boolean isInitialActive(final Artifact artifact, final Facet facet, final String output) { |
54 | 55 |
56 final String name = facet.getName(); | |
57 | |
55 if ("sinfo_tkk".equals(output)) { | 58 if ("sinfo_tkk".equals(output)) { |
56 final String name = facet.getName(); | |
57 if (FlowDepthProcessor.FACET_FLOW_DEPTH_FILTERED.equals(name)) | 59 if (FlowDepthProcessor.FACET_FLOW_DEPTH_FILTERED.equals(name)) |
58 return Boolean.FALSE; | 60 return Boolean.FALSE; |
59 if (VelocityProcessor.FACET_TKH_VELOCITY_FILTERED.equals(name)) | 61 if (VelocityProcessor.FACET_TKH_VELOCITY_FILTERED.equals(name)) |
60 return Boolean.FALSE; | 62 return Boolean.FALSE; |
61 if (TauProcessor.FACET_TKH_TAU_FILTERED.equals(name)) | 63 if (TauProcessor.FACET_TKH_TAU_FILTERED.equals(name)) |
63 if (D50Processor.FACET_TKH_D50_FILTERED.equals(name)) | 65 if (D50Processor.FACET_TKH_D50_FILTERED.equals(name)) |
64 return Boolean.FALSE; | 66 return Boolean.FALSE; |
65 } | 67 } |
66 | 68 |
67 if ("sinfo_flow_depth_development".equals(output)) { | 69 if ("sinfo_flow_depth_development".equals(output)) { |
68 final String name = facet.getName(); | |
69 if (FlowDepthProcessor.FACET_FLOW_DEPTH_CURRENT_FILTERED.equals(name)) | 70 if (FlowDepthProcessor.FACET_FLOW_DEPTH_CURRENT_FILTERED.equals(name)) |
70 return Boolean.FALSE; | 71 return Boolean.FALSE; |
71 if (FlowDepthProcessor.FACET_FLOW_DEPTH_HISTORICAL_FILTERED.equals(name)) | 72 if (FlowDepthProcessor.FACET_FLOW_DEPTH_HISTORICAL_FILTERED.equals(name)) |
72 return Boolean.FALSE; | 73 return Boolean.FALSE; |
73 if (FlowDepthDevelopmentProcessor.FACET_WATERLEVEL_DIFFERENCE_FILTERED.equals(name)) | 74 if (FlowDepthDevelopmentProcessor.FACET_WATERLEVEL_DIFFERENCE_FILTERED.equals(name)) |
74 return Boolean.FALSE; | 75 return Boolean.FALSE; |
75 if (FlowDepthDevelopmentProcessor.FACET_BEDHEIGHT_DIFFERENCE_FILTERED.equals(name)) | 76 if (FlowDepthDevelopmentProcessor.FACET_BEDHEIGHT_DIFFERENCE_FILTERED.equals(name)) |
76 return Boolean.FALSE; | 77 return Boolean.FALSE; |
77 } | 78 } |
79 | |
80 if (FlowDepthProcessor.FACET_FLOW_DEPTH_RAW.equals(name)) | |
81 return Boolean.FALSE; | |
82 if (FlowDepthProcessor.FACET_FLOW_DEPTH_TKH_RAW.equals(name)) | |
83 return Boolean.FALSE; | |
84 if (FlowDepthProcessor.FACET_FLOW_DEPTH_CURRENT_RAW.equals(name)) | |
85 return Boolean.FALSE; | |
86 if (FlowDepthProcessor.FACET_FLOW_DEPTH_HISTORICAL_RAW.equals(name)) | |
87 return Boolean.FALSE; | |
88 if (FlowDepthProcessor.FACET_FLOW_DEPTH_MIN_RAW.equals(name)) | |
89 return Boolean.FALSE; | |
90 if (FlowDepthProcessor.FACET_FLOW_DEPTH_MAX_RAW.equals(name)) | |
91 return Boolean.FALSE; | |
92 | |
93 if (FlowDepthDevelopmentProcessor.FACET_FLOW_DEPTH_DEVELOPMENT_RAW.equals(name)) | |
94 return Boolean.FALSE; | |
95 if (FlowDepthDevelopmentPerYearProcessor.FACET_FLOW_DEPTH_DEVELOPMENT_PER_YEAR_RAW.equals(name)) | |
96 return Boolean.FALSE; | |
78 | 97 |
79 return null; | 98 return null; |
80 } | 99 } |
81 }); | 100 }); |
82 } | 101 } |