diff src/java/de/intevation/mxd/reader/GdbRasterCatalogLayerReader.java @ 135:a4ab239509f1

Updated the default values and reader error handling.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 22 Jun 2011 13:55:22 +0200
parents 39957898c694
children 0bde090506f9
line wrap: on
line diff
--- a/src/java/de/intevation/mxd/reader/GdbRasterCatalogLayerReader.java	Wed Jun 22 12:01:28 2011 +0200
+++ b/src/java/de/intevation/mxd/reader/GdbRasterCatalogLayerReader.java	Wed Jun 22 13:55:22 2011 +0200
@@ -68,7 +68,7 @@
                 "Could not create DOM element for layer." +
                 "Stopped reading layer.");
             throw new IOException(
-                this.getClass()+toString() +
+                this.getClass().toString() +
                 "Error creating dom element");
         }
 
@@ -76,10 +76,8 @@
             layerElement.setAttribute("name", layer.getName());
         }
         catch(IOException ioe) {
-            logger.warn(
-                "Could not read layer name. " +
-                "Setting layer name to \"default\".");
-            layerElement.setAttribute("name", "default");
+            logger.warn("Could not read layer name. Stopped reading layer.");
+            throw new IOException("Error reading layer name.");
         }
 
         try {
@@ -87,10 +85,7 @@
                 String.valueOf(layer.getMinimumScale()));
         }
         catch(IOException ioe) {
-            logger.warn(
-                "Could not read minimum layer scale." +
-                "Setting minimum layer scale to 1000");
-            layerElement.setAttribute("min_scale", "1000");
+            logger.warn("Could not read minimum layer scale.");
         }
 
         try {
@@ -98,10 +93,7 @@
                 String.valueOf(layer.getMaximumScale()));
         }
         catch(IOException ioe) {
-            logger.warn(
-                "Could not read maximum layer scale." +
-                "Setting maximum layer scale to 1000000");
-            layerElement.setAttribute("max_scale", "1000000");
+            logger.warn("Could not read maximum layer scale.");
         }
 
         try {
@@ -125,9 +117,7 @@
         }
         catch(IOException ioe) {
             logger.warn(
-                "Could not read layer definition query." +
-                "Setting empty definition query.");
-            layerElement.setAttribute("definition_query", "");
+                "Could not read layer definition query.");
         }
         return layerElement;
     }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)