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

trunk/src/skrueger/geotools/StyledFeatureCollection.java revision 224 by alfonx, Tue Jul 14 15:57:19 2009 UTC branches/1.0-gt2-2.6/src/skrueger/geotools/StyledFeatureCollection.java revision 422 by alfonx, Fri Oct 2 00:47:48 2009 UTC
# Line 1  Line 1 
1  package skrueger.geotools;  /*******************************************************************************
2     * Copyright (c) 2009 Martin O. J. Schmitz.
3  import java.io.IOException;   *
4  import java.net.URL;   * This file is part of the SCHMITZM library - a collection of utility
5  import java.util.HashMap;   * classes based on Java 1.6, focusing (not only) on Java Swing
6  import java.util.Map;   * and the Geotools library.
7     *
8  import javax.swing.ImageIcon;   * The SCHMITZM project is hosted at:
9     * http://wald.intevation.org/projects/schmitzm/
10  import org.geotools.data.FeatureSource;   *
11  import org.geotools.data.collection.CollectionDataStore;   * This program is free software; you can redistribute it and/or
12  import org.geotools.feature.AttributeType;   * modify it under the terms of the GNU Lesser General Public License
13  import org.geotools.feature.FeatureCollection;   * as published by the Free Software Foundation; either version 3
14  import org.geotools.feature.FeatureType;   * of the License, or (at your option) any later version.
15  import org.geotools.styling.Style;   *
16     * This program is distributed in the hope that it will be useful,
17  import schmitzm.geotools.feature.FeatureUtil;   * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  import skrueger.AttributeMetaData;   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  import skrueger.i8n.Translation;   * GNU General Public License for more details.
20     *
21  /**   * You should have received a copy of the GNU Lesser General Public License (license.txt)
22   * This class provides a simple implementation of {@link StyledLayerInterface} for   * along with this program; if not, write to the Free Software
23   * {@link FeatureCollection}. The uncache functionality is not supported,   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
24   * because this class bases on an existing {@link FeatureCollection} object in   * or try this link: http://www.gnu.org/licenses/lgpl.html
25   * memory.   *
26   *   * Contributors:
27   * @author <a href="mailto:[email protected]">Martin Schmitz</a>   *     Martin O. J. Schmitz - initial API and implementation
28   *         (University of Bonn/Germany)   *     Stefan A. Krüger - additional utility classes
29   * @version 1.0   ******************************************************************************/
30   */  package skrueger.geotools;
31  public class StyledFeatureCollection extends  
32                  AbstractStyledLayer<FeatureCollection> implements  import java.io.IOException;
33                  StyledFeatureCollectionInterface {  import java.net.URL;
34    
35          /** Holds the meta data for displaying a legend. */  import javax.swing.ImageIcon;
36          protected Map<Integer, AttributeMetaData> attrMetaData = null;  
37    import org.geotools.data.FeatureSource;
38          /**  import org.geotools.data.collection.CollectionDataStore;
39           * We be filled with a "virtual" {@link FeatureSource} on demand.  import org.geotools.feature.FeatureCollection;
40           */  import org.geotools.styling.Style;
41          private FeatureSource featureSource = null;  import org.opengis.feature.simple.SimpleFeature;
42    import org.opengis.feature.simple.SimpleFeatureType;
43          /**  import org.opengis.feature.type.AttributeDescriptor;
44           * Creates a styled {@link FeatureCollection} with language-specific  
45           * informations.  import schmitzm.geotools.feature.FeatureUtil;
46           *  import skrueger.AttributeMetaData;
47           * @param fc  import skrueger.i8n.Translation;
48           *            the {@link FeatureCollection}  
49           * @param id  /**
50           *            a unique ID for the object   * This class provides a simple implementation of {@link StyledLayerInterface} for
51           * @param title   * {@link FeatureCollection}. The uncache functionality is not supported,
52           *            a (language-specific) short description   * because this class bases on an existing {@link FeatureCollection} object in
53           * @param desc   * memory.
54           *            a (language-specific) long description   *
55           * @param keywords   * @author <a href="mailto:[email protected]">Martin Schmitz</a>
56           *            (language-specific) keywords for the geo objects   *         (University of Bonn/Germany)
57           * @param style   * @version 1.0
58           *            a display style (if {@code null}, a default style is created)   */
59           * @param attrMetaData  public class StyledFeatureCollection extends
60           *            meta data for displaying a legend                  AbstractStyledLayer<FeatureCollection<SimpleFeatureType, SimpleFeature> > implements
61           * @param icon                  StyledFeatureCollectionInterface {
62           *            an icon for the object (can be {@code null})  
63           * @exception IllegalArgumentException          /** Holds the meta data for displaying a legend. */
64           *                if {@code null} is given as ID or geo object          protected AttributeMetadataMap attrMetaData = null;
65           */  
66          public StyledFeatureCollection(FeatureCollection fc, String id,          /**
67                          Translation title, Translation desc, Translation keywords,           * We be filled with a "virtual" {@link FeatureSource} on demand.
68                          Style style, Map<Integer, AttributeMetaData> attrMetaData,           */
69                          ImageIcon icon) {          private FeatureSource<SimpleFeatureType, SimpleFeature> featureSource = null;
70                  super(fc, fc.getBounds(), fc.getSchema().getDefaultGeometry()  
71                                  .getCoordinateSystem(), id, title, desc, keywords, style, icon);          /**
72                  setAttributeMetaData(attrMetaData);           * Creates a styled {@link FeatureCollection} with language-specific
73          }           * informations.
74             *
75          /**           * @param fc
76           * Creates a styled {@link FeatureCollection} with language-specific           *            the {@link FeatureCollection}
77           * informations.           * @param id
78           *           *            a unique ID for the object
79           * @param fc           * @param title
80           *            the {@link FeatureCollection}           *            a (language-specific) short description
81           * @param id           * @param desc
82           *            a unique ID for the object           *            a (language-specific) long description
83           * @param title           * @param keywords
84           *            a (language-specific) short description           *            (language-specific) keywords for the geo objects
85           * @param desc           * @param style
86           *            a (language-specific) long description           *            a display style (if {@code null}, a default style is created)
87           * @param keywords           * @param attrMetaData
88           *            (language-specific) keywords for the geo objects           *            meta data for displaying a legend
89           * @param style           * @param icon
90           *            a display style with attribute meta data information           *            an icon for the object (can be {@code null})
91           * @param icon           * @exception IllegalArgumentException
92           *            an icon for the object (can be {@code null})           *                if {@code null} is given as ID or geo object
93           * @exception IllegalArgumentException           */
94           *                if {@code null} is given as ID or geo object          public StyledFeatureCollection(FeatureCollection<SimpleFeatureType,SimpleFeature> fc, String id,
95           */                          Translation title, Translation desc, Translation keywords,
96          public StyledFeatureCollection(FeatureCollection fc, String id,                          Style style, AttributeMetadataMap attrMetaData,
97                          Translation title, Translation desc, Translation keywords,                          ImageIcon icon) {
98                          StyledLayerStyle<Map<Integer, AttributeMetaData>> style,                  super(fc, fc.getBounds(), fc.getSchema().getGeometryDescriptor()
99                          ImageIcon icon) {                                  .getCoordinateReferenceSystem(), id, title, desc, keywords, style, icon);
100                  super(fc, fc.getBounds(), fc.getSchema().getDefaultGeometry()                  setAttributeMetaData(attrMetaData);
101                                  .getCoordinateSystem(), id, title, desc, keywords,          }
102                                  style != null ? style.getGeoObjectStyle() : null, icon);  
103                  setAttributeMetaData(style != null ? style.getMetaData() : null);          /**
104          }           * Creates a styled {@link FeatureCollection} with language-specific
105             * informations.
106          /**           *
107           * Creates a styled {@link FeatureCollection} with a language-specific           * @param fc
108           * title, no long description, no keywords, default attribute meta data and           *            the {@link FeatureCollection}
109           * no icon.           * @param id
110           *           *            a unique ID for the object
111           * @param fc           * @param title
112           *            the {@link FeatureCollection}           *            a (language-specific) short description
113           * @param id           * @param desc
114           *            a unique ID for the object           *            a (language-specific) long description
115           * @param title           * @param keywords
116           *            a short description           *            (language-specific) keywords for the geo objects
117           * @param style           * @param style
118           *            a display style (if {@code null}, a default style is created)           *            a display style with attribute meta data information
119           * @exception IllegalArgumentException           * @param icon
120           *                if {@code null} is given as ID or geo object           *            an icon for the object (can be {@code null})
121           * @see #createDefaultAttributeMetaDataMap(FeatureCollection)           * @exception IllegalArgumentException
122           */           *                if {@code null} is given as ID or geo object
123          public StyledFeatureCollection(FeatureCollection fc, String id,           */
124                          Translation title, Style style) {          public StyledFeatureCollection(FeatureCollection<SimpleFeatureType,SimpleFeature> fc, String id,
125                  this(fc, id, title, null, null, style, null, null);                          Translation title, Translation desc, Translation keywords,
126          }                          StyledLayerStyle<AttributeMetadataMap> style,
127                            ImageIcon icon) {
128          /**                  super(fc, fc.getBounds(), fc.getSchema().getGeometryDescriptor()
129           * Creates a styled {@link FeatureCollection} with non-translated                                  .getCoordinateReferenceSystem(), id, title, desc, keywords,
130           * informations.                                  style != null ? style.getGeoObjectStyle() : null, icon);
131           *                  setAttributeMetaData(style != null ? style.getMetaData() : null);
132           * @param fc          }
133           *            the {@link FeatureCollection}  
134           * @param id          /**
135           *            a unique ID for the object           * Creates a styled {@link FeatureCollection} with a language-specific
136           * @param title           * title, no long description, no keywords, default attribute meta data and
137           *            a short description           * no icon.
138           * @param desc           *
139           *            a long description           * @param fc
140           * @param keywords           *            the {@link FeatureCollection}
141           *            keywords for the geo objects           * @param id
142           * @param style           *            a unique ID for the object
143           *            a display style (if {@code null}, a default style is created)           * @param title
144           * @param attrMetaData           *            a short description
145           *            meta data for displaying a legend           * @param style
146           * @param icon           *            a display style (if {@code null}, a default style is created)
147           *            an icon for the object (can be {@code null})           * @exception IllegalArgumentException
148           * @exception IllegalArgumentException           *                if {@code null} is given as ID or geo object
149           *                if {@code null} is given as ID or geo object           * @see #createDefaultAttributeMetaDataMap(FeatureCollection)
150           */           */
151          public StyledFeatureCollection(FeatureCollection fc, String id,          public StyledFeatureCollection(FeatureCollection<SimpleFeatureType,SimpleFeature> fc, String id,
152                          String title, String desc, String keywords, Style style,                          Translation title, Style style) {
153                          Map<Integer, AttributeMetaData> attrMetaData, ImageIcon icon) {                  this(fc, id, title, null, null, style, null, null);
154                  this(fc, id, (Translation) null, null, null, style, attrMetaData, icon);          }
155                  setTitle(title);  
156                  setDesc(desc);          /**
157                  setKeywords(keywords);           * Creates a styled {@link FeatureCollection} with non-translated
158          }           * informations.
159             *
160          /**           * @param fc
161           * Creates a styled {@link FeatureCollection} with non-translated           *            the {@link FeatureCollection}
162           * informations.           * @param id
163           *           *            a unique ID for the object
164           * @param fc           * @param title
165           *            the {@link FeatureCollection}           *            a short description
166           * @param id           * @param desc
167           *            a unique ID for the object           *            a long description
168           * @param title           * @param keywords
169           *            a short description           *            keywords for the geo objects
170           * @param desc           * @param style
171           *            a long description           *            a display style (if {@code null}, a default style is created)
172           * @param keywords           * @param attrMetaData
173           *            keywords for the geo objects           *            meta data for displaying a legend
174           * @param style           * @param icon
175           *            a display style with attribute meta data information           *            an icon for the object (can be {@code null})
176           * @param icon           * @exception IllegalArgumentException
177           *            an icon for the object (can be {@code null})           *                if {@code null} is given as ID or geo object
178           * @exception IllegalArgumentException           */
179           *                if {@code null} is given as ID or geo object          public StyledFeatureCollection(FeatureCollection<SimpleFeatureType,SimpleFeature> fc, String id,
180           */                          String title, String desc, String keywords, Style style,
181          public StyledFeatureCollection(FeatureCollection fc, String id,                          AttributeMetadataMap attrMetaData, ImageIcon icon) {
182                          String title, String desc, String keywords,                  this(fc, id, (Translation) null, null, null, style, attrMetaData, icon);
183                          StyledLayerStyle<Map<Integer, AttributeMetaData>> style,                  setTitle(title);
184                          ImageIcon icon) {                  setDesc(desc);
185                  this(fc, id, title, desc, keywords, style != null ? style                  setKeywords(keywords);
186                                  .getGeoObjectStyle() : null, style != null ? style          }
187                                  .getMetaData() : null, icon);  
188          }          /**
189             * Creates a styled {@link FeatureCollection} with non-translated
190          /**           * informations.
191           * Creates a styled {@link FeatureCollection} with a non-translated title,           *
192           * no long description, no keywords, default attribute meta data and no           * @param fc
193           * icon.           *            the {@link FeatureCollection}
194           *           * @param id
195           * @param fc           *            a unique ID for the object
196           *            the {@link FeatureCollection}           * @param title
197           * @param id           *            a short description
198           *            a unique ID for the object           * @param desc
199           * @param title           *            a long description
200           *            a short description           * @param keywords
201           * @param style           *            keywords for the geo objects
202           *            a display style (if {@code null}, a default style is created)           * @param style
203           * @exception IllegalArgumentException           *            a display style with attribute meta data information
204           *                if {@code null} is given as ID or geo object           * @param icon
205           * @see #createDefaultAttributeMetaDataMap(FeatureCollection)           *            an icon for the object (can be {@code null})
206           */           * @exception IllegalArgumentException
207          public StyledFeatureCollection(FeatureCollection fc, String id,           *                if {@code null} is given as ID or geo object
208                          String title, Style style) {           */
209                  this(fc, id, title, null, null, style, null, null);          public StyledFeatureCollection(FeatureCollection<SimpleFeatureType,SimpleFeature> fc, String id,
210          }                          String title, String desc, String keywords,
211                            StyledLayerStyle<AttributeMetadataMap> style,
212          /**                          ImageIcon icon) {
213           * Creates a styled {@link FeatureCollection} with a non-translated title,                  this(fc, id, title, desc, keywords, style != null ? style
214           * no long description, no keywords, default attribute meta data and no                                  .getGeoObjectStyle() : null, style != null ? style
215           * icon.                                  .getMetaData() : null, icon);
216           *          }
217           * @param fc  
218           *            the {@link FeatureCollection}          /**
219           * @param id           * Creates a styled {@link FeatureCollection} with a non-translated title,
220           *            a unique ID for the object           * no long description, no keywords, default attribute meta data and no
221           * @param title           * icon.
222           *            a short description           *
223           * @param style           * @param fc
224           *            a display style (if {@code null}, a default style is created)           *            the {@link FeatureCollection}
225           * @exception IllegalArgumentException           * @param id
226           *                if {@code null} is given as ID or geo object           *            a unique ID for the object
227           * @see #createDefaultAttributeMetaDataMap(FeatureCollection)           * @param title
228           */           *            a short description
229          public StyledFeatureCollection(FeatureCollection fc, String id,           * @param style
230                          String title, StyledLayerStyle<Map<Integer, AttributeMetaData>> style) {           *            a display style (if {@code null}, a default style is created)
231                  this(fc, id, title, null, null, style != null ? style           * @exception IllegalArgumentException
232                                  .getGeoObjectStyle() : null, style != null ? style           *                if {@code null} is given as ID or geo object
233                                  .getMetaData() : null, null);           * @see #createDefaultAttributeMetaDataMap(FeatureCollection)
234          }           */
235            public StyledFeatureCollection(FeatureCollection<SimpleFeatureType,SimpleFeature> fc, String id,
236          /**                          String title, Style style) {
237           * Creates a default style for the {@link FeatureCollection}.                  this(fc, id, title, null, null, style, null, null);
238           *          }
239           * @see FeatureUtil#createDefaultStyle(FeatureCollection)  
240           */          /**
241          protected Style createDefaultStyle() {           * Creates a styled {@link FeatureCollection} with a non-translated title,
242                  return FeatureUtil.createDefaultStyle(geoObject);           * no long description, no keywords, default attribute meta data and no
243          }           * icon.
244             *
245          /**           * @param fc
246           * Returns the meta data needed for displaying a legend.           *            the {@link FeatureCollection}
247           */           * @param id
248          public Map<Integer, AttributeMetaData> getAttributeMetaDataMap() {           *            a unique ID for the object
249                  return attrMetaData;           * @param title
250          }           *            a short description
251             * @param style
252          /**           *            a display style (if {@code null}, a default style is created)
253           * Sets the meta data needed for displaying a legend. If {@code legendData}           * @exception IllegalArgumentException
254           * is {@code null} an empty map is set, so           *                if {@code null} is given as ID or geo object
255           * {@link #getAttributeMetaDataMap()} never returns {@code null}.           * @see #createDefaultAttributeMetaDataMap(FeatureCollection)
256           *           */
257           * @param attrMetaData          public StyledFeatureCollection(FeatureCollection<SimpleFeatureType,SimpleFeature> fc, String id,
258           *            map of attribute meta data                          String title, StyledLayerStyle<AttributeMetadataMap> style) {
259           */                  this(fc, id, title, null, null, style != null ? style
260          public void setAttributeMetaData(                                  .getGeoObjectStyle() : null, style != null ? style
261                          Map<Integer, AttributeMetaData> attrMetaData) {                                  .getMetaData() : null, null);
262                  this.attrMetaData = (attrMetaData != null) ? attrMetaData          }
263                                  : createDefaultAttributeMetaDataMap(geoObject);  
264          }          /**
265             * Creates a default style for the {@link FeatureCollection}.
266          /**           *
267           * Creates non-translated default meta data for a {@link FeatureCollection}           * @see FeatureUtil#createDefaultStyle(FeatureCollection)
268           * with all attributes visible and no unit set.           */
269           *          protected Style createDefaultStyle() {
270           * @param fc                  return FeatureUtil.createDefaultStyle(geoObject);
271           *            a {@link FeatureCollection}          }
272           */  
273          public static Map<Integer, AttributeMetaData> createDefaultAttributeMetaDataMap(          /**
274                          FeatureCollection fc) {           * Returns the meta data needed for displaying a legend.
275                  HashMap<Integer, AttributeMetaData> metaDataMap = new HashMap<Integer, AttributeMetaData>();           */
276                  FeatureType ftype = fc.getSchema();          public AttributeMetadataMap getAttributeMetaDataMap() {
277                  for (int i = 0; i < ftype.getAttributeCount(); i++) {                  return attrMetaData;
278                          AttributeType aType = ftype.getAttributeType(i);          }
279                          if (aType != ftype.getDefaultGeometry())  
280                                  metaDataMap.put(i, new AttributeMetaData(i, // Column no.          /**
281                                                  true, // visible           * Sets the meta data needed for displaying a legend. If {@code legendData}
282                                                  new Translation(aType.getName()), // Column name           * is {@code null} an empty map is set, so
283                                                  new Translation(), // description           * {@link #getAttributeMetaDataMap()} never returns {@code null}.
284                                                  "" // Unit           *
285                                  ));           * @param attrMetaData
286                  }           *            map of attribute meta data
287                  return metaDataMap;           */
288          }          public void setAttributeMetaData(
289                            AttributeMetadataMap attrMetaData) {
290          /**                  this.attrMetaData = (attrMetaData != null) ? attrMetaData
291           * Simply sets the {@link #geoObject}, {@link #crs}, {@link #envelope} and                                  : createDefaultAttributeMetaDataMap(geoObject);
292           * {@link #attrMetaData} to {@code null}.          }
293           */  
294          public void dispose() {          /**
295                  this.geoObject = null;           * Creates non-translated default meta data for a {@link FeatureCollection}
296                  this.envelope = null;           * with all attributes visible and no unit set.
297                  this.crs = null;           *
298                  this.attrMetaData = null;           * @param fc
299          }           *            a {@link FeatureCollection}
300             */
301          /**          public static AttributeMetadataMap createDefaultAttributeMetaDataMap(
302           * Tests whether the geo object is disposed.                          FeatureCollection<SimpleFeatureType,SimpleFeature> fc) {
303           */                  AttributeMetadataMap metaDataMap = new AttributeMetadataMap();
304          public boolean isDisposed() {                  SimpleFeatureType ftype = fc.getSchema();
305                  return geoObject == null;                  for (int i = 0; i < ftype.getAttributeCount(); i++) {
306          }                          AttributeDescriptor aType = ftype.getAttributeDescriptors().get(i);
307                            if (aType != ftype.getGeometryDescriptor())
308          /**                                  metaDataMap.put(i, new AttributeMetaData(i, // Column no.
309           * Does nothing, because the {@link AbstractStyledLayer} bases on existing                                                  true, // visible
310           * objects (in memory) which can not be uncached and reloaded.                                                  new Translation(aType.getLocalName()), // Column name
311           */                                                  new Translation(), // description
312          public void uncache() {                                                  "" // Unit
313                                    ));
314                  /** It will be recreated on the next getFetureSource() **/                  }
315                  featureSource = null;                  return metaDataMap;
316            }
317                  LOGGER  
318                                  .warn("Uncache onyl uncached any virtual FeatureSource. Object remains in memory.");          /**
319          }           * Simply sets the {@link #geoObject}, {@link #crs}, {@link #envelope} and
320             * {@link #attrMetaData} to {@code null}.
321          /*           */
322           * (non-Javadoc)          public void dispose() {
323           *                  this.geoObject = null;
324           * @see skrueger.geotools.StyledLayerInterface#getInfoURL()                  this.envelope = null;
325           */                  this.crs = null;
326          public URL getInfoURL() {                  this.attrMetaData = null;
327                  return null;          }
328          }  
329            /**
330          /**           * Tests whether the geo object is disposed.
331           * Same as {@link #getGeoObject()} method, but complies to the {@link StyledFeaturesInterface}           */
332           * @see {@link StyledFeaturesInterface}          public boolean isDisposed() {
333           */                  return geoObject == null;
334          @Override          }
335          public FeatureCollection getFeatureCollection() {  
336                  return getGeoObject();          /**
337          }           * Does nothing, because the {@link AbstractStyledLayer} bases on existing
338             * objects (in memory) which can not be uncached and reloaded.
339          /**           */
340           * Returns a virtual {@link FeatureSource} to access the          public void uncache() {
341           * {@link FeatureCollection}. Once created, it will be reused until  
342           * {@link #uncache()} is called.<br/>                  /** It will be recreated on the next getFetureSource() **/
343           * @see {@link StyledFeaturesInterface}                  featureSource = null;
344           */  
345          @Override                  LOGGER
346          public FeatureSource getFeatureSource() {                                  .warn("Uncache onyl uncached any virtual FeatureSource. Object remains in memory.");
347                  if (featureSource == null) {          }
348                          CollectionDataStore store = new CollectionDataStore(getGeoObject());  
349                          try {          /*
350                                  featureSource = store.getFeatureSource(store.getTypeNames()[0]);           * (non-Javadoc)
351                          } catch (IOException e) {           *
352                                  throw new RuntimeException(           * @see skrueger.geotools.StyledLayerInterface#getInfoURL()
353                                                  "Could not create a FeatureSource from the CollectionDataStore:",           */
354                                                  e);          public URL getInfoURL() {
355                          }                  return null;
356                  }          }
357                  return featureSource;  
358          }          /**
359             * Same as {@link #getGeoObject()} method, but complies to the {@link StyledFeaturesInterface}
360  }           * @see {@link StyledFeaturesInterface}
361             */
362            @Override
363            public FeatureCollection<SimpleFeatureType,SimpleFeature> getFeatureCollection() {
364                    return getGeoObject();
365            }
366    
367            /**
368             * Returns a virtual {@link FeatureSource} to access the
369             * {@link FeatureCollection}. Once created, it will be reused until
370             * {@link #uncache()} is called.<br/>
371             * @see {@link StyledFeaturesInterface}
372             */
373            @Override
374            public FeatureSource<SimpleFeatureType,SimpleFeature> getFeatureSource() {
375                    if (featureSource == null) {
376                            CollectionDataStore store = new CollectionDataStore(getGeoObject());
377                            try {
378                                    featureSource = store.getFeatureSource(store.getTypeNames()[0]);
379                            } catch (IOException e) {
380                                    throw new RuntimeException(
381                                                    "Could not create a FeatureSource from the CollectionDataStore:",
382                                                    e);
383                            }
384                    }
385                    return featureSource;
386            }
387    
388    }

Legend:
Removed from v.224  
changed lines
  Added in v.422

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26