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

branches/2.0-RC2/src/skrueger/geotools/StyledFeatureCollection.java revision 621 by alfonx, Thu Jan 28 10:06:05 2010 UTC trunk/src/skrueger/geotools/StyledFeatureCollection.java revision 769 by alfonx, Sun Mar 21 11:02:34 2010 UTC
# Line 46  import org.opengis.feature.type.Attribut Line 46  import org.opengis.feature.type.Attribut
46  import org.opengis.filter.Filter;  import org.opengis.filter.Filter;
47    
48  import schmitzm.geotools.feature.FeatureUtil;  import schmitzm.geotools.feature.FeatureUtil;
49  import skrueger.AttributeMetadata;  import skrueger.AttributeMetadataImpl;
50  import skrueger.i8n.Translation;  import skrueger.i8n.Translation;
51    
52  /**  /**
# Line 65  public class StyledFeatureCollection Line 65  public class StyledFeatureCollection
65                  implements StyledFeatureCollectionInterface {                  implements StyledFeatureCollectionInterface {
66    
67          /** Holds the meta data for displaying a legend. */          /** Holds the meta data for displaying a legend. */
68          protected AttributeMetadataMap attrMetaData = null;          protected AttributeMetadataMap<AttributeMetadataImpl> attrMetaData = null;
69    
70          /**          /**
71           * We be filled with a "virtual" {@link FeatureSource} on demand.           * We be filled with a "virtual" {@link FeatureSource} on demand.
# Line 314  public class StyledFeatureCollection Line 314  public class StyledFeatureCollection
314           */           */
315          public static AttributeMetadataMap createDefaultAttributeMetaDataMap(          public static AttributeMetadataMap createDefaultAttributeMetaDataMap(
316                          FeatureCollection<SimpleFeatureType, SimpleFeature> fc) {                          FeatureCollection<SimpleFeatureType, SimpleFeature> fc) {
317                  AttributeMetadataMap metaDataMap = new AttributeMetadataMap();                  AttributeMetadataMap metaDataMap = new AttributeMetadataImplMap();
318                  SimpleFeatureType ftype = fc.getSchema();                  SimpleFeatureType ftype = fc.getSchema();
319                  for (int i = 0; i < ftype.getAttributeCount(); i++) {                  for (int i = 0; i < ftype.getAttributeCount(); i++) {
320                          AttributeDescriptor aDesc = ftype.getAttributeDescriptors().get(i);                          AttributeDescriptor aDesc = ftype.getAttributeDescriptors().get(i);
321                          if (aDesc != ftype.getGeometryDescriptor())                          if (aDesc != ftype.getGeometryDescriptor())
322                                  metaDataMap.put(aDesc.getName(), new AttributeMetadata(aDesc.getName(),                                  metaDataMap.put(aDesc.getName(), new AttributeMetadataImpl(aDesc.getName(),
323                                                  true, // visible                                                  true, // visible
324                                                  new Translation(aDesc.getLocalName()), // Column name                                                  new Translation(aDesc.getLocalName()), // Column name
325                                                  new Translation(aDesc.getLocalName()), // description                                                  new Translation(aDesc.getLocalName()), // description

Legend:
Removed from v.621  
changed lines
  Added in v.769

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26