Revision 24206 branches/v2_0_0_prep/libraries/libFMap_data/src/org/gvsig/fmap/data/feature/FeatureIndex.java
FeatureIndex.java | ||
---|---|---|
2 | 2 |
* |
3 | 3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
4 | 4 |
* of the Valencian Government (CIT) |
5 |
* |
|
5 |
*
|
|
6 | 6 |
* This program is free software; you can redistribute it and/or |
7 | 7 |
* modify it under the terms of the GNU General Public License |
8 | 8 |
* as published by the Free Software Foundation; either version 2 |
9 | 9 |
* of the License, or (at your option) any later version. |
10 |
* |
|
10 |
*
|
|
11 | 11 |
* This program is distributed in the hope that it will be useful, |
12 | 12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | 14 |
* GNU General Public License for more details. |
15 |
* |
|
15 |
*
|
|
16 | 16 |
* You should have received a copy of the GNU General Public License |
17 | 17 |
* along with this program; if not, write to the Free Software |
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
|
19 | 19 |
* MA 02110-1301, USA. |
20 |
* |
|
20 |
*
|
|
21 | 21 |
*/ |
22 | 22 |
|
23 | 23 |
/* |
24 | 24 |
* AUTHORS (In addition to CIT): |
25 | 25 |
* 2008 {{Company}} {{Task}} |
26 | 26 |
*/ |
27 |
|
|
27 | 28 |
|
28 |
|
|
29 | 29 |
package org.gvsig.fmap.data.feature; |
30 | 30 |
|
31 |
import java.util.List; |
|
32 |
|
|
31 | 33 |
import org.gvsig.fmap.data.exceptions.DataException; |
32 |
import org.gvsig.fmap.data.feature.exceptions.DataIndexException;
|
|
34 |
import org.gvsig.fmap.data.feature.exceptions.FeatureIndexException;
|
|
33 | 35 |
import org.gvsig.fmap.data.feature.spi.FeatureSetProvider; |
34 | 36 |
|
35 | 37 |
/** |
36 |
* Interface for any Index. |
|
38 |
* Interface for any Index.
|
|
37 | 39 |
* @author jyarza |
38 | 40 |
* |
39 | 41 |
*/ |
40 | 42 |
public interface FeatureIndex { |
41 |
|
|
43 |
|
|
42 | 44 |
/** Index name */ |
43 | 45 |
public String getName(); |
44 |
|
|
46 |
|
|
45 | 47 |
/** Attribute names */ |
46 |
public String[] getAttributeNames();
|
|
47 |
|
|
48 |
public List getAttributeNames();
|
|
49 |
|
|
48 | 50 |
/** Data type */ |
49 | 51 |
public int getDataType(); |
50 |
|
|
52 |
|
|
51 | 53 |
/** |
52 | 54 |
* Inserts a Feature in the index. |
53 | 55 |
* The Feature must contain a column that matches this index's column (name and data type) |
... | ... | |
56 | 58 |
public void insert(Feature feat); |
57 | 59 |
|
58 | 60 |
/** |
59 |
* Inserts a FeatureCollection into this index
|
|
61 |
* Inserts a FeatureSet into this index
|
|
60 | 62 |
* FeatureType is not checked so it will accept any FeatureType |
61 | 63 |
* as long as exists a column with a valid name |
62 |
*/ |
|
64 |
*/
|
|
63 | 65 |
public void insert(FeatureSet data) throws DataException; |
64 |
|
|
66 |
|
|
65 | 67 |
/** |
66 | 68 |
* Deletes a Feature in the index. |
67 | 69 |
* The Feature must contain a column that matches this index's column (name and data type) |
... | ... | |
70 | 72 |
public void delete(Feature feat); |
71 | 73 |
|
72 | 74 |
/** |
73 |
* Deletes a FeatureCollection from this index
|
|
75 |
* Deletes a FeatureSet from this index
|
|
74 | 76 |
* FeatureType is not checked so it will accept any FeatureType |
75 | 77 |
* as long as exists a column with a valid name |
76 |
*/ |
|
77 |
public void delete(FeatureSet data) throws DataIndexException; |
|
78 |
|
|
79 |
/** |
|
80 |
* Searches the index and returns a FeatureSet with the result |
|
81 |
* @param attrName |
|
82 |
* @param data |
|
83 |
* @return |
|
84 |
* @throws DataIndexException |
|
85 |
*/ |
|
86 |
// public FeatureSetProvider getFeatureSet(String attrName, Object[] data) |
|
87 |
// throws DataIndexException; |
|
88 |
|
|
89 |
|
|
78 |
*/ |
|
79 |
public void delete(FeatureSet data) throws FeatureIndexException; |
|
80 |
|
|
90 | 81 |
public FeatureSetProvider getMatchFeatureSet(Object value) |
91 |
throws DataIndexException;
|
|
82 |
throws FeatureIndexException;
|
|
92 | 83 |
|
93 | 84 |
public FeatureSetProvider getRangeFeatureSet(Object value1, Object value2) |
94 |
throws DataIndexException;
|
|
85 |
throws FeatureIndexException;
|
|
95 | 86 |
|
96 | 87 |
public FeatureSetProvider getNearestFeatureSet(int count, Object value) |
97 |
throws DataIndexException;
|
|
88 |
throws FeatureIndexException;
|
|
98 | 89 |
|
99 |
public FeatureSetProvider getNearestFeatureSet(int count, int tolerance,
|
|
100 |
Object value) throws DataIndexException;
|
|
90 |
public FeatureSetProvider getNearestFeatureSet(int count, Object value,
|
|
91 |
double tolerance) throws FeatureIndexException;
|
|
101 | 92 |
|
93 |
|
|
102 | 94 |
} |
103 |
|
Also available in: Unified diff