svn-gvsig-desktop / branches / v2_0_0_prep / libraries / libFMap_data / src / org / gvsig / fmap / data / index / Index.java @ 23760
History | View | Annotate | Download (3.11 KB)
1 |
/* gvSIG. Geographic Information System of the Valencian Government
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
4 |
* of the Valencian Government (CIT)
|
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 2
|
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 |
*/
|
22 |
|
23 |
/*
|
24 |
* AUTHORS (In addition to CIT):
|
25 |
* 2008 {{Company}} {{Task}}
|
26 |
*/
|
27 |
|
28 |
|
29 |
package org.gvsig.fmap.data.index; |
30 |
|
31 |
import java.util.List; |
32 |
|
33 |
import org.gvsig.fmap.data.feature.Feature; |
34 |
import org.gvsig.fmap.data.feature.FeatureAttributeDescriptor; |
35 |
import org.gvsig.fmap.data.feature.FeatureCollection; |
36 |
import org.gvsig.fmap.data.feature.FeatureID; |
37 |
import org.gvsig.fmap.data.feature.FeatureStore; |
38 |
import org.gvsig.fmap.data.feature.FeatureType; |
39 |
|
40 |
/**
|
41 |
* Interface for any Index.
|
42 |
* @author jyarza
|
43 |
*
|
44 |
*/
|
45 |
public interface Index { |
46 |
|
47 |
/** Column to which belongs this index */
|
48 |
public FeatureAttributeDescriptor getFeatureAttributeDescriptor();
|
49 |
|
50 |
/** FeatureType to which belongs this index */
|
51 |
public FeatureType getFeatureType();
|
52 |
|
53 |
/** FeatureStore to which belongs this index */
|
54 |
public FeatureStore getFeatureStore();
|
55 |
|
56 |
/** Index name */
|
57 |
public String getName(); |
58 |
|
59 |
/** Indicates if this index should overwrite itself on creation, if it exists already */
|
60 |
public boolean isOverwrite(); |
61 |
|
62 |
/**
|
63 |
* This is the most basic insertion method.
|
64 |
* Inserts an object into the index, with the specified id.
|
65 |
*/
|
66 |
public void insert(Object o, FeatureID fid); |
67 |
|
68 |
/**
|
69 |
* Inserts a Feature in the index.
|
70 |
* The Feature must contain a column that matches this index's column (name and data type)
|
71 |
* @param feat
|
72 |
*/
|
73 |
public void insert(Feature feat); |
74 |
|
75 |
/**
|
76 |
* Inserts a FeatureCollection into this index
|
77 |
* FeatureType is not checked so it will accept any FeatureType
|
78 |
* as long as exists a column with a valid name
|
79 |
*/
|
80 |
public void insert(FeatureCollection data); |
81 |
|
82 |
/**
|
83 |
* This is the most basic deletion method.
|
84 |
* Deletes an object from the index, given its id
|
85 |
**/
|
86 |
public void delete(Object o, FeatureID fid); |
87 |
|
88 |
/**
|
89 |
* Deletes a Feature in the index.
|
90 |
* The Feature must contain a column that matches this index's column (name and data type)
|
91 |
* @param feat
|
92 |
*/
|
93 |
public void delete(Feature feat); |
94 |
|
95 |
/**
|
96 |
* Deletes a FeatureCollection from this index
|
97 |
* FeatureType is not checked so it will accept any FeatureType
|
98 |
* as long as exists a column with a valid name
|
99 |
*/
|
100 |
public void delete(FeatureCollection data) throws IndexException; |
101 |
|
102 |
/** Performs a search in the index that meet the given parameters */
|
103 |
public List query(QueryParameters params) throws IndexException; |
104 |
|
105 |
|
106 |
} |
107 |
|