# HG changeset patch # User Raimund Renkert # Date 1359634805 -3600 # Node ID ce7d8e2a7e020e0d702fef151ca7e8b54dca1585 # Parent 1366277655b9aabdf654d394e12004f1bbe3683f Fixed mainvalues artifact. * Use winfo artifact to get location information. * use ld_locations as data key. diff -r 1366277655b9 -r ce7d8e2a7e02 flys-artifacts/src/main/java/de/intevation/flys/artifacts/MainValuesArtifact.java --- 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; }