diff gwt-client/src/main/java/org/dive4elements/river/client/server/ArtifactDescriptionFactory.java @ 8203:238fc722f87a

sed 's/logger/log/g' src/**/*.java
author Sascha L. Teichmann <teichmann@intevation.de>
date Fri, 05 Sep 2014 13:19:22 +0200
parents b9decb8bfb21
children 5e38e2924c07
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/server/ArtifactDescriptionFactory.java	Fri Sep 05 12:58:17 2014 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/ArtifactDescriptionFactory.java	Fri Sep 05 13:19:22 2014 +0200
@@ -52,7 +52,7 @@
  */
 public class ArtifactDescriptionFactory {
 
-    private static final Logger logger =
+    private static final Logger log =
         Logger.getLogger(ArtifactDescriptionFactory.class);
 
 
@@ -82,7 +82,7 @@
      * @return the {@link ArtifactDescription}.
      */
     public static ArtifactDescription createArtifactDescription(Document doc) {
-        logger.debug("ArtifactDescriptionFactory.createArtifactDescription");
+        log.debug("ArtifactDescriptionFactory.createArtifactDescription");
 
         Node currentState = ClientProtocolUtils.getCurrentState(doc);
         Node staticNode   = ClientProtocolUtils.getStaticUI(doc);
@@ -96,7 +96,7 @@
             XPathConstants.STRING,
             ArtifactNamespaceContext.INSTANCE);
 
-        logger.debug("Current state name: " + state);
+        log.debug("Current state name: " + state);
 
         DataList currentData = extractCurrentData(dynamicNode, state);
         DataList[] old       = extractOldData(staticNode);
@@ -126,7 +126,7 @@
      * entered.
      */
     protected static DataList extractCurrentData(Node dynamicNode, String state) {
-        logger.debug("ArtifactDescriptionFactory.extractCurrentData");
+        log.debug("ArtifactDescriptionFactory.extractCurrentData");
 
         NodeList data     = ClientProtocolUtils.getSelectNode(dynamicNode);
         String help       = extractHelpText(dynamicNode);
@@ -147,8 +147,8 @@
             String type  = XMLUtils.xpathString(
                 d, "@art:type", ArtifactNamespaceContext.INSTANCE);
 
-            logger.debug("Create new IntegerRangeData object for: " + name);
-            logger.debug("New Data is from type: " + type);
+            log.debug("Create new IntegerRangeData object for: " + name);
+            log.debug("New Data is from type: " + type);
 
             // TODO replace with DataFactory.
 
@@ -183,7 +183,7 @@
                     }
                 }
                 catch (NumberFormatException nfe) {
-                    logger.warn("NumberFormatException: ", nfe);
+                    log.warn("NumberFormatException: ", nfe);
                 }
             }
             else if (type.equals("longrange")) {
@@ -206,7 +206,7 @@
                     }
                 }
                 catch (NumberFormatException nfe) {
-                    logger.warn("NumberFormatException: ", nfe);
+                    log.warn("NumberFormatException: ", nfe);
                 }
             }
             else if (type.equals("intarray")) {
@@ -231,7 +231,7 @@
                 list.add(DataFactory.createMultiAttributeData(d, name, label));
             }
             else {
-                logger.warn("Unrecognized Dynamic data type.");
+                log.warn("Unrecognized Dynamic data type.");
                 NodeList   choices   = ClientProtocolUtils.getItemNodes(d);
                 DataItem[] dataItems = extractCurrentDataItems(choices);
                 DataItem   def       = extractDefaultDataItem(d);
@@ -262,7 +262,7 @@
      * @return the default DataItem.
      */
     protected static DataItem extractDefaultDataItem(Node data) {
-        logger.debug("ArtifactDescriptionFactory.extractDefaultDataItem");
+        log.debug("ArtifactDescriptionFactory.extractDefaultDataItem");
 
         String value = XMLUtils.xpathString(
             data, "@art:defaultValue", ArtifactNamespaceContext.INSTANCE);
@@ -286,10 +286,10 @@
      * @return the {@link DataItem}s.
      */
     protected static DataItem[] extractCurrentDataItems(NodeList items) {
-        logger.debug("ArtifactDescriptionFactory.extractCurrentDataItems");
+        log.debug("ArtifactDescriptionFactory.extractCurrentDataItems");
 
         if (items == null || items.getLength() == 0) {
-            logger.debug("No data items found.");
+            log.debug("No data items found.");
             return null;
         }
 
@@ -318,10 +318,10 @@
 
 
     protected static double[] extractMinMaxQValues(Node item) {
-        logger.debug("ArtifactDescriptionFactory.extractMinMaxQValues");
+        log.debug("ArtifactDescriptionFactory.extractMinMaxQValues");
 
         if (item == null) {
-            logger.debug("This node is empty - no min/max Q values.");
+            log.debug("This node is empty - no min/max Q values.");
             return null;
         }
 
@@ -332,7 +332,7 @@
             ArtifactNamespaceContext.INSTANCE);
 
         if (node == null) {
-            logger.debug("No min/max Q values found.");
+            log.debug("No min/max Q values found.");
             return null;
         }
 
@@ -341,10 +341,10 @@
 
 
     protected static double[] extractMinMaxWValues(Node item) {
-        logger.debug("ArtifactDescriptionFactory.extractMinMaxWValues");
+        log.debug("ArtifactDescriptionFactory.extractMinMaxWValues");
 
         if (item == null) {
-            logger.debug("This node is empty - no min/max W values.");
+            log.debug("This node is empty - no min/max W values.");
             return null;
         }
 
@@ -355,7 +355,7 @@
             ArtifactNamespaceContext.INSTANCE);
 
         if (node == null) {
-            logger.debug("No min/max W values found.");
+            log.debug("No min/max W values found.");
             return null;
         }
 
@@ -364,7 +364,7 @@
 
 
     protected static double[] extractMinMaxValues(Node node) {
-        logger.debug("ArtifactDescriptionFactory.extractMinMaxValues");
+        log.debug("ArtifactDescriptionFactory.extractMinMaxValues");
 
         String minStr = XMLUtils.xpathString(
             node, "art:min/text()", ArtifactNamespaceContext.INSTANCE);
@@ -373,7 +373,7 @@
             node, "art:max/text()", ArtifactNamespaceContext.INSTANCE);
 
         if (maxStr == null || minStr == null) {
-            logger.debug("No min/max values found.");
+            log.debug("No min/max values found.");
             return null;
         }
 
@@ -384,7 +384,7 @@
             return new double[] { min, max };
         }
         catch (NumberFormatException nfe) {
-            logger.debug("Error while parsing min/max values.");
+            log.debug("Error while parsing min/max values.");
         }
 
         return null;
@@ -400,7 +400,7 @@
      * @return the DataList objects.
      */
     protected static DataList[] extractOldData(Node staticNode) {
-        logger.debug("ArtifactDescriptionFactory.extractOldData()");
+        log.debug("ArtifactDescriptionFactory.extractOldData()");
 
         NodeList stateNodes = (NodeList) XMLUtils.xpath(
             staticNode,
@@ -409,7 +409,7 @@
             ArtifactNamespaceContext.INSTANCE);
 
         if (stateNodes == null || stateNodes.getLength() == 0) {
-            logger.debug("No old items found.");
+            log.debug("No old items found.");
             return null;
         }
 
@@ -494,7 +494,7 @@
      * @return an array with identifiers of reachable states.
      */
     protected static String[] extractReachableStates(Node reachable) {
-        logger.debug("ArtifactDescriptionFactory.extractReachableStates()");
+        log.debug("ArtifactDescriptionFactory.extractReachableStates()");
 
         NodeList list = (NodeList) XMLUtils.xpath(
             reachable,
@@ -532,7 +532,7 @@
      * @return an array of Output modes.
      */
     protected static OutputMode[] extractOutputModes(NodeList outputs) {
-        logger.debug("ArtifactDescriptionFactory.extractOutputModes");
+        log.debug("ArtifactDescriptionFactory.extractOutputModes");
 
         if (outputs == null || outputs.getLength() == 0) {
             return null;
@@ -556,7 +556,7 @@
                 outs.add(new DefaultOutputMode(name, desc, mimeType));
             }
             else {
-                logger.debug("Found an invalid output mode.");
+                log.debug("Found an invalid output mode.");
             }
         }
 
@@ -565,7 +565,7 @@
 
 
     protected static Recommendation[] extractRecommendedArtifacts(Document doc){
-        logger.debug("ArtifactDescriptionFactory.extractRecommendedArtifacts.");
+        log.debug("ArtifactDescriptionFactory.extractRecommendedArtifacts.");
 
         NodeList list = (NodeList) XMLUtils.xpath(
             doc,
@@ -584,7 +584,7 @@
             String  targetOut   = e.getAttribute("target_out");
 
             if (factory != null && factory.length() > 0) {
-                logger.debug("Adding Recommendation. Factory: " + factory +
+                log.debug("Adding Recommendation. Factory: " + factory +
                         " IDs: " + index + " target out " + targetOut);
                 rec[i] = new Recommendation(factory, index, null, null, targetOut);
             }

http://dive4elements.wald.intevation.org