/[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 176 by alfonx, Wed Jul 1 14:14:15 2009 UTC revision 238 by alfonx, Tue Jul 28 08:07:12 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.feature.FeatureCollection;
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 121  public class StyledFS implements StyledF Line 122  public class StyledFS implements StyledF
122                  }                  }
123          }          }
124    
125          public FeatureSource getGeoObject() throws Exception {          public FeatureSource getGeoObject() {
126                  return fs;                  return fs;
127          }          }
128    
# 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 could           *         <code>null</code> if there didn't exist a {@link File}.
          *         be a WFS or a PostGIS  
218           *           *
219           * @author <a href="mailto:[email protected]">Stefan Alfons           * @author <a href="mailto:[email protected]">Stefan Alfons
220           *         Kr&uuml;ger</a>           *         Kr&uuml;ger</a>
# Line 227  public class StyledFS implements StyledF Line 227  public class StyledFS implements StyledF
227                  this.sldFile = sldFile;                  this.sldFile = sldFile;
228          }          }
229    
230            /**
231             * Returns the features of the {@link FeatureSource}.
232             *
233             * @see {@link StyledFeaturesInterface}
234             */
235            @Override
236            public FeatureCollection getFeatureCollection() {
237                    FeatureCollection features;
238                    try {
239                            features = getGeoObject().getFeatures();
240                    } catch (IOException e) {
241                            throw new RuntimeException(
242                                            "Error getting the features of the  FeatureSource");
243                    }
244                    return features;
245            }
246    
247            /**
248             * Same as {@link #getGeoObject()} method, but complies to the
249             * {@link StyledFeaturesInterface}
250             *
251             * @see {@link StyledFeaturesInterface}
252             */
253            @Override
254            public FeatureSource getFeatureSource() {
255                    return getGeoObject();
256            }
257    
258  }  }

Legend:
Removed from v.176  
changed lines
  Added in v.238

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26