Mercurial > dive4elements > river
changeset 4389:ecd237428af6
ThemeUtil: Method to parse/access showextramark theme prop.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Fri, 02 Nov 2012 15:10:39 +0100 |
parents | 7fc4855ecd26 |
children | c624aa9ca4cf |
files | flys-artifacts/src/main/java/de/intevation/flys/utils/ThemeUtil.java |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/utils/ThemeUtil.java Fri Nov 02 15:09:53 2012 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/utils/ThemeUtil.java Fri Nov 02 15:10:39 2012 +0100 @@ -121,6 +121,9 @@ public final static String XPATH_BANDWIDTH = "/theme/field[@name='bandwidth']/@default"; + /** XPATH to find showextramark field. */ + public final static String XPATH_SHOWEXTRAMARK = + "/theme/field[@name='showextramark']/@default"; /** Parse string to be boolean with default if empty or unrecognized. */ public static boolean parseBoolean(String value, boolean defaultsTo) { @@ -286,6 +289,15 @@ /** + * Parses the attribute 'showextramark', defaults to false. + * @param theme The theme. + */ + public static boolean parseShowExtraMark(Document theme) { + String show = XMLUtils.xpathString(theme, XPATH_SHOWEXTRAMARK, null); + return parseBoolean(show, false); + } + + /** * Parses the attribute 'showpoints', defaults to false. * @param theme The theme. */