[Schmitzm-commits] r1050 - in branches/2.2.x: src/schmitzm/geotools/styling src_junit/schmitzm/geotools/styling

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Sep 22 15:43:33 CEST 2010


Author: mojays
Date: 2010-09-22 15:43:32 +0200 (Wed, 22 Sep 2010)
New Revision: 1050

Modified:
   branches/2.2.x/src/schmitzm/geotools/styling/StylingUtil.java
   branches/2.2.x/src_junit/schmitzm/geotools/styling/StylingUtilTest.java
Log:
new StylingUtil.correctPropertyNames(Style)
Compile error in StylingUtilTest fixed.

Modified: branches/2.2.x/src/schmitzm/geotools/styling/StylingUtil.java
===================================================================
--- branches/2.2.x/src/schmitzm/geotools/styling/StylingUtil.java	2010-09-22 12:36:06 UTC (rev 1049)
+++ branches/2.2.x/src/schmitzm/geotools/styling/StylingUtil.java	2010-09-22 13:43:32 UTC (rev 1050)
@@ -2546,13 +2546,20 @@
 //		return copiedCleanStyle;
 //	}
 
+    /**
+     * Since GT2.6, the AttributeNames are case sensitive. Also the raster
+     * Styles need GeometryProperty set to "geom" to work. This method checks
+     * all referenced AttributeNames.
+     */
+	public static Style correctPropertyNames(Style style) {
+	  return correctPropertyNames(style,null);
+	     
+	}
+	   
 	/**
 	 * Since GT2.6, the AttributeNames are case sensitive. Also the raster
-	 * Styles need GeometryProperty set to "geom" to work. This method checks
+	 * Styles need GeometryProperty set to "null" to work. This method checks
 	 * all referenced AttributeNames and checks them against the schema.
-	 * 
-	 * @retun <code>true</code> if something has been change, otherwise
-	 *        <code>false</code>.
 	 */
 	public static Style correctPropertyNames(Style style,
 			final SimpleFeatureType schema) {

Modified: branches/2.2.x/src_junit/schmitzm/geotools/styling/StylingUtilTest.java
===================================================================
--- branches/2.2.x/src_junit/schmitzm/geotools/styling/StylingUtilTest.java	2010-09-22 12:36:06 UTC (rev 1049)
+++ branches/2.2.x/src_junit/schmitzm/geotools/styling/StylingUtilTest.java	2010-09-22 13:43:32 UTC (rev 1050)
@@ -45,7 +45,7 @@
 		Style brokenStyle = StylingUtil.STYLE_BUILDER.createStyle(rS);
 
 		// Clean!
-		Style correctedStyle = StylingUtil.correctRasterStyle(brokenStyle);
+		Style correctedStyle = StylingUtil.correctPropertyNames(brokenStyle);
 
 		rS = (RasterSymbolizer) correctedStyle
 				.featureTypeStyles().get(0).rules().get(0).symbolizers().get(0);



More information about the Schmitzm-commits mailing list