[Schmitzm-commits] r1714 - in trunk: schmitzm-core/src/main/java/de/schmitzm/io schmitzm-gt/src/main/java/de/schmitzm/geotools/org/geotools/styling schmitzm-gt/src/main/java/de/schmitzm/geotools/org/geotools/styling/visitor

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Sep 6 17:52:01 CEST 2011


Author: alfonx
Date: 2011-09-06 17:51:59 +0200 (Tue, 06 Sep 2011)
New Revision: 1714

Modified:
   trunk/schmitzm-core/src/main/java/de/schmitzm/io/IOUtil.java
   trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/org/geotools/styling/SLDTransformer.java
   trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/org/geotools/styling/visitor/DuplicatingStyleVisitor.java
Log:


Modified: trunk/schmitzm-core/src/main/java/de/schmitzm/io/IOUtil.java
===================================================================
--- trunk/schmitzm-core/src/main/java/de/schmitzm/io/IOUtil.java	2011-09-06 14:30:35 UTC (rev 1713)
+++ trunk/schmitzm-core/src/main/java/de/schmitzm/io/IOUtil.java	2011-09-06 15:51:59 UTC (rev 1714)
@@ -1204,20 +1204,17 @@
 	 * Attention: This method has the function to clean filenames. Using it to
 	 * copy <code>/a/a.txt</code> to <code>/b/b.txt</code> does not work, even
 	 * when param cleanfile is false! It will copy a.txt to
-	 * <code>/b/a.txt</copy>. Use Fileutil.copyURLToFile directly if you rneed the mentioned routine.
+	 * <code>/b/a.txt</copy>. Use <code>Fileutil.copyURLToFile</code> directly
+	 * if you need the mentioned routine.<br/>
 	 * 
 	 * @param source
 	 *            File or directory or wildcard to copy
 	 * @param destination
-	 *            Directory or filename...
+	 *            Directory (or filename, but read above!)
 	 * @param cleanFilenames
-	 *            Convert target filenames to clean, lowercase filenames. Even
-	 *            if <code>false</code>, the old filnem will be used when
-	 *            copying a file to file.
+	 *            Convert target filenames to clean, lowercase filenames. 
 	 * 
-	 * @author <a href="mailto:tzeggai at wikisquare.de">Stefan Alfons Tzeggai</a>
-	 * 
-	 * @return A {@link File} to the new destination 
+	 * @return A {@link File} to the new destination {@link File} which might have a changed name.
 	 */
 	public final static File copyUrl(final URL source, File destination,
 			final Boolean cleanFilenames) throws IOException,
@@ -1234,7 +1231,7 @@
 		}
 
 		FileUtils.copyURLToFile(source, destination);
-		
+
 		return destination;
 	}
 

Modified: trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/org/geotools/styling/SLDTransformer.java
===================================================================
--- trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/org/geotools/styling/SLDTransformer.java	2011-09-06 14:30:35 UTC (rev 1713)
+++ trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/org/geotools/styling/SLDTransformer.java	2011-09-06 15:51:59 UTC (rev 1714)
@@ -20,7 +20,6 @@
  */
 package de.schmitzm.geotools.org.geotools.styling;
 
-import org.geotools.styling.*;
 import java.awt.Color;
 import java.io.FileOutputStream;
 import java.io.IOException;
@@ -41,7 +40,48 @@
 import org.geotools.feature.FeatureCollection;
 import org.geotools.filter.FilterTransformer;
 import org.geotools.gml.producer.FeatureTransformer;
-import org.geotools.referencing.CRS;
+import org.geotools.styling.AnchorPoint;
+import org.geotools.styling.ChannelSelection;
+import org.geotools.styling.ColorMap;
+import org.geotools.styling.ColorMapEntry;
+import org.geotools.styling.ContrastEnhancement;
+import org.geotools.styling.Displacement;
+import org.geotools.styling.Extent;
+import org.geotools.styling.ExternalGraphic;
+import org.geotools.styling.FeatureTypeConstraint;
+import org.geotools.styling.FeatureTypeStyle;
+import org.geotools.styling.Fill;
+import org.geotools.styling.Font;
+import org.geotools.styling.Graphic;
+import org.geotools.styling.Halo;
+import org.geotools.styling.ImageOutline;
+import org.geotools.styling.LinePlacement;
+import org.geotools.styling.LineSymbolizer;
+import org.geotools.styling.Mark;
+import org.geotools.styling.NamedLayer;
+import org.geotools.styling.NamedStyle;
+import org.geotools.styling.OtherText;
+import org.geotools.styling.OverlapBehavior;
+import org.geotools.styling.PointPlacement;
+import org.geotools.styling.PointSymbolizer;
+import org.geotools.styling.PolygonSymbolizer;
+import org.geotools.styling.RasterSymbolizer;
+import org.geotools.styling.RemoteOWS;
+import org.geotools.styling.Rule;
+import org.geotools.styling.SLDParser;
+import org.geotools.styling.SelectedChannelType;
+import org.geotools.styling.ShadedRelief;
+import org.geotools.styling.Stroke;
+import org.geotools.styling.Style;
+import org.geotools.styling.StyleVisitor;
+import org.geotools.styling.StyledLayer;
+import org.geotools.styling.StyledLayerDescriptor;
+import org.geotools.styling.Symbol;
+import org.geotools.styling.Symbolizer;
+import org.geotools.styling.TextSymbolizer;
+import org.geotools.styling.TextSymbolizer2;
+import org.geotools.styling.UomOgcMapping;
+import org.geotools.styling.UserLayer;
 import org.geotools.xml.transform.TransformerBase;
 import org.geotools.xml.transform.Translator;
 import org.opengis.feature.simple.SimpleFeature;

Modified: trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/org/geotools/styling/visitor/DuplicatingStyleVisitor.java
===================================================================
--- trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/org/geotools/styling/visitor/DuplicatingStyleVisitor.java	2011-09-06 14:30:35 UTC (rev 1713)
+++ trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/org/geotools/styling/visitor/DuplicatingStyleVisitor.java	2011-09-06 15:51:59 UTC (rev 1714)
@@ -63,8 +63,6 @@
 import org.geotools.styling.Stroke;
 import org.geotools.styling.Style;
 import org.geotools.styling.StyleFactory;
-import org.geotools.styling.StyleFactoryImpl;
-import org.geotools.styling.StyleVisitor;
 import org.geotools.styling.StyledLayer;
 import org.geotools.styling.StyledLayerDescriptor;
 import org.geotools.styling.Symbol;
@@ -97,7 +95,7 @@
  *
  * @source $URL: http://svn.osgeo.org/geotools/trunk/modules/library/main/src/main/java/org/geotools/styling/visitor/DuplicatingStyleVisitor.java $
  */
-public class DuplicatingStyleVisitor implements StyleVisitor {
+public class DuplicatingStyleVisitor extends org.geotools.styling.visitor.DuplicatingStyleVisitor {
 	
     protected final StyleFactory sf;
     protected final FilterFactory2 ff;
@@ -834,7 +832,14 @@
             
         }
         String format = exgr.getFormat();
-        ExternalGraphic copy = sf.createExternalGraphic(uri, format);
+        ExternalGraphic copy ;
+        if (uri != null)
+        	copy = sf.createExternalGraphic(uri, format);
+        else {
+        	// TOTO TODO uagh.. what a hack! The problem: its not possible to get to the uri as a STRING when it contains no protocol.
+        	copy = exgr;
+        }
+//        		
         copy.setCustomProperties( copy(exgr.getCustomProperties()));
         
         if( STRICT && !copy.equals( exgr )){



More information about the Schmitzm-commits mailing list