comparison flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultArtifactDescription.java @ 3383:dc48bc58102f

commit omitted change. flys-client/trunk@5127 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 25 Jul 2012 12:39:13 +0000
parents 070321cf17e1
children e82acd5c86f7
comparison
equal deleted inserted replaced
3382:c20d5794a93f 3383:dc48bc58102f
114 public String getRiver() { 114 public String getRiver() {
115 return getDataValueAsString("river"); 115 return getDataValueAsString("river");
116 } 116 }
117 117
118 118
119 /** Get [min,max] of data items. */
119 public double[] getKMRange() { 120 public double[] getKMRange() {
120 Double[] mm = new Double[2]; 121 Double[] mm = new Double[2];
121 122
122 for (DataList list: oldData) { 123 for (DataList list: oldData) {
123 List<Data> dataList = list.getAll(); 124 List<Data> dataList = list.getAll();
124 125
125 for (Data data: dataList) { 126 for (Data data: dataList) {
126 String dataName = data.getLabel(); 127 String dataName = data.getLabel();
127 DataItem item = data.getItems()[0]; 128 DataItem item = data.getItems()[0];
128 129
129 if (dataName.equals("ld_from")) { 130 if (dataName.equals("ld_from") || dataName.equals("from")) {
130 Double d = DoubleUtils.getDouble(item.getStringValue()); 131 Double d = DoubleUtils.getDouble(item.getStringValue());
131 132
132 if (d != null) { 133 if (d != null) {
133 mm[0] = d; 134 mm[0] = d;
134 } 135 }
135 } 136 }
136 else if (dataName.equals("ld_to")) { 137 else if (dataName.equals("ld_to") || dataName.equals("to")) {
137 Double d = DoubleUtils.getDouble(item.getStringValue()); 138 Double d = DoubleUtils.getDouble(item.getStringValue());
138 139
139 if (d != null) { 140 if (d != null) {
140 mm[1] = d; 141 mm[1] = d;
141 } 142 }

http://dive4elements.wald.intevation.org