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

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

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

trunk/src/skrueger/geotools/StyledFeatureCollection.java revision 256 by alfonx, Fri Jul 31 14:43:47 2009 UTC branches/1.0-gt2-2.6/src/skrueger/geotools/StyledFeatureCollection.java revision 324 by alfonx, Wed Aug 26 15:17:02 2009 UTC
# Line 40  import org.geotools.data.FeatureSource; Line 40  import org.geotools.data.FeatureSource;
40  import org.geotools.data.collection.CollectionDataStore;  import org.geotools.data.collection.CollectionDataStore;
41  import org.geotools.feature.AttributeType;  import org.geotools.feature.AttributeType;
42  import org.geotools.feature.FeatureCollection;  import org.geotools.feature.FeatureCollection;
43  import org.geotools.feature.FeatureType;  import org.opengis.feature.simple.SimpleFeature;
44    import org.opengis.feature.simple.SimpleFeatureType;
45  import org.geotools.styling.Style;  import org.geotools.styling.Style;
46    
47  import schmitzm.geotools.feature.FeatureUtil;  import schmitzm.geotools.feature.FeatureUtil;
# Line 58  import skrueger.i8n.Translation; Line 59  import skrueger.i8n.Translation;
59   * @version 1.0   * @version 1.0
60   */   */
61  public class StyledFeatureCollection extends  public class StyledFeatureCollection extends
62                  AbstractStyledLayer<FeatureCollection> implements                  AbstractStyledLayer<FeatureCollection<SimpleFeatureType, SimpleFeature> > implements
63                  StyledFeatureCollectionInterface {                  StyledFeatureCollectionInterface {
64    
65          /** Holds the meta data for displaying a legend. */          /** Holds the meta data for displaying a legend. */
# Line 67  public class StyledFeatureCollection ext Line 68  public class StyledFeatureCollection ext
68          /**          /**
69           * We be filled with a "virtual" {@link FeatureSource} on demand.           * We be filled with a "virtual" {@link FeatureSource} on demand.
70           */           */
71          private FeatureSource featureSource = null;          private FeatureSource<SimpleFeatureType, SimpleFeature> featureSource = null;
72    
73          /**          /**
74           * Creates a styled {@link FeatureCollection} with language-specific           * Creates a styled {@link FeatureCollection} with language-specific
# Line 302  public class StyledFeatureCollection ext Line 303  public class StyledFeatureCollection ext
303          public static Map<Integer, AttributeMetaData> createDefaultAttributeMetaDataMap(          public static Map<Integer, AttributeMetaData> createDefaultAttributeMetaDataMap(
304                          FeatureCollection fc) {                          FeatureCollection fc) {
305                  HashMap<Integer, AttributeMetaData> metaDataMap = new HashMap<Integer, AttributeMetaData>();                  HashMap<Integer, AttributeMetaData> metaDataMap = new HashMap<Integer, AttributeMetaData>();
306                  FeatureType ftype = fc.getSchema();                  SimpleFeatureType ftype = fc.getSchema();
307                  for (int i = 0; i < ftype.getAttributeCount(); i++) {                  for (int i = 0; i < ftype.getAttributeCount(); i++) {
308                          AttributeType aType = ftype.getAttributeType(i);                          AttributeType aType = ftype.getAttributeType(i);
309                          if (aType != ftype.getDefaultGeometry())                          if (aType != ftype.getDefaultGeometry())

Legend:
Removed from v.256  
changed lines
  Added in v.324

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26