Mercurial > dive4elements > river
changeset 6912:058b8dc4e8b6
Artifacts: ThemeDocument. More debug output. Make more getters private to only expose the parsed values.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Fri, 23 Aug 2013 14:37:54 +0200 |
parents | 1f1acbe5f243 |
children | 08527cc6341f |
files | artifacts/src/main/java/org/dive4elements/river/themes/ThemeDocument.java |
diffstat | 1 files changed, 16 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/themes/ThemeDocument.java Fri Aug 23 14:17:35 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/themes/ThemeDocument.java Fri Aug 23 14:37:54 2013 +0200 @@ -99,8 +99,6 @@ public final static String SHOW_MAXIMUM = "showmaximum"; - public final static String WSPLGEN_FIELDS = "/theme[@name='WSPLGEN']/field"; - public final static String WSPLGEN_STARTCOLOR = "startcolor"; public final static String WSPLGEN_ENDCOLOR = "endcolor"; @@ -143,6 +141,9 @@ values.put(name, value); } } + if (logger.isDebugEnabled()) { + logger.debug("Theme values: " + values); + } return values; } @@ -457,13 +458,13 @@ return null; } - public String getLineColorString() { + private String getLineColorString() { return getValue(LINE_COLOR); } /** Get show border as string. */ - public String getShowBorderString() { + private String getShowBorderString() { return getValue(SHOW_BORDER); } @@ -473,31 +474,29 @@ return getValue(FILL_COLOR); } - public String getSymbol() { + private String getSymbol() { return getValue(SYMBOL); } - private String getTransparencyString() { return getValue(TRANSPARENCY); } - public String getAreaTransparencyString() { + private String getAreaTransparencyString() { return getValue(AREA_TRANSPARENCY); } - public String getShowMinimum() { + private String getShowMinimum() { return getValue(SHOW_MINIMUM); } - public String getShowMaximum() { + private String getShowMaximum() { return getValue(SHOW_MAXIMUM); } - /** * Gets color from color field. * @param theme the theme document. @@ -507,12 +506,10 @@ return parseRGB(getFillColorString()); } - public boolean parseShowBorder() { return parseBoolean(getShowBorderString(), false); } - public int parseTransparency() { return parseInteger(getTransparencyString(), 50); } @@ -645,7 +642,13 @@ * @param meta Caller meta object used to determine locale. * @return */ - protected static String createWSPLGENClassName(float val, float step, int idx, int maxIdx, CallMeta meta) { + protected static String createWSPLGENClassName( + float val, + float step, + int idx, + int maxIdx, + CallMeta meta + ) { assert meta != null : "CallMeta instance is null"; if (idx < maxIdx) {