[Schmitzm-commits] r444 - in branches/1.0-gt2-2.6/src/schmitzm/geotools: feature styling

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Oct 7 14:31:28 CEST 2009


Author: alfonx
Date: 2009-10-07 14:31:27 +0200 (Wed, 07 Oct 2009)
New Revision: 444

Modified:
   branches/1.0-gt2-2.6/src/schmitzm/geotools/feature/FeatureUtil.java
   branches/1.0-gt2-2.6/src/schmitzm/geotools/styling/StylingUtil.java
Log:
* <Generics> warnings cleanup

Modified: branches/1.0-gt2-2.6/src/schmitzm/geotools/feature/FeatureUtil.java
===================================================================
--- branches/1.0-gt2-2.6/src/schmitzm/geotools/feature/FeatureUtil.java	2009-10-05 15:59:16 UTC (rev 443)
+++ branches/1.0-gt2-2.6/src/schmitzm/geotools/feature/FeatureUtil.java	2009-10-07 12:31:27 UTC (rev 444)
@@ -66,7 +66,6 @@
 import org.geotools.feature.SchemaException;
 import org.geotools.feature.simple.SimpleFeatureBuilder;
 import org.geotools.feature.simple.SimpleFeatureTypeBuilder;
-import org.geotools.filter.FilterFactory;
 import org.geotools.map.MapLayer;
 import org.geotools.resources.coverage.FeatureUtilities;
 import org.geotools.styling.Graphic;
@@ -82,6 +81,7 @@
 import org.opengis.feature.type.AttributeDescriptor;
 import org.opengis.feature.type.GeometryDescriptor;
 import org.opengis.filter.Filter;
+import org.opengis.filter.FilterFactory;
 import org.opengis.filter.FilterFactory2;
 import org.opengis.parameter.GeneralParameterValue;
 import org.opengis.referencing.crs.CoordinateReferenceSystem;
@@ -133,8 +133,6 @@
 
 	private static final String DEFAULT_VECTOR_STYLE_NAME = "default vector style";
 
-	private static final String DEFAULT_JOIN_ATTR = "OID";
-
 	private static StyleBuilder STYLE_BUILDER = new StyleBuilder();
 
 	/** Instance of JTS-GeometryFactory. */
@@ -230,7 +228,7 @@
 	/**
 	 * Determines the kind of geometry of a {@link Class}.
 	 */
-	public static GeometryForm getGeometryForm(Class geometryType) {
+	public static GeometryForm getGeometryForm(Class<?> geometryType) {
 
 		if (Point.class.isAssignableFrom(geometryType)
 				|| MultiPoint.class.isAssignableFrom(geometryType))
@@ -1114,7 +1112,7 @@
 	 * @return {@code null}, falls {@link DataUtilities#defaultValue(Class)}
 	 *         keinen Defaul-Wert ermitteln kann (anstelle einer Exception!)
 	 */
-	public static Object getDefaultAttributeValue(Class attrType) {
+	public static Object getDefaultAttributeValue(Class<?> attrType) {
 		Object attrValue = null;
 		try {
 			// DataUtilities.defaultValue(.) kann BigDecimal und BigInteger
@@ -1451,7 +1449,7 @@
 	 */
 	public static SimpleFeatureType createFeatureType(
 			ResultSetMetaData metaData, String featureTypeName,
-			Class defaultAttrClass, String... projAttr) throws SQLException,
+			Class<?> defaultAttrClass, String... projAttr) throws SQLException,
 			SchemaException, ClassNotFoundException {
 		if (featureTypeName == null)
 			featureTypeName = "ResultSetFeatureType";
@@ -1471,7 +1469,7 @@
 			if (projAttr.length > 0 && !projAttrList.contains(columnName))
 				continue;
 
-			Class columnClass = defaultAttrClass;
+			Class<?> columnClass = defaultAttrClass;
 			try {
 				columnClass = Class.forName(metaData.getColumnClassName(i));
 			} catch (ClassNotFoundException err) {
@@ -1514,7 +1512,7 @@
 	 *             falls das Erzeugen des SimpleFeatureType scheitert
 	 */
 	public static SimpleFeatureType createFeatureType(String featureTypeName,
-			Map<String, Object> attrValues, Class defaultAttrClass)
+			Map<String, Object> attrValues, Class<?> defaultAttrClass)
 			throws SchemaException {
 		if (featureTypeName == null)
 			featureTypeName = "SimpleFeatureType";
@@ -1523,7 +1521,7 @@
 		featureTypeFac.setName(featureTypeName);
 		for (String attrName : attrValues.keySet()) {
 			Object attrValue = attrValues.get(attrName);
-			Class attrClass = attrValue == null ? defaultAttrClass : attrValue
+			Class<?> attrClass = attrValue == null ? defaultAttrClass : attrValue
 					.getClass();
 			featureTypeFac.add(AttributeTypeFactory.newAttributeType(attrName,
 					attrClass));
@@ -1739,7 +1737,7 @@
 	public static SimpleFeature createSampleFeature(SimpleFeatureType schema) {
 		SimpleFeature sampleFeature;
 
-		Object[] attributes = getDefaultAttributeValues(schema);
+//		Object[] attributes = getDefaultAttributeValues(schema);
 
 		try {
 			SimpleFeatureBuilder builder = new SimpleFeatureBuilder(schema);

Modified: branches/1.0-gt2-2.6/src/schmitzm/geotools/styling/StylingUtil.java
===================================================================
--- branches/1.0-gt2-2.6/src/schmitzm/geotools/styling/StylingUtil.java	2009-10-05 15:59:16 UTC (rev 443)
+++ branches/1.0-gt2-2.6/src/schmitzm/geotools/styling/StylingUtil.java	2009-10-07 12:31:27 UTC (rev 444)
@@ -260,11 +260,11 @@
 		// null !
 
 		if (object instanceof GridCoverage2D
-				|| object instanceof org.geotools.coverage.grid.io.AbstractGridCoverage2DReader)
+				|| object instanceof AbstractGridCoverage2DReader)
 			style = GridUtil.createDefaultStyle();
 
 		if (object instanceof FeatureCollection)
-			style = FeatureUtil.createDefaultStyle((FeatureCollection) object);
+			style = FeatureUtil.createDefaultStyle((FeatureCollection<SimpleFeatureType, SimpleFeature>) object);
 
 		if (object instanceof GeometryAttributeType)
 			style = FeatureUtil
@@ -1373,7 +1373,7 @@
 											Literal test2 = (Literal)compare.getExpression2();
 											if (   test1.toString().equals("1") && test2.toString().equals("2")){
 												// This TextSymbolizer is disabled using ASUtil.allwaysFalseFilter
-												LOGGER.debug("Ignoring Rule "+ r +" because the filter is "+f);
+//												LOGGER.debug("Ignoring Rule "+ r +" because the filter is "+f);
 												continue;
 											}
 										}
@@ -1626,13 +1626,13 @@
 
 		if (geoObject instanceof FeatureCollection) {
 			geometryForm = FeatureUtil
-					.getGeometryForm((FeatureCollection) geoObject);
+					.getGeometryForm((FeatureCollection<SimpleFeatureType, SimpleFeature>) geoObject);
 		} else if (geoObject instanceof GeometryAttributeType) {
 			geometryForm = FeatureUtil
 					.getGeometryForm((GeometryAttributeType) geoObject);
 		} else if (geoObject instanceof FeatureSource) {
 			geometryForm = FeatureUtil
-					.getGeometryForm((FeatureSource) geoObject);
+					.getGeometryForm((FeatureSource<SimpleFeatureType, SimpleFeature>) geoObject);
 		}
 
 		// /**
@@ -1738,13 +1738,13 @@
 
 		if (geoObject instanceof FeatureCollection) {
 			geometryForm = FeatureUtil
-					.getGeometryForm((FeatureCollection) geoObject);
+					.getGeometryForm((FeatureCollection<SimpleFeatureType, SimpleFeature>) geoObject);
 		} else if (geoObject instanceof GeometryAttributeType) {
 			geometryForm = FeatureUtil
 					.getGeometryForm((GeometryAttributeType) geoObject);
 		} else if (geoObject instanceof FeatureSource) {
 			geometryForm = FeatureUtil
-					.getGeometryForm((FeatureSource) geoObject);
+					.getGeometryForm((FeatureSource<SimpleFeatureType, SimpleFeature>) geoObject);
 		}
 
 		// /**



More information about the Schmitzm-commits mailing list