changeset 4937:ce7d8e2a7e02

Fixed mainvalues artifact. * Use winfo artifact to get location information. * use ld_locations as data key.
author Raimund Renkert <rrenkert@intevation.de>
date Thu, 31 Jan 2013 13:20:05 +0100
parents 1366277655b9
children b878dce3a671
files flys-artifacts/src/main/java/de/intevation/flys/artifacts/MainValuesArtifact.java
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/MainValuesArtifact.java	Thu Jan 31 11:43:28 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/MainValuesArtifact.java	Thu Jan 31 13:20:05 2013 +0100
@@ -174,11 +174,11 @@
     protected void initialize(Artifact artifact, Object context, CallMeta meta) {
         logger.debug("MainValuesArtifact.initialize");
         FLYSArtifact winfo = (FLYSArtifact) artifact;
-        RangeAccess rangeAccess = new RangeAccess(this, null);
+        RangeAccess rangeAccess = new RangeAccess(winfo, null);
         double [] locations = rangeAccess.getLocations();
         if (locations != null) {
             double location = locations[0];
-            addData("location", new DefaultStateData("location", null, null,
+            addData("ld_locations", new DefaultStateData("ld_locations", null, null,
                     String.valueOf(location)));
         }
         else {
@@ -245,7 +245,7 @@
         River river = FLYSUtils.getRiver(this);
 
         // TODO use helper to get location as double
-        String locationStr = getDataAsString("location");
+        String locationStr = getDataAsString("ld_locations");
 
         if (river == null || locationStr == null) {
             return null;
@@ -262,7 +262,7 @@
      * @return the location.
      */
     public double getLocation() {
-        double location = Double.parseDouble(getDataAsString("location"));
+        double location = Double.parseDouble(getDataAsString("ld_locations"));
         return location;
     }
 

http://dive4elements.wald.intevation.org