[PATCH] Artifacts: ThemeDocument. More debug output. Make more getters private to only expose the parsed values

Wald Commits scm-commit at wald.intevation.org
Fri Aug 23 14:37:58 CEST 2013


# HG changeset patch
# User Sascha L. Teichmann <teichmann at intevation.de>
# Date 1377261474 -7200
# Node ID 058b8dc4e8b6794b9d1d1bcda9feec3771e0cb7d
# Parent  1f1acbe5f24389684159dedda03058cf524d47f3
Artifacts: ThemeDocument. More debug output. Make more getters private to only expose the parsed values.

diff -r 1f1acbe5f243 -r 058b8dc4e8b6 artifacts/src/main/java/org/dive4elements/river/themes/ThemeDocument.java
--- 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) {


More information about the Dive4elements-commits mailing list