[Dive4elements-commits] [PATCH 2 of 6] FlowVelocityState: Create new discharge facet
Wald Commits
scm-commit at wald.intevation.org
Fri Nov 9 12:05:34 CET 2012
# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1352459295 -3600
# Node ID 4d856f11e527ca8a0fc0fb487a2fc2fc73eaaa32
# Parent ffed8687e2b1b89e0b0aa5748f40d9cdf5646981
FlowVelocityState: Create new discharge facet.
diff -r ffed8687e2b1 -r 4d856f11e527 flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FlowVelocityState.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FlowVelocityState.java Fri Nov 09 12:07:14 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FlowVelocityState.java Fri Nov 09 12:08:15 2012 +0100
@@ -20,11 +20,11 @@
import de.intevation.flys.artifacts.resources.Resources;
+/* State in which flow velocities can/will be calculated. */
public class FlowVelocityState extends DefaultState implements FacetTypes {
private static Logger logger = Logger.getLogger(FlowVelocityState.class);
-
public static final String I18N_MAINCHANNEL_FACET =
"facet.flow_velocity.mainchannel";
@@ -34,6 +34,9 @@
public static final String I18N_TAU_FACET =
"facet.flow_velocity.tauchannel";
+ public static final String I18N_DISCHARGE_FACET =
+ "facet.flow_velocity.discharge";
+
@Override
public Object computeAdvance(
@@ -94,6 +97,15 @@
hash
));
+ newFacets.add(new FlowVelocityFacet(
+ idx,
+ FLOW_VELOCITY_DISCHARGE,
+ buildDischargeName(artifact, context, d),
+ ComputeType.ADVANCE,
+ id,
+ hash
+ ));
+
idx++;
}
@@ -148,6 +160,14 @@
}
+ protected String buildDischargeName(
+ FLYSArtifact flys,
+ CallContext cc,
+ FlowVelocityData data
+ ) {
+ return buildFacetName(flys, cc, data, I18N_DISCHARGE_FACET);
+ }
+
protected String buildTauName(
FLYSArtifact flys,
CallContext cc,
More information about the Dive4elements-commits
mailing list