/[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

revision 315 by mojays, Wed Aug 26 11:03:27 2009 UTC revision 325 by mojays, Wed Aug 26 15:32:54 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;
 import org.geotools.feature.FeatureType;  
43  import org.geotools.styling.Style;  import org.geotools.styling.Style;
44    import org.opengis.feature.simple.SimpleFeature;
45    import org.opengis.feature.simple.SimpleFeatureType;
46    
47  import schmitzm.geotools.feature.FeatureUtil;  import schmitzm.geotools.feature.FeatureUtil;
48  import skrueger.AttributeMetaData;  import skrueger.AttributeMetaData;
# 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.315  
changed lines
  Added in v.325

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26