changeset 3048:fa763b270e78

Changed facet description in fix analysis. flys-artifacts/trunk@4620 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 07 Jun 2012 08:48:01 +0000
parents d20215a0afd8
children 5e9533687a0c
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/fixation/FixationCompute.java
diffstat 2 files changed, 21 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Wed Jun 06 18:28:49 2012 +0000
+++ b/flys-artifacts/ChangeLog	Thu Jun 07 08:48:01 2012 +0000
@@ -1,3 +1,8 @@
+2012-06-07  Raimund Renkert <raimund.renkert@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/states/fixation/FixationCompute.java:
+	  Changed facet description.
+
 2012-06-06	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/model/GaugeDischargeFacet.java,
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/fixation/FixationCompute.java	Wed Jun 06 18:28:49 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/fixation/FixationCompute.java	Thu Jun 07 08:48:01 2012 +0000
@@ -1,5 +1,7 @@
 package de.intevation.flys.artifacts.states.fixation;
 
+import java.text.DateFormat;
+
 import de.intevation.artifactdatabase.state.Facet;
 
 import de.intevation.artifacts.CallContext;
@@ -89,10 +91,20 @@
             for (int j = access.getQSectorStart().intValue();
                  j <= access.getQSectorEnd().intValue();
                  j++) {
-                //TODO: replace j with q sector string.
-                String description = j + ": " +
-                                     period.getFrom().toString() + " - " +
-                                     period.getTo().toString();
+
+                DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM);
+                String startDate = df.format(period.getFrom());
+                String endDate = df.format(period.getTo());
+                String sector = "";
+                switch (j) {
+                    case 0: sector = "[0 - (MNQ+MQ)/2)"; break;
+                    case 1: sector = "[(MNQ+MQ)/2 - (MQ+MHQ)/2)"; break;
+                    case 2: sector = "[(MQ+MHQ)/2 - HQ5)"; break;
+                    case 3: sector = "[HQ5 - \u221e)"; break;
+                }
+                String description = sector + ": " +
+                                     startDate + " - " +
+                                     endDate;
                 facets.add(
                     new FixAvSectorFacet(j - access.getQSectorStart().intValue(),
                                          FIX_SECTOR_AVERAGE_DWT,

http://dive4elements.wald.intevation.org