comparison flys-artifacts/src/main/java/de/intevation/flys/utils/ThemeUtil.java @ 3395:2a8919e0ed28

Cosmetics, doc. flys-artifacts/trunk@5025 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Tue, 17 Jul 2012 18:40:25 +0000
parents f091f2f55f88
children e08a6352fe24
comparison
equal deleted inserted replaced
3394:f091f2f55f88 3395:2a8919e0ed28
132 "/theme/field[@name='showmaximum']/@default"; 132 "/theme/field[@name='showmaximum']/@default";
133 133
134 public final static String XPATH_WSPLGEN_FIELDS = 134 public final static String XPATH_WSPLGEN_FIELDS =
135 "/theme[@name='WSPLGEN']/field"; 135 "/theme[@name='WSPLGEN']/field";
136 136
137 /** XPATH to bandwidth field. */
137 public final static String XPATH_BANDWIDTH = 138 public final static String XPATH_BANDWIDTH =
138 "/theme/field[@name='bandwidth']/@default"; 139 "/theme/field[@name='bandwidth']/@default";
139 140
140 141
141 /** Parse string to be boolean with default if empty or unrecognized. */ 142 /** Parse string to be boolean with default if empty or unrecognized. */
189 } 190 }
190 return 0; 191 return 0;
191 } 192 }
192 193
193 194
195 /**
196 * Parse band width, defaulting to 0.
197 * @param theme the theme.
198 */
194 public static int parseBandWidth(Document theme) { 199 public static int parseBandWidth(Document theme) {
195 String bandWidth = XMLUtils.xpathString(theme, XPATH_BANDWIDTH, null); 200 String bandWidth = XMLUtils.xpathString(theme, XPATH_BANDWIDTH, null);
196 201
197 return parseInteger(bandWidth, 0); 202 return parseInteger(bandWidth, 0);
198 } 203 }
204
199 205
200 public static int parsePointWidth(Document theme) { 206 public static int parsePointWidth(Document theme) {
201 String width = XMLUtils.xpathString(theme, XPATH_POINT_SIZE, null); 207 String width = XMLUtils.xpathString(theme, XPATH_POINT_SIZE, null);
202 208
203 return parseInteger(width, 3); 209 return parseInteger(width, 3);

http://dive4elements.wald.intevation.org