Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WQSelect.java @ 2556:efb2038783f9
Renamed state data fields for W/Q input.
flys-artifacts/trunk@4074 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 17 Feb 2012 11:03:28 +0000 |
parents | c7dbe696286c |
children | 71086a3a1c5f |
comparison
equal
deleted
inserted
replaced
2555:ba46af45b6e4 | 2556:efb2038783f9 |
---|---|
46 | 46 |
47 /** The max number of steps for Qs and Ws. */ | 47 /** The max number of steps for Qs and Ws. */ |
48 public static final int MAX_STEPS = 30; | 48 public static final int MAX_STEPS = 30; |
49 | 49 |
50 /** The name of the 'mode' field. */ | 50 /** The name of the 'mode' field. */ |
51 public static final String WQ_MODE = "wq_mode"; | 51 public static final String WQ_MODE = "wq_isq"; |
52 | 52 |
53 /** Them name fo the 'free' field. */ | 53 /** Them name fo the 'free' field. */ |
54 public static final String WQ_FREE = "wq_free"; | 54 public static final String WQ_FREE = "wq_isfree"; |
55 | 55 |
56 /** The name of the 'selection' field. */ | 56 /** The name of the 'selection' field. */ |
57 public static final String WQ_SELECTION = "wq_selection"; | 57 public static final String WQ_SELECTION = "wq_isrange"; |
58 | 58 |
59 /** The name of the 'from' field. */ | 59 /** The name of the 'from' field. */ |
60 public static final String WQ_FROM = "wq_from"; | 60 public static final String WQ_FROM = "wq_from"; |
61 | 61 |
62 /** The name of the 'to' field. */ | 62 /** The name of the 'to' field. */ |
87 ) { | 87 ) { |
88 if (!name.equals(WQ_SINGLE)) { | 88 if (!name.equals(WQ_SINGLE)) { |
89 return super.createStaticData(flys, creator, cc, name, value, type); | 89 return super.createStaticData(flys, creator, cc, name, value, type); |
90 } | 90 } |
91 | 91 |
92 boolean isQ = flys.getDataAsBoolean(WQ_MODE); | 92 Boolean isQ = flys.getDataAsBoolean(WQ_MODE); |
93 boolean isFree = flys.getDataAsBoolean(WQ_FREE); | 93 Boolean isFree = flys.getDataAsBoolean(WQ_FREE); |
94 | 94 |
95 WINFOArtifact winfo = (WINFOArtifact) flys; | 95 WINFOArtifact winfo = (WINFOArtifact) flys; |
96 | 96 |
97 Element dataElement = creator.create("data"); | 97 Element dataElement = creator.create("data"); |
98 creator.addAttr(dataElement, "name", name, true); | 98 creator.addAttr(dataElement, "name", name, true); |
452 logger.debug("WQSelect.validate"); | 452 logger.debug("WQSelect.validate"); |
453 | 453 |
454 WINFOArtifact flys = (WINFOArtifact) artifact; | 454 WINFOArtifact flys = (WINFOArtifact) artifact; |
455 | 455 |
456 StateData data = getData(flys, WQ_SELECTION); | 456 StateData data = getData(flys, WQ_SELECTION); |
457 boolean isRange = data != null | 457 boolean isRange = data != null |
458 ? Boolean.valueOf((String) data.getValue()) | 458 ? Boolean.valueOf((String) data.getValue()) |
459 : false; | 459 : false; |
460 | |
461 | |
460 | 462 |
461 if (!isRange) { | 463 if (!isRange) { |
462 return validateSingle(artifact); | 464 return validateSingle(artifact); |
463 } | 465 } |
464 else { | 466 else { |