comparison gnv-artifacts/src/main/java/de/intevation/gnv/state/CoordinateSelectionState.java @ 778:9a828e5a2390

Removed trailing whitespace gnv-artifacts/trunk@851 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 29 Mar 2010 07:58:51 +0000
parents 292fbcd5e9ac
children b1f5f2a8840f
comparison
equal deleted inserted replaced
777:8009961db1cb 778:9a828e5a2390
35 35
36 /** 36 /**
37 * the logger, used to log exceptions and additonaly information 37 * the logger, used to log exceptions and additonaly information
38 */ 38 */
39 private static Logger log = Logger.getLogger(CoordinateSelectionState.class); 39 private static Logger log = Logger.getLogger(CoordinateSelectionState.class);
40 40
41 /** 41 /**
42 * The UID of this Class 42 * The UID of this Class
43 */ 43 */
44 private static final long serialVersionUID = 6318923553625195063L; 44 private static final long serialVersionUID = 6318923553625195063L;
45 45
46 /** 46 /**
47 * XPATH Expressions for the setup. 47 * XPATH Expressions for the setup.
48 */ 48 */
49 49
50 private final static String MESH_WIDTH_XPATH = "mesh-width"; 50 private final static String MESH_WIDTH_XPATH = "mesh-width";
51 private final static String XLINK_XPATH = "xlink:href"; 51 private final static String XLINK_XPATH = "xlink:href";
52 private final static String MESH_LIST_XPATH = "/mesh-widths/mesh"; 52 private final static String MESH_LIST_XPATH = "/mesh-widths/mesh";
53 private final static String ID_XPATH = "id"; 53 private final static String ID_XPATH = "id";
54 private final static String WIDTH_VALUE_XPATH = "width"; 54 private final static String WIDTH_VALUE_XPATH = "width";
55 55
56 /** 56 /**
57 * Holds all given Widths between two MeshPoints for different Meshes. 57 * Holds all given Widths between two MeshPoints for different Meshes.
58 */ 58 */
59 private HashMap<String, Double> meshWidths = null; 59 private HashMap<String, Double> meshWidths = null;
60 60
105 log.error(e,e); 105 log.error(e,e);
106 } catch (ValidationException e) { 106 } catch (ValidationException e) {
107 log.error(e,e); 107 log.error(e,e);
108 } 108 }
109 return returnValue; 109 return returnValue;
110 110
111 } 111 }
112 112
113 /** 113 /**
114 * @see de.intevation.gnv.state.StateBase#extractKVP(java.util.Collection, java.lang.String, java.lang.String) 114 * @see de.intevation.gnv.state.StateBase#extractKVP(java.util.Collection, java.lang.String, java.lang.String)
115 */ 115 */
116 @Override 116 @Override
117 protected NamedCollection<KeyValueDescibeData> extractKVP( 117 protected NamedCollection<KeyValueDescibeData> extractKVP(
130 String geomString = this.convert2DisplayCoordinate(resultValue.getString(valueid)); 130 String geomString = this.convert2DisplayCoordinate(resultValue.getString(valueid));
131 String value = geomString; 131 String value = geomString;
132 if (resultValue.getResultDescriptor().getColumnIndex("VALUE") > 0){ 132 if (resultValue.getResultDescriptor().getColumnIndex("VALUE") > 0){
133 value = resultValue.getString("VALUE") + " - "+value; 133 value = resultValue.getString("VALUE") + " - "+value;
134 } 134 }
135 135
136 136
137 keyValueDescibeData.add(new DefaultKeyValueDescribeData(key,value )); 137 keyValueDescibeData.add(new DefaultKeyValueDescribeData(key,value ));
138 } 138 }
139 prevKey = key; 139 prevKey = key;
140 } 140 }
141 return keyValueDescibeData; 141 return keyValueDescibeData;
142 } 142 }
143 143
144 protected static String convert2DisplayCoordinate(String wkt){ 144 protected static String convert2DisplayCoordinate(String wkt){
145 return WKTUtils.toText(wkt); 145 return WKTUtils.toText(wkt);
146 } 146 }
147 147
148 /** 148 /**
150 */ 150 */
151 @Override 151 @Override
152 public void setup(Node configuration) { 152 public void setup(Node configuration) {
153 super.setup(configuration); 153 super.setup(configuration);
154 Element widthElement = (Element)Config.getNodeXPath(configuration, MESH_WIDTH_XPATH); 154 Element widthElement = (Element)Config.getNodeXPath(configuration, MESH_WIDTH_XPATH);
155 155
156 if (widthElement != null){ 156 if (widthElement != null){
157 String fileName = widthElement.getAttribute(XLINK_XPATH); 157 String fileName = widthElement.getAttribute(XLINK_XPATH);
158 fileName = Config.replaceConfigDir(fileName); 158 fileName = Config.replaceConfigDir(fileName);
159 Node configurationNode = new ArtifactXMLUtilities().readConfiguration(fileName); 159 Node configurationNode = new ArtifactXMLUtilities().readConfiguration(fileName);
160 NodeList meshNodes = Config.getNodeSetXPath(configurationNode,MESH_LIST_XPATH ); 160 NodeList meshNodes = Config.getNodeSetXPath(configurationNode,MESH_LIST_XPATH );

http://dive4elements.wald.intevation.org