Mercurial > dive4elements > river
changeset 3634:001e35349203
Fix issue829, wst col indices start with 0.
flys-artifacts/trunk@5342 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Sat, 01 Sep 2012 15:44:38 +0000 |
parents | ebfce31c7eec |
children | 6342166ccdef |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/WQKmsInterpolArtifact.java |
diffstat | 2 files changed, 16 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Sat Sep 01 08:44:39 2012 +0000 +++ b/flys-artifacts/ChangeLog Sat Sep 01 15:44:38 2012 +0000 @@ -1,3 +1,10 @@ +2012-09-01 Felix Wolfsteller <felix.wolfsteller@intevation.de> + + Fix issue829 (wrong fixation names). + + * src/main/java/de/intevation/flys/artifacts/WQKmsInterpolArtifact.java: + Fix check, column indices start with 0. + 2012-09-01 Sascha L. Teichmann <sascha.teichmann@intevation.de> * src/main/java/de/intevation/flys/artifacts/model/minfo/BedHeight.java,
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WQKmsInterpolArtifact.java Sat Sep 01 08:44:39 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WQKmsInterpolArtifact.java Sat Sep 01 15:44:38 2012 +0000 @@ -43,9 +43,11 @@ private static Logger logger = Logger.getLogger(WQKmsInterpolArtifact.class); + /** State name. */ public static final String STATIC_STATE_NAME = "state.additional_wqkms.interpol.static"; + /** Artifact name. */ private static final String NAME = "staticwqkmsinterpol"; static { @@ -66,6 +68,7 @@ } + /** Return fixed artifact (types) name. */ @Override public String getName() { return NAME; @@ -95,6 +98,8 @@ if (code != null) { String [] parts = code.split("-"); + logger.debug("WQKmsInterpolArtifact.setup: code " + code); + if (parts.length >= 4) { int wst = Integer.parseInt(parts[3]); int col = -1; @@ -108,7 +113,7 @@ addStringData("col_pos", parts[2]); } addStringData("wst_id", parts[3]); - String wkmsName = (col > 0) + String wkmsName = (col >= 0) ? WKmsFactory.getWKmsName(col, wst) : WKmsFactory.getWKmsName(wst); String name; @@ -131,6 +136,9 @@ facets.put(state.getID(), fs); } } + else { + logger.warn("WQKmsInterpolArtifact: no code"); + } spawnState(); super.setup(identifier, factory, context, callMeta, data);