# HG changeset patch # User Raimund Renkert # Date 1339058881 0 # Node ID fa763b270e7857f3189390efb55048b9ba5de252 # Parent d20215a0afd8e38d84028f7d60f34c47daef5ec0 Changed facet description in fix analysis. flys-artifacts/trunk@4620 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r d20215a0afd8 -r fa763b270e78 flys-artifacts/ChangeLog --- 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 + + * src/main/java/de/intevation/flys/artifacts/states/fixation/FixationCompute.java: + Changed facet description. + 2012-06-06 Felix Wolfsteller * src/main/java/de/intevation/flys/artifacts/model/GaugeDischargeFacet.java, diff -r d20215a0afd8 -r fa763b270e78 flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/fixation/FixationCompute.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,