# HG changeset patch # User Felix Wolfsteller # Date 1328523341 0 # Node ID 0dcb8326be08ab9c61e2e7a18d89a8ba34b4dfec # Parent ea173e4c07c790b2a3aad49472b72a53b0436bb1 Add a not-yet-looked-at CSV facet for Reference Curve. flys-artifacts/trunk@3914 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r ea173e4c07c7 -r 0dcb8326be08 flys-artifacts/ChangeLog --- a/flys-artifacts/ChangeLog Mon Feb 06 08:36:26 2012 +0000 +++ b/flys-artifacts/ChangeLog Mon Feb 06 10:15:41 2012 +0000 @@ -1,3 +1,8 @@ +2012-02-06 Felix Wolfsteller + + * src/main/java/de/intevation/flys/artifacts/states/ReferenceCurveState.java: + Add CSV facet (not yet evaluated). + 2012-02-06 Ingo Weinzierl * src/main/java/de/intevation/flys/exports/HistoricalDischargeCurveExporter.java: diff -r ea173e4c07c7 -r 0dcb8326be08 flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/ReferenceCurveState.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/ReferenceCurveState.java Mon Feb 06 08:36:26 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/ReferenceCurveState.java Mon Feb 06 10:15:41 2012 +0000 @@ -8,6 +8,7 @@ import de.intevation.flys.artifacts.WINFOArtifact; import de.intevation.flys.artifacts.model.CalculationResult; +import de.intevation.flys.artifacts.model.DataFacet; import de.intevation.flys.artifacts.model.FacetTypes; import de.intevation.flys.artifacts.model.ReferenceCurveFacet; import de.intevation.flys.artifacts.model.ReportFacet; @@ -24,7 +25,7 @@ extends DefaultState implements FacetTypes { - private static Logger log = Logger.getLogger(ReferenceCurveState.class); + private static Logger logger = Logger.getLogger(ReferenceCurveState.class); public ReferenceCurveState() { } @@ -37,11 +38,12 @@ List facets, Object old ) { - if (!(artifact instanceof WINFOArtifact)) { return null; } + String id = getID(); + WINFOArtifact winfo = (WINFOArtifact)artifact; CalculationResult res = old instanceof CalculationResult @@ -62,6 +64,9 @@ if (wws.length > 0) { // TODO: Add CSV/PDF facets. + logger.debug("Adding CSV data facet."); + Facet csv = new DataFacet (CSV, "CSV data", ComputeType.ADVANCE, hash, id); + facets.add(csv); } if (res.getReport().hasProblems()) {