30 |
package skrueger.geotools; |
package skrueger.geotools; |
31 |
|
|
32 |
import java.util.HashMap; |
import java.util.HashMap; |
33 |
|
import java.util.LinkedHashSet; |
34 |
import java.util.List; |
import java.util.List; |
35 |
import java.util.Vector; |
import java.util.Vector; |
36 |
|
|
136 |
final SimpleFeatureType schema = fs.getSchema(); |
final SimpleFeatureType schema = fs.getSchema(); |
137 |
Query query = new DefaultQuery(schema.getTypeName(), filter); |
Query query = new DefaultQuery(schema.getTypeName(), filter); |
138 |
if (amdm != null) { |
if (amdm != null) { |
139 |
Vector<String> visibleAttrNames = new Vector<String>(); |
LinkedHashSet<String> visibleAttrNames = new LinkedHashSet<String>(); |
140 |
|
|
141 |
// Add the column with the geometry (usually "the_geom") always |
// Add the column with the geometry (usually "the_geom") always |
142 |
visibleAttrNames.add(schema.getGeometryDescriptor() |
String geomColumnLocalName = schema.getGeometryDescriptor() |
143 |
.getLocalName()); |
.getLocalName(); |
144 |
|
visibleAttrNames.add(geomColumnLocalName); |
145 |
|
|
146 |
// Add other visible attributes as ordered by weights |
// Add other visible attributes as ordered by weights |
147 |
for (AttributeMetadataInterface a : amdMapVisibleOnly) { |
for (AttributeMetadataInterface a : amdMapVisibleOnly) { |
160 |
// } else { |
// } else { |
161 |
// query = new DefaultQuery(schema.getTypeName(), filter); |
// query = new DefaultQuery(schema.getTypeName(), filter); |
162 |
// } |
// } |
163 |
|
|
164 |
|
System.out.println(query.getPropertyNames()); |
165 |
} |
} |
166 |
fc = fs.getFeatures(query); |
fc = fs.getFeatures(query); |
167 |
} |
} |