Mercurial > dive4elements > river
changeset 4624:bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Mon, 03 Dec 2012 17:07:03 +0100 |
parents | 89322548b044 |
children | d6d16b5ab2f0 |
files | flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FlowVelocityState.java |
diffstat | 1 files changed, 54 insertions(+), 27 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FlowVelocityState.java Mon Dec 03 17:04:28 2012 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FlowVelocityState.java Mon Dec 03 17:07:03 2012 +0100 @@ -68,34 +68,61 @@ int idx = 0; for (FlowVelocityData d: data) { - logger.error("TODO: Implement Facet creation for chart!"); - - newFacets.add(new FlowVelocityFacet( - idx, - FLOW_VELOCITY_MAINCHANNEL, - buildMainChannelName(artifact, context, d), - ComputeType.ADVANCE, - id, - hash - )); + if (d.getType().equals("main")) { + newFacets.add(new FlowVelocityFacet( + idx, + FLOW_VELOCITY_MAINCHANNEL, + buildMainChannelName(artifact, context, d), + ComputeType.ADVANCE, + id, + hash + )); - newFacets.add(new FlowVelocityFacet( - idx, - FLOW_VELOCITY_TOTALCHANNEL, - buildTotalChannelName(artifact, context, d), - ComputeType.ADVANCE, - id, - hash - )); - - newFacets.add(new FlowVelocityFacet( - idx, - FLOW_VELOCITY_TAU, - buildTauName(artifact, context, d), - ComputeType.ADVANCE, - id, - hash - )); + newFacets.add(new FlowVelocityFacet( + idx, + FLOW_VELOCITY_TAU, + buildTauName(artifact, context, d), + ComputeType.ADVANCE, + id, + hash + )); + } + else if (d.getType().equals("total")) { + newFacets.add(new FlowVelocityFacet( + idx, + FLOW_VELOCITY_TOTALCHANNEL, + buildTotalChannelName(artifact, context, d), + ComputeType.ADVANCE, + id, + hash + )); + } + else if(d.getType().equals("main_total")) { + newFacets.add(new FlowVelocityFacet( + idx, + FLOW_VELOCITY_MAINCHANNEL, + buildMainChannelName(artifact, context, d), + ComputeType.ADVANCE, + id, + hash + )); + newFacets.add(new FlowVelocityFacet( + idx, + FLOW_VELOCITY_TAU, + buildTauName(artifact, context, d), + ComputeType.ADVANCE, + id, + hash + )); + newFacets.add(new FlowVelocityFacet( + idx, + FLOW_VELOCITY_TOTALCHANNEL, + buildTotalChannelName(artifact, context, d), + ComputeType.ADVANCE, + id, + hash + )); + } newFacets.add(new FlowVelocityFacet( idx,