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

revision 770 by alfonx, Sun Mar 21 11:36:11 2010 UTC revision 775 by alfonx, Sun Mar 28 09:45:22 2010 UTC
# Line 256  public class StyledFS implements StyledF Line 256  public class StyledFS implements StyledF
256    
257                          map = new AttributeMetadataImplMap();                          map = new AttributeMetadataImplMap();
258    
259    //                      // Leaving out the first one, it will be the_geom
260    //                      for (int i = 1; i < fs.getSchema().getAttributeCount(); i++) {
261    //                              AttributeDescriptor attDesc = fs.getSchema().getDescriptor(i);
262    //
263    //                              AttributeMetadataImpl attMetaData = new AttributeMetadataImpl( new NameImpl(attDesc
264    //                                              .getName().getNamespaceURI(), attDesc
265    //                                              .getName().getLocalPart()), map.getLanguages());
266    //                              map.put(attDesc.getName(), attMetaData);
267    //                      }
268                            
269                          // Leaving out the first one, it will be the_geom                          // Leaving out the first one, it will be the_geom
270                          for (int i = 1; i < fs.getSchema().getAttributeCount(); i++) {                          for (int i = 1; i < fs.getSchema().getAttributeCount(); i++) {
271                                  AttributeDescriptor attDesc = fs.getSchema().getDescriptor(i);                                  AttributeDescriptor attDesc = fs.getSchema().getDescriptor(i);
272    
273                                    // TODO AttributeMetadataAS would be nicer, which would not work with Translations ;-)
274                                  AttributeMetadataImpl attMetaData = new AttributeMetadataImpl( new NameImpl(attDesc                                  AttributeMetadataImpl attMetaData = new AttributeMetadataImpl( new NameImpl(attDesc
275                                                  .getName().getNamespaceURI(), attDesc                                                  .getName().getNamespaceURI(), attDesc
276                                                  .getName().getLocalPart()), map.getLanguages());                                                  .getName().getLocalPart()), map.getLanguages());
277                                    if (String.class.isAssignableFrom( attDesc.getType().getBinding() )){
278                                            // For Strings we add the "" as NODATA values
279                                            attMetaData.addNodataValue("");
280                                    }
281                                  map.put(attDesc.getName(), attMetaData);                                  map.put(attDesc.getName(), attMetaData);
282                          }                          }
283                  }                  }

Legend:
Removed from v.770  
changed lines
  Added in v.775

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26