/[schmitzm]/branches/2.0-GP14/src/skrueger/geotools/StyledFS.java
ViewVC logotype

Diff of /branches/2.0-GP14/src/skrueger/geotools/StyledFS.java

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

revision 93 by alfonx, Fri May 1 16:24:15 2009 UTC revision 169 by alfonx, Tue Jun 30 08:03:29 2009 UTC
# Line 15  import javax.swing.JPanel; Line 15  import javax.swing.JPanel;
15  import org.apache.log4j.Logger;  import org.apache.log4j.Logger;
16  import org.geotools.data.FeatureSource;  import org.geotools.data.FeatureSource;
17  import org.geotools.feature.AttributeType;  import org.geotools.feature.AttributeType;
18    import org.geotools.gui.swing.ExceptionMonitor;
19  import org.geotools.styling.Style;  import org.geotools.styling.Style;
20  import org.opengis.referencing.crs.CoordinateReferenceSystem;  import org.opengis.referencing.crs.CoordinateReferenceSystem;
21    
# Line 76  public class StyledFS implements StyledF Line 77  public class StyledFS implements StyledF
77                          } catch (FileNotFoundException e) {                          } catch (FileNotFoundException e) {
78                                  LOGGER                                  LOGGER
79                                                  .debug("The SLD file passed was empty. Leaving the Style untouched. (We are in the constructor.. so its null");                                                  .debug("The SLD file passed was empty. Leaving the Style untouched. (We are in the constructor.. so its null");
80                            } catch (Exception e) {
81                                    LOGGER.warn("Reading SLD failed: " + sldFile, e);
82                          }                          }
83                  }                  }
   
84                  title = new Translation();                  title = new Translation();
85                  title.fromOneLine(sldFile.getName());                  title.fromOneLine(sldFile.getName());
86    
# Line 164  public class StyledFS implements StyledF Line 166  public class StyledFS implements StyledF
166           * nicht in der Legende auftauchen sollen. Meines Wissens hat keiner bisher           * nicht in der Legende auftauchen sollen. Meines Wissens hat keiner bisher
167           * die Funktion genutzt.           * die Funktion genutzt.
168           *           *
169  //      public boolean isHideInLegend() {           * // public boolean isHideInLegend() { // return false; // }
 //              return false;  
 //      }  
170           */           */
171    
172          public void setDesc(Translation dec) {          public void setDesc(Translation dec) {
# Line 197  public class StyledFS implements StyledF Line 197  public class StyledFS implements StyledF
197           */           */
198          public Map<Integer, AttributeMetaData> getAttributeMetaDataMap() {          public Map<Integer, AttributeMetaData> getAttributeMetaDataMap() {
199                  if (map == null) {                  if (map == null) {
200                            
201                          map = new HashMap<Integer, AttributeMetaData>();                          map = new HashMap<Integer, AttributeMetaData>();
202                            
203                          // Leaving out the first one, it will be the_geom                          // Leaving out the first one, it will be the_geom
204                          for (int i = 1; i < fs.getSchema().getAttributeCount(); i++) {                          for (int i = 1; i < fs.getSchema().getAttributeCount(); i++) {
205                                  AttributeType att = fs.getSchema().getAttributeType(i);                                  AttributeType att = fs.getSchema().getAttributeType(i);
206                                    
207                                  AttributeMetaData attMetaData = new AttributeMetaData(i, att.getLocalName());                                  AttributeMetaData attMetaData = new AttributeMetaData(i, att
208                                                    .getLocalName());
209                                  map.put(i, attMetaData);                                  map.put(i, attMetaData);
210                          }                          }
211                  }                  }
# Line 213  public class StyledFS implements StyledF Line 214  public class StyledFS implements StyledF
214    
215          /**          /**
216           * @return The {@link File} where the SLD was loaded from or           * @return The {@link File} where the SLD was loaded from or
217           *         <code>null</code> if there didn't exist a {@link File}. (It           *         <code>null</code> if there didn't exist a {@link File}. (It could
218           *         could be a WFS or a PostGIS           *         be a WFS or a PostGIS
219           *           *
220           * @author <a href="mailto:[email protected]">Stefan Alfons Kr&uuml;ger</a>           * @author <a href="mailto:[email protected]">Stefan Alfons
221             *         Kr&uuml;ger</a>
222           */           */
223          public File getSldFile() {          public File getSldFile() {
224                  return sldFile;                  return sldFile;

Legend:
Removed from v.93  
changed lines
  Added in v.169

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26