source: osm/applications/editors/josm/plugins/opendata/includes/org/geotools/data/FIDReader.java@ 28000

Last change on this file since 28000 was 28000, checked in by donvip, 12 years ago

Import new "opendata" JOSM plugin

File size: 2.1 KB
Line 
1/*
2 * GeoTools - The Open Source Java GIS Toolkit
3 * http://geotools.org
4 *
5 * (C) 2003-2008, Open Source Geospatial Foundation (OSGeo)
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation;
10 * version 2.1 of the License.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 */
17package org.geotools.data;
18
19import java.io.IOException;
20
21
22/**
23 * FeatureReader<SimpleFeatureType, SimpleFeature> customized for FeatureID handling.
24 *
25 * <p>
26 * An experimental method for doing FIDs. I'd like to see it and
27 * AttributeReader extend a similar base. Perhaps BaseReader or something?
28 * And perhaps have FeatureReader<SimpleFeatureType, SimpleFeature> extend it too? This reader just returns an
29 * incrementing index. May be sufficient for files, representing rows in a
30 * file. For jdbc datasources another fid reader should be used.
31 * </p>
32 *
33 * <p>
34 * We could have FIDReader implement AttributeReader, but it doesn't seem to
35 * make sense, as the getAttributeType doesn't make much sense, as our
36 * featureID is just a string. Or we could consider having a special FID
37 * attribute in our hierarchy.
38 * </p>
39 *
40 * @author Chris Holmes
41 *
42 * @source $URL: http://svn.osgeo.org/geotools/branches/2.7.x/modules/library/main/src/main/java/org/geotools/data/FIDReader.java $
43 * @version $Id: FIDReader.java 37298 2011-05-25 05:16:15Z mbedward $
44 */
45public interface FIDReader {
46 /**
47 * Release any resources associated with this reader
48 */
49 void close() throws IOException;
50
51 /**
52 * Returns whether another fid exists for this reader.
53 *
54 * @return <code>true</code> if more content exists
55 */
56 boolean hasNext() throws IOException;
57
58 /**
59 * Gets the next FID from the Reader.
60 *
61 * @return Next featureID
62 */
63 String next() throws IOException;
64}
Note: See TracBrowser for help on using the repository browser.