diff flys-artifacts/src/main/java/de/intevation/flys/exports/DischargeCurveGenerator.java @ 743:e95e6df97e55

#177 Commented out the code that generates the series names in discharge curves. This code currently generates memory problems and stops the server accepting new http requests. flys-artifacts/trunk@2245 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Mon, 27 Jun 2011 07:45:32 +0000
parents 56bcf56b1fe0
children 7ca4a287cd0e
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/DischargeCurveGenerator.java	Sun Jun 26 17:18:59 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/DischargeCurveGenerator.java	Mon Jun 27 07:45:32 2011 +0000
@@ -150,33 +150,37 @@
 
 
     protected String getSeriesName(Gauge gauge) {
-        List<DischargeTable> dts = gauge.getDischargeTables();
-
-        for (DischargeTable dt: dts) {
-            if (dt.getKind() == 0) {
-                TimeInterval ti = dt.getTimeInterval();
-
-                Date start = ti.getStartTime();
-                Date end   = ti.getStopTime();
-
-                String name  = gauge.getName();
+        // XXX The following code stops the artifact server accepting new HTTP
+        // requests. It needs more analysis! Is loading the discharge table a
+        // memory problem? Or is the time interval the problem?
 
-                if (end == null) {
-                    Object[] args = new Object[] { name, start };
-                    return msg(
-                        "chart.discharge.curve.curve.valid.from",
-                        "",
-                        args);
-                }
-                else {
-                    Object[] args = new Object[] { name, start, end };
-                    return msg(
-                        "chart.discharge.curve.curve.valid.range",
-                        "",
-                        args);
-                }
-            }
-        }
+        //List<DischargeTable> dts = gauge.getDischargeTables();
+
+        //for (DischargeTable dt: dts) {
+        //    if (dt.getKind() == 0) {
+        //        TimeInterval ti = dt.getTimeInterval();
+
+        //        Date start = ti.getStartTime();
+        //        Date end   = ti.getStopTime();
+
+        //        String name  = gauge.getName();
+
+        //        if (end == null) {
+        //            Object[] args = new Object[] { name, start };
+        //            return msg(
+        //                "chart.discharge.curve.curve.valid.from",
+        //                "",
+        //                args);
+        //        }
+        //        else {
+        //            Object[] args = new Object[] { name, start, end };
+        //            return msg(
+        //                "chart.discharge.curve.curve.valid.range",
+        //                "",
+        //                args);
+        //        }
+        //    }
+        //}
 
         return gauge.getName();
     }

http://dive4elements.wald.intevation.org