Various fixes, clean-up, logs, documentation
[mkjsf-moved-to-github.git] / src / main / java / com / indexdata / pz2utils4jsf / pazpar2 / commands / CommandParameter.java
index c899251..7630ecd 100644 (file)
@@ -8,7 +8,6 @@ import java.util.Map;
 \r
 import org.apache.log4j.Logger;\r
 \r
-import com.indexdata.pz2utils4jsf.pazpar2.Expression;\r
 import com.indexdata.pz2utils4jsf.pazpar2.commands.CommandParameter;\r
 \r
 public class CommandParameter implements Serializable {\r
@@ -22,12 +21,12 @@ public class CommandParameter implements Serializable {
   Map<String,Expression> expressions = new HashMap<String,Expression>();\r
   \r
   public CommandParameter (String name) {\r
-    logger.debug("Instantiating command parameter (1) " + name);\r
+    logger.debug("Instantiating command parameter '" + name + "'");\r
     this.name = name;\r
   }\r
   \r
   public CommandParameter (String name, String operator, String value, Expression... expressions) {\r
-    logger.debug("Instantiating command parameter (2) " + name + " with " + expressions);\r
+    logger.debug("Instantiating command parameter " + name + " with expressions: [" + expressions + "]");\r
     this.name = name;\r
     this.operator = operator;\r
     this.value = value;\r
@@ -37,14 +36,14 @@ public class CommandParameter implements Serializable {
   }\r
 \r
   public CommandParameter (String name, String operator, String value) {\r
-    logger.debug("Instantiating command parameter (3) " + name + " ("+this+") with " + value);\r
+    logger.debug("Instantiating command parameter '" + name + "' with String: [" + value + "]");\r
     this.name = name;\r
     this.operator = operator;\r
     this.value = value;    \r
   }\r
   \r
   public CommandParameter (String name, String operator, int value) {\r
-    logger.debug("Instantiating command parameter (4) " + name + " ("+this+") with " + value);\r
+    logger.debug("Instantiating command parameter '" + name + "' with int: [" + value + "]");\r
     this.name = name;\r
     this.operator = operator;\r
     this.value = value+"";    \r
@@ -60,7 +59,7 @@ public class CommandParameter implements Serializable {
   }\r
   \r
   public void addExpression(Expression expression) {\r
-    logger.debug("Adding expression [" + expression + "] to " + this.getName() + " ("+this+")");\r
+    logger.debug("Adding expression [" + expression + "] to '" + name + "'");\r
     this.expressions.put(expression.toString(),expression);\r
   }\r
   \r
@@ -112,6 +111,7 @@ public class CommandParameter implements Serializable {
   }\r
   \r
   public CommandParameter copy() {\r
+    logger.debug("Copying parameter '"+ name + "' for modification");\r
     CommandParameter newParam = new CommandParameter(name);\r
     newParam.value = this.value;\r
     newParam.operator = this.operator;\r