/[schmitzm]/trunk/src/skrueger/geotools/StyledFS.java
ViewVC logotype

Diff of /trunk/src/skrueger/geotools/StyledFS.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

branches/1.0-gt2-2.6/src/skrueger/geotools/StyledFS.java revision 533 by alfonx, Thu Nov 19 17:27:01 2009 UTC branches/2.0-RC1/src/skrueger/geotools/StyledFS.java revision 607 by alfonx, Wed Dec 9 15:13:42 2009 UTC
# Line 41  import javax.swing.JPanel; Line 41  import javax.swing.JPanel;
41    
42  import org.apache.log4j.Logger;  import org.apache.log4j.Logger;
43  import org.geotools.data.FeatureSource;  import org.geotools.data.FeatureSource;
 import org.geotools.data.store.EmptyFeatureCollection;  
44  import org.geotools.feature.FeatureCollection;  import org.geotools.feature.FeatureCollection;
45  import org.geotools.styling.Style;  import org.geotools.styling.Style;
46  import org.opengis.feature.simple.SimpleFeature;  import org.opengis.feature.simple.SimpleFeature;
# Line 303  public class StyledFS implements StyledF Line 302  public class StyledFS implements StyledF
302    
303          @Override          @Override
304          public FeatureCollection<SimpleFeatureType, SimpleFeature> getFeatureCollectionFiltered() {          public FeatureCollection<SimpleFeatureType, SimpleFeature> getFeatureCollectionFiltered() {
305                  final FeatureCollection<SimpleFeatureType, SimpleFeature> fc = getFeatureCollection();  //              final FeatureCollection<SimpleFeatureType, SimpleFeature> fc = getFeatureCollection();
306                  if (filter == Filter.EXCLUDE)  //              if (filter == Filter.EXCLUDE)
307                          return new EmptyFeatureCollection(fc.getSchema());  //                      return new EmptyFeatureCollection(fc.getSchema());
308                  if (filter == Filter.INCLUDE)  //              if (filter == Filter.INCLUDE)
309                          return fc;  //                      return fc;
310                  return fc.subCollection(filter);  //              return fc.subCollection(filter);
311                    
312                    try {
313                            return getFeatureSource().getFeatures(filter);
314                    } catch (IOException e) {
315                            throw new RuntimeException(e);
316                    }
317          }          }
318    
319          @Override          @Override

Legend:
Removed from v.533  
changed lines
  Added in v.607

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26