[Schmitzm-commits] r1042 - branches/2.2.x/src/skrueger/geotools

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Sep 22 13:17:49 CEST 2010


Author: alfonx
Date: 2010-09-22 13:17:48 +0200 (Wed, 22 Sep 2010)
New Revision: 1042

Modified:
   branches/2.2.x/src/skrueger/geotools/StyledFeatureCollectionTableModel.java
Log:
Use a LinkedHashSet for the attributeNames so that no double column are possible

Modified: branches/2.2.x/src/skrueger/geotools/StyledFeatureCollectionTableModel.java
===================================================================
--- branches/2.2.x/src/skrueger/geotools/StyledFeatureCollectionTableModel.java	2010-09-22 10:56:20 UTC (rev 1041)
+++ branches/2.2.x/src/skrueger/geotools/StyledFeatureCollectionTableModel.java	2010-09-22 11:17:48 UTC (rev 1042)
@@ -30,6 +30,7 @@
 package skrueger.geotools;
 
 import java.util.HashMap;
+import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Vector;
 
@@ -135,11 +136,12 @@
 			final SimpleFeatureType schema = fs.getSchema();
 			Query query = new DefaultQuery(schema.getTypeName(), filter);
 			if (amdm != null) {
-				Vector<String> visibleAttrNames = new Vector<String>();
+				LinkedHashSet<String> visibleAttrNames = new LinkedHashSet<String>();
 
 				// Add the column with the geometry (usually "the_geom") always
-				visibleAttrNames.add(schema.getGeometryDescriptor()
-						.getLocalName());
+				String geomColumnLocalName = schema.getGeometryDescriptor()
+						.getLocalName();
+				visibleAttrNames.add(geomColumnLocalName);
 
 				// Add other visible attributes as ordered by weights
 				for (AttributeMetadataInterface a : amdMapVisibleOnly) {
@@ -158,6 +160,8 @@
 				// } else {
 				// query = new DefaultQuery(schema.getTypeName(), filter);
 				// }
+				
+				System.out.println(query.getPropertyNames());
 			}
 			fc = fs.getFeatures(query);
 		}



More information about the Schmitzm-commits mailing list