diff flys-artifacts/src/main/java/de/intevation/flys/utils/ThemeUtil.java @ 2674:2be59d5b342c

Added and respect theme prop whether or not to display (not yet calculated) middle height. flys-artifacts/trunk@4368 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 09 May 2012 20:05:46 +0000
parents 6da7e064ae90
children 55f91fae8a7b
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/utils/ThemeUtil.java	Wed May 09 19:03:54 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/utils/ThemeUtil.java	Wed May 09 20:05:46 2012 +0000
@@ -85,6 +85,9 @@
     public final static String XPATH_SHOW_AREA =
         "/theme/field[@name='showarea']/@default";
 
+    public final static String XPATH_SHOW_MIDDLE_HEIGHT =
+        "/theme/field[@name='showmiddleheight']/@default";
+
     public final static String XPATH_TEXT_COLOR =
         "/theme/field[@name='textcolor']/@default";
 
@@ -249,6 +252,15 @@
     }
 
     /**
+     * Parses the attribute 'showmiddleheight', defaults to false.
+     * @param theme The theme.
+     */
+    public static boolean parseShowMiddleHeight(Document theme) {
+        String show = XMLUtils.xpathString(theme, XPATH_SHOW_MIDDLE_HEIGHT, null);
+        return parseBoolean(show, false);
+    }
+
+    /**
      * Parses the attribute 'showarea', defaults to false.
      * @param theme The theme.
      */

http://dive4elements.wald.intevation.org