svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.dal / org.gvsig.fmap.dal.spi / src / main / java / org / gvsig / fmap / dal / feature / spi / index / FeatureIndexProvider.java @ 43020
History | View | Annotate | Download (3.4 KB)
1 | 40559 | jjdelcerro | /**
|
---|---|---|---|
2 | * gvSIG. Desktop Geographic Information System.
|
||
3 | *
|
||
4 | * Copyright (C) 2007-2013 gvSIG Association.
|
||
5 | *
|
||
6 | * This program is free software; you can redistribute it and/or
|
||
7 | * modify it under the terms of the GNU General Public License
|
||
8 | * as published by the Free Software Foundation; either version 3
|
||
9 | * of the License, or (at your option) any later version.
|
||
10 | *
|
||
11 | * This program is distributed in the hope that it will be useful,
|
||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
14 | * GNU General Public License for more details.
|
||
15 | *
|
||
16 | * You should have received a copy of the GNU General Public License
|
||
17 | * along with this program; if not, write to the Free Software
|
||
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||
19 | * MA 02110-1301, USA.
|
||
20 | *
|
||
21 | * For any additional information, do not hesitate to contact us
|
||
22 | * at info AT gvsig.com, or visit our website www.gvsig.com.
|
||
23 | */
|
||
24 | 40435 | jjdelcerro | |
25 | package org.gvsig.fmap.dal.feature.spi.index; |
||
26 | |||
27 | import java.util.List; |
||
28 | 43020 | jjdelcerro | import org.gvsig.fmap.dal.DataFactoryUnit; |
29 | 40435 | jjdelcerro | |
30 | import org.gvsig.fmap.dal.exception.DataException; |
||
31 | import org.gvsig.fmap.dal.exception.InitializeException; |
||
32 | import org.gvsig.fmap.dal.feature.exception.FeatureIndexException; |
||
33 | import org.gvsig.fmap.dal.feature.spi.FeatureReferenceProviderServices; |
||
34 | |||
35 | |||
36 | 43020 | jjdelcerro | public interface FeatureIndexProvider extends DataFactoryUnit { |
37 | 40435 | jjdelcerro | |
38 | /** Sets the IndexProviderServices that will provide application services to this index provider */
|
||
39 | public void setFeatureIndexProviderServices(FeatureIndexProviderServices services); |
||
40 | |||
41 | /** Initializes this provider */
|
||
42 | public void initialize() throws InitializeException; |
||
43 | |||
44 | /** Inserts a value into the index */
|
||
45 | public void insert(Object value, FeatureReferenceProviderServices fref); |
||
46 | |||
47 | /** Deletes a value from the index, given its reference */
|
||
48 | public void delete(Object value, FeatureReferenceProviderServices fref); |
||
49 | |||
50 | /** Performs a search in the index and returns a list with all the values that match the given value
|
||
51 | * @throws FeatureIndexException TODO*/
|
||
52 | public List match(Object value) throws FeatureIndexException; |
||
53 | |||
54 | /** Performs a search in the index and returns a list with the values that intersect with the given interval
|
||
55 | * @throws FeatureIndexException TODO*/
|
||
56 | public List range(Object value1, Object value2) throws FeatureIndexException; |
||
57 | |||
58 | /** Performs a search in the index and returns the list of up to n values which are nearest to the given value. */
|
||
59 | public List nearest(int count, Object value) throws FeatureIndexException; |
||
60 | |||
61 | /** Performs a search in the index and returns the list of up to n values which are nearest to the given value and within the distance specified by tolerance. */
|
||
62 | public List nearest(int count, Object value, Object tolerance) throws FeatureIndexException; |
||
63 | |||
64 | |||
65 | /** Returns true if the provider supports the match function */
|
||
66 | public boolean isMatchSupported(); |
||
67 | /** Returns true if the provider supports the range function */
|
||
68 | public boolean isRangeSupported(); |
||
69 | /** Returns true if the provider supports the nearest function */
|
||
70 | public boolean isNearestSupported(); |
||
71 | /** Returns true if the provider supports the nearest with tolerance function */
|
||
72 | public boolean isNearestToleranceSupported(); |
||
73 | public boolean allowNulls(); |
||
74 | |||
75 | /**
|
||
76 | * Removes all indexed data.
|
||
77 | *
|
||
78 | * @throws DataException
|
||
79 | * if there is an error clearing the index
|
||
80 | */
|
||
81 | public void clear() throws DataException; |
||
82 | |||
83 | } |